summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 0ba48b32b..c75600180 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -171,6 +171,10 @@ static int unit_walktoxy_timer(int tid, unsigned int tick, int id, intptr data)
return 0;
} else
sd->areanpc_id=0;
+
+ if( sd->ontouch.npc_id )
+ npc_touchnext_areanpc(sd,false);
+
if (sd->state.gmaster_flag &&
(battle_config.guild_aura&((agit_flag || agit2_flag)?2:1)) &&
(battle_config.guild_aura&(map_flag_gvg2(bl->m)?8:4))
@@ -520,6 +524,10 @@ int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool
return 0;
} else
sd->areanpc_id=0;
+
+ if( sd->ontouch.npc_id )
+ npc_touchnext_areanpc(sd,false);
+
if( sd->status.pet_id > 0 && sd->pd && sd->pd->pet.intimate > 0 )
{ // Check if pet needs to be teleported. [Skotlex]
int flag = 0;
@@ -1804,6 +1812,8 @@ int unit_remove_map_(struct block_list *bl, int clrtype, const char* file, int l
guild_reply_reqalliance(sd,sd->guild_alliance_account,0);
if(sd->menuskill_id)
sd->menuskill_id = sd->menuskill_val = 0;
+ if( sd->ontouch.npc_id )
+ npc_touchnext_areanpc(sd,true);
sd->npc_shopid = 0;
sd->adopt_invite = 0;