diff options
author | Hercules.ws <Hercules@efficiently.awesome> | 2014-11-03 11:47:00 +0100 |
---|---|---|
committer | HerculesWSAPI <Hercules@efficiently.awesome> | 2014-11-03 11:47:00 +0100 |
commit | 092949e0fea0c103c7d3fb32953182781853f575 (patch) | |
tree | 1fca8313e38d695f8f933e2519e69c28eb0eadec /src/map/mob.c | |
parent | b8abf962fd079bc3cad4498aa968f2318d1f5fde (diff) | |
download | hercules-092949e0fea0c103c7d3fb32953182781853f575.tar.gz hercules-092949e0fea0c103c7d3fb32953182781853f575.tar.bz2 hercules-092949e0fea0c103c7d3fb32953182781853f575.tar.xz hercules-092949e0fea0c103c7d3fb32953182781853f575.zip |
HPM Hooks Update
Signed-off-by: HerculesWSAPI <Hercules@efficiently.awesome>
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index c05f4c4a2..2605b414f 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1303,8 +1303,8 @@ int mob_unlocktarget(struct mob_data *md, int64 tick) { md->ud.target_to = 0; unit->set_target(&md->ud, 0); } - if(map->count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) {
- unit->walktoxy(&md->bl, md->bl.x, md->bl.y, 8);
+ if(map->count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) { + unit->walktoxy(&md->bl, md->bl.x, md->bl.y, 8); } return 0; @@ -1433,8 +1433,8 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) { //No valid target if (mob->warpchase(md, tbl)) return true; //Chasing this target. - if(md->ud.walktimer != INVALID_TIMER && (!can_move || md->ud.walkpath.path_pos <= battle_config.mob_chase_refresh)
- && (tbl || md->ud.walkpath.path_pos == 0))
+ if(md->ud.walktimer != INVALID_TIMER && (!can_move || md->ud.walkpath.path_pos <= battle_config.mob_chase_refresh) + && (tbl || md->ud.walkpath.path_pos == 0)) return true; //Walk at least "mob_chase_refresh" cells before dropping the target unless target is non-existent mob_unlocktarget(md, tick); //Unlock target tbl = NULL; |