summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-07 18:47:55 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-16 22:44:20 +0300
commit3a0bded54bcc5390bf6cd4be9e53206e1bc9e5c2 (patch)
tree55e0658924aed6ed0ac73ca2d4d3391ce5e79fbe /src/map/unit.c
parent61d6c958d5a753904d32ef2057b50f426bb0f3b9 (diff)
downloadhercules-3a0bded54bcc5390bf6cd4be9e53206e1bc9e5c2.tar.gz
hercules-3a0bded54bcc5390bf6cd4be9e53206e1bc9e5c2.tar.bz2
hercules-3a0bded54bcc5390bf6cd4be9e53206e1bc9e5c2.tar.xz
hercules-3a0bded54bcc5390bf6cd4be9e53206e1bc9e5c2.zip
Add function what called if player leave npc area.
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 64885541f..0924e6cf2 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -309,7 +309,7 @@ int unit_walktoxy_timer(int tid, int64 tick, int id, intptr_t data) {
if (bl->prev == NULL) //Script could have warped char, abort remaining of the function.
return 0;
} else
- sd->areanpc_id=0;
+ npc->untouch_areanpc(sd, bl->m, x, y);
if( sd->md ) { // mercenary should be warped after being 3 seconds too far from the master [greenbox]
if( !check_distance_bl(&sd->bl, &sd->md->bl, MAX_MER_DISTANCE) ) {
@@ -767,7 +767,7 @@ int unit_movepos(struct block_list *bl, short dst_x, short dst_y, int easy, bool
if (bl->prev == NULL) //Script could have warped char, abort remaining of the function.
return 0;
} else
- sd->areanpc_id=0;
+ npc->untouch_areanpc(sd, bl->m, bl->x, bl->y);
if( sd->status.pet_id > 0 && sd->pd && sd->pd->pet.intimate > 0 )
{ // Check if pet needs to be teleported. [Skotlex]
@@ -867,7 +867,7 @@ int unit_blown(struct block_list* bl, int dx, int dy, int count, int flag)
if(map->getcell(bl->m, bl->x, bl->y, CELL_CHKNPC)) {
npc->touch_areanpc(sd, bl->m, bl->x, bl->y);
} else {
- sd->areanpc_id = 0;
+ npc->untouch_areanpc(sd, bl->m, bl->x, bl->y);;
}
}
}