Pages:<< prev 1 next >>



Conjurer

GroupMembers
Posts429
JoinedMar 7, 2005
I will submit this under the "how did nobody notice this" category. Sometimes these things truly beggar belief.
The spell, "Animate Dead" which uses spell_animate_dead( ), professes in the help files to take a target parameter. That doesn't actually look to exist in the code, however. Instead, it just finds the first suitable corpse in the room:
To me that's either a legit bug or someone gutted the functionality at some point and forgot to update the help file entry to account for the fact that no, there is no targeting capability.
That said, you can fix it pretty easily. Consider adding this just before the above section:
Or whatever you fancy. Just one suggestion.
Again, I have no idea how this got missed for so many years on MUDs with active players. Did people truly not care which corpse they animated? Or not notice they often didn't get the one they targeted?
The spell, "Animate Dead" which uses spell_animate_dead( ), professes in the help files to take a target parameter. That doesn't actually look to exist in the code, however. Instead, it just finds the first suitable corpse in the room:
for (corpse = ch->in_room->first_content; corpse; corpse = corpse_next) { corpse_next = corpse->next_content; if (corpse->item_type == ITEM_CORPSE_NPC && corpse->cost != -5) { found = TRUE; break; } }
To me that's either a legit bug or someone gutted the functionality at some point and forgot to update the help file entry to account for the fact that no, there is no targeting capability.
That said, you can fix it pretty easily. Consider adding this just before the above section:
if ( target_name[0] != '\0' ) { if ( ( corpse = get_obj_here( ch, target_name ) ) == NULL ) { send_to_char( "You cannot find that here.\r\n", ch ); return rSPELL_FAILED; } else if ( corpse->item_type == ITEM_CORPSE_NPC && corpse->cost != -5 ) found = TRUE; else { send_to_char( "That's not a suitable corpse.\r\n", ch ); return rSPELL_FAILED; } } else
Or whatever you fancy. Just one suggestion.

Again, I have no idea how this got missed for so many years on MUDs with active players. Did people truly not care which corpse they animated? Or not notice they often didn't get the one they targeted?



Black Hand

GroupAdministrators
Posts3,707
JoinedJan 1, 2002
Good catch. I wonder if most places just changed the help files instead of looking for the issue.



Conjurer

GroupMembers
Posts429
JoinedMar 7, 2005
I never cease to be amazed by some of the things I come across in play testing on an empty development server.

Pages:<< prev 1 next >>