From f0fc96a130ac67d894e44e922504504587b53bb3 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Sat, 29 Mar 2014 17:53:25 -0300 Subject: Fixed Issue 8062 Upon death attached (if any) script's execution only terminates if there is a open dialog, allowing silent npcs to remain running. Special Thanks to Haru, AnnieRuru! http://hercules.ws/board/tracker/issue-8062-when-player-died-the-script-execution-stops/ Signed-off-by: shennetsind --- src/map/pc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map') diff --git a/src/map/pc.c b/src/map/pc.c index d9b7ea7e1..268125ae1 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6885,7 +6885,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { npc->script_event(sd,NPCE_DIE); // Clear anything NPC-related when you die and was interacting with one. - if (sd->npc_id || sd->npc_shopid) { + if ( (sd->npc_id || sd->npc_shopid) && sd->state.dialog) { if (sd->state.using_fake_npc) { clif->clearunit_single(sd->npc_id, CLR_OUTSIGHT, sd->fd); sd->state.using_fake_npc = 0; -- cgit v1.2.3-60-g2f50