summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-16 14:37:00 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-08-16 14:37:00 +0000
commitb035b0610206daff6e94f9d88297438e0ab93261 (patch)
tree9554d375fd6a034dda72e2c68d22595d842918ea /src
parent77e8294908fcbf69431d87b74a8ed15d3ab5fd2e (diff)
downloadhercules-b035b0610206daff6e94f9d88297438e0ab93261.tar.gz
hercules-b035b0610206daff6e94f9d88297438e0ab93261.tar.bz2
hercules-b035b0610206daff6e94f9d88297438e0ab93261.tar.xz
hercules-b035b0610206daff6e94f9d88297438e0ab93261.zip
- 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
Diffstat (limited to 'src')
-rw-r--r--src/map/mob.c5
1 files changed, 3 insertions, 2 deletions
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)