diff options
author | momacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-23 03:37:38 +0000 |
---|---|---|
committer | momacabu <momacabu@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-23 03:37:38 +0000 |
commit | d67c0dd4f78b1a1a6aae9e54791bd93daea5904f (patch) | |
tree | a12e52b39231fb73b4e52e6d859edb35f39dce4d /src/map/pc.c | |
parent | fa0e7ac66029cda08041f6ed9410bbafbe7a58b7 (diff) | |
download | hercules-d67c0dd4f78b1a1a6aae9e54791bd93daea5904f.tar.gz hercules-d67c0dd4f78b1a1a6aae9e54791bd93daea5904f.tar.bz2 hercules-d67c0dd4f78b1a1a6aae9e54791bd93daea5904f.tar.xz hercules-d67c0dd4f78b1a1a6aae9e54791bd93daea5904f.zip |
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://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16949 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/pc.c')
-rw-r--r-- | src/map/pc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c index b73a633d8..6f85aa532 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6493,6 +6493,19 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) if( (bg = bg_team_search(sd->bg_id)) != NULL && bg->die_event[0] ) 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); |