summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 9ce3160f6..598cc8ee7 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -1110,8 +1110,13 @@ int npc_scriptcont(struct map_session_data *sd,int id)
{
nullpo_retr(1, sd);
- if (id!=sd->npc_id){
- ShowWarning("npc_scriptcont: sd->npc_id (%d) is not id (%d).\n", sd->npc_id, id);
+ if( id != sd->npc_id ){
+ TBL_NPC* nd_sd=(TBL_NPC*)map_id2bl(sd->npc_id);
+ TBL_NPC* nd=(TBL_NPC*)map_id2bl(id);
+ if( nd_sd && nd )
+ ShowWarning("npc_scriptcont: %s (sd->npc_id=%d) is not %s (id=%d).\n", nd_sd->name, sd->npc_id, nd->name, id);
+ else
+ ShowDebug("npc_scriptcont: Invalid npc ID, npc_id variable not cleared? %x (sd->npc_id=%d) is not %x (id=%d)\n", (int)nd_sd, sd->npc_id, (int)nd, id);
return 1;
}