Follow up to r16946, where not all npc interactions (input, menu) where properly terminated.
*Buddha of mine I also horrendously misplaced the code.* git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@16949 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
78c79827dc
commit
151ef27c58
13
src/map/pc.c
13
src/map/pc.c
@ -6494,6 +6494,19 @@ int pc_dead(struct map_session_data *sd,struct block_list *src)
|
||||
npc_event(sd, bg->die_event, 0);
|
||||
}
|
||||
|
||||
// Clear anything NPC-related when you die and was interacting with one.
|
||||
if (sd->npc_id)
|
||||
{
|
||||
if (sd->state.using_fake_npc)
|
||||
sd->state.using_fake_npc = 0;
|
||||
if (sd->state.menu_or_input)
|
||||
sd->state.menu_or_input = 0;
|
||||
if (sd->npc_menu)
|
||||
sd->npc_menu = 0;
|
||||
|
||||
npc_event_dequeue(sd);
|
||||
}
|
||||
|
||||
npc_script_event(sd,NPCE_DIE);
|
||||
|
||||
/* e.g. not killed thru pc_damage */
|
||||
|
@ -1343,9 +1343,6 @@ int status_damage(struct block_list *src,struct block_list *target,int hp, int s
|
||||
clif_clearunit_area(target,CLR_DEAD);
|
||||
skill_unit_move(target,gettick(),4);
|
||||
skill_cleartimerskill(target);
|
||||
|
||||
if(target->type == BL_PC && ((TBL_PC*)target)->npc_id && flag == 1)
|
||||
npc_event_dequeue((TBL_PC*)target);
|
||||
}
|
||||
|
||||
return hp+sp;
|
||||
|
Loading…
x
Reference in New Issue
Block a user