- Posts: 452
- Thank you received: 79
Rumble wrote: It isn't very fair to newbies to put a mob in the hometown that will repeatedly kill a clueless newbie.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
zusuk wrote: Well I'm just giving over a perspective from a stock TBA view, if I understand the code correctly.
Assumption: MEMORY flag means that a mob, once attacked, will remember the victim until he dies (or MUD reboot, etc). But dying is one of the factors, as is evident by the forget() call in fight.c
That being the case, you can hit Mr. Mercenary #1... flee from him, and forget you fought him.
Later, go hit Mercenary #2.. and die... his (#2) memory is cleared, but guess what... Mr. Mercenary #1 still will remember you
Which means on the way to pick up your corpse from your death to Mercenary #2, Mr. Mercenary #1 will jump you.
Now, if that was how you want that flag to behave, we both are on the same page.. I am of the opinion that the flag should behave differently.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Vatiken wrote: I gave this some thought, and I agree with Zusuk that the intended affect of death should whipe the dying PC from the memory of all NPCs that might remember him/her. I've updated the svn with a fix for this problem, as well as a fix for the issue of a dying PC respawning at his corpse from time to time. I'm not sure if this will fix the OP original issue, but if it doesn't the hunt will continue.
Code:Index: comm.c =================================================================== --- comm.c (revision 322) +++ comm.c (working copy) @@ -473,7 +473,13 @@ } else { write_to_descriptor (desc, "\n\rCopyover recovery complete.\n\r"); GET_PREF(d->character) = pref; + enter_player_game(d); + + /* Clear their load room if it's not persistant. */ + if (!PLR_FLAGGED(d->character, PLR_LOADROOM)) + GET_LOADROOM(d->character) = NOWHERE; + d->connected = CON_PLAYING; look_at_room(d->character, 0); Index: handler.c =================================================================== --- handler.c (revision 322) +++ handler.c (working copy) @@ -930,10 +930,19 @@ if (FIGHTING(k) == ch) stop_fighting(k); } - /* we can't forget the hunters either... */ - for (temp = character_list; temp; temp = temp->next) + /* Whipe character from the memory of hunters and other intelligent NPCs... */ + for (temp = character_list; temp; temp = temp->next) { + /* PCs can't use MEMORY, and don't use HUNTING() */ + if (!IS_NPC(temp)) + continue; + /* If "temp" is hunting our extracted char, stop the hunt. */ if (HUNTING(temp) == ch) HUNTING(temp) = NULL; + /* If "temp" has allocated memory data and our ch is a PC, forget the + * extracted character (if he/she is remembered) */ + if (!IS_NPC(ch) && MEMORY(temp)) + forget(temp, ch); /* forget() is safe to use without a check. */ + } char_from_room(ch);
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
tbaMUD © 2024