summaryrefslogtreecommitdiff
path: root/src/map/npc.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/npc.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/npc.c')
-rw-r--r--src/map/npc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index 63514710f..77e99ecc5 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -975,6 +975,16 @@ int npc_touch_areanpc(struct map_session_data* sd, int16 m, int16 x, int16 y)
return 0;
}
+/*==========================================
+ * Exec OnUnTouch for player if out range of area event
+ *------------------------------------------*/
+int npc_untouch_areanpc(struct map_session_data* sd, int16 m, int16 x, int16 y)
+{
+ nullpo_retr(1, sd);
+ sd->areanpc_id = 0;
+ return 0;
+}
+
// OnTouch NPC or Warp for Mobs
// Return 1 if Warped
int npc_touch_areanpc2(struct mob_data *md)
@@ -4650,6 +4660,7 @@ void npc_defaults(void) {
npc->touch_areanpc_sub = npc_touch_areanpc_sub;
npc->touchnext_areanpc = npc_touchnext_areanpc;
npc->touch_areanpc = npc_touch_areanpc;
+ npc->untouch_areanpc = npc_untouch_areanpc;
npc->touch_areanpc2 = npc_touch_areanpc2;
npc->check_areanpc = npc_check_areanpc;
npc->checknear = npc_checknear;