From 3ffefa50cd02dee25b8fca450be1a20c4647aa15 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 6 Jun 2013 18:19:17 -0300 Subject: Follow up f754643911ebb19eb68fb7b6ad1a864b02d111a8 Special Thanks to lighta for pointing out an issue with that. Signed-off-by: shennetsind --- src/map/npc.c | 3 +-- src/map/pc.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/map/npc.c b/src/map/npc.c index 23a3b3d84..4e1e79808 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -303,8 +303,7 @@ int npc_event_dequeue(struct map_session_data* sd) if (!sd->eventqueue[0][0]) return 0; //Nothing to dequeue - if (!pc_addeventtimer(sd,100,sd->eventqueue[0])) - { //Failed to dequeue, couldn't set a timer. + if (!pc_addeventtimer(sd,100,sd->eventqueue[0])) { //Failed to dequeue, couldn't set a timer. ShowWarning("npc_event_dequeue: event timer is full !\n"); return 0; } diff --git a/src/map/pc.c b/src/map/pc.c index 2587cfc8f..8d0194deb 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6637,7 +6637,7 @@ int pc_dead(struct map_session_data *sd,struct block_list *src) { duel_reject(sd->duel_invite, sd); } - if (sd->npc_id) + if (sd->npc_id && sd->st && sd->st->state != RUN) npc_event_dequeue(sd); pc_setglobalreg(sd,"PC_DIE_COUNTER",sd->die_counter+1); -- cgit v1.2.3-70-g09d2