From b035b0610206daff6e94f9d88297438e0ab93261 Mon Sep 17 00:00:00 2001 From: skotlex Date: Wed, 16 Aug 2006 14:37:00 +0000 Subject: - Updated mob_ai so that mobs will use their rude-attacked skill when they can't reach their current target. - Fixed the default txt config making pets be saved to the homun file instead of to the pet file. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8316 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/mob.c b/src/map/mob.c index d57272177..7a499bc09 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1094,8 +1094,9 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap) { if (md->attacked_id == md->target_id) { - if (!can_move && (battle_config.mob_ai&2) && - !battle_check_range(&md->bl, tbl, md->status.rhw.range)) + if (!battle_check_range(&md->bl, tbl, md->status.rhw.range) && + ((!can_move && battle_config.mob_ai&2) || + (!mob_can_reach(md, tbl, dist+2, MSS_RUSH)))) { //Rude-attacked (avoid triggering due to can-walk delay). if (DIFF_TICK(tick, md->ud.canmove_tick) > 0 && md->attacked_count++ >= RUDE_ATTACKED_COUNT) -- cgit v1.2.3-60-g2f50