summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 0df3cda48..91017cf22 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -4005,6 +4005,9 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y
if(!sd->mapindex || map_mapname2ipport(mapindex,&ip,&port))
return 2;
+ if (sd->npc_id)
+ npc_event_dequeue(sd);
+ npc_script_event(sd, NPCE_LOGOUT);
//remove from map, THEN change x/y coordinates
unit_remove_map_pc(sd,clrtype);
sd->mapindex = mapindex;