summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-07 20:15:23 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-07 20:15:23 +0000
commitdd2e4d4fea67858cb39260549de6a2ccb49eb7b9 (patch)
tree2f94180e9494eefcaf6f8a2dd7b0b0c74b5c7da8 /src/map/unit.c
parent5d9d254ef290e9cc8acfdd08af279fdc1a439853 (diff)
downloadhercules-dd2e4d4fea67858cb39260549de6a2ccb49eb7b9.tar.gz
hercules-dd2e4d4fea67858cb39260549de6a2ccb49eb7b9.tar.bz2
hercules-dd2e4d4fea67858cb39260549de6a2ccb49eb7b9.tar.xz
hercules-dd2e4d4fea67858cb39260549de6a2ccb49eb7b9.zip
- Added config setting mob_npc_warp, when set to yes, enables mobs to be warped between maps when stepping on a npc-warp.
- Added monster_ai setting &64, when enabled makes a mob run to any nearby npc-warp when their current target has switched maps. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7039 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index a87dfa16b..527a4be44 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -192,6 +192,9 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
sc_start(&sd->bl,SC_MIRACLE,100,1,battle_config.sg_miracle_skill_duration);
}
} else if (md) {
+ if(battle_config.mob_npc_warp && map_getcell(bl->m,x,y,CELL_CHKNPC) &&
+ npc_touch_areanpc2(bl)) // Enable mobs to step on warps. [Skotlex]
+ return 0;
if (md->min_chase > md->db->range2) md->min_chase--;
//Walk skills are triggered regardless of target due to the idle-walk mob state.
if(!(ud->walk_count%WALK_SKILL_INTERVAL) &&