summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-13 13:18:42 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-12-13 13:18:42 +0000
commit0b8f17ed7b86eacaad99985c9261fb8735bf2cb6 (patch)
treeb503e07977f4e7a0ec2d5d6a15db623e001de3a9
parent90b059c5e1c026692a6fb1f123d65c0233d90646 (diff)
downloadhercules-0b8f17ed7b86eacaad99985c9261fb8735bf2cb6.tar.gz
hercules-0b8f17ed7b86eacaad99985c9261fb8735bf2cb6.tar.bz2
hercules-0b8f17ed7b86eacaad99985c9261fb8735bf2cb6.tar.xz
hercules-0b8f17ed7b86eacaad99985c9261fb8735bf2cb6.zip
- Fixed mobs being unable to attack anything... @.@
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9484 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--src/map/battle.c30
2 files changed, 16 insertions, 16 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index cfc2f026c..daeb1f3ff 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2006/12/13
+ * Fixed mobs being unable to attack anything...
2006/12/12
* Reverted the knockback update since it isn't working right with all
skills.
diff --git a/src/map/battle.c b/src/map/battle.c
index f82153c37..3b355c3b2 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3257,20 +3257,6 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if (!agit_flag && md->guardian_data && md->guardian_data->guild_id)
return 0; //Disable guardians/emperiums owned by Guilds on non-woe times.
- if(md->state.killer || !(battle_config.mob_ai&0x400))
- state |= BCT_ENEMY; //By default everyone hates mobs.
- else
- { //Smart enemy criteria.
- if (!md->special_state.ai) { //Normal mobs.
- if (s_bl->type == BL_MOB && !((TBL_MOB*)s_bl)->special_state.ai)
- state |= BCT_PARTY; //Normal mobs with no ai are friends.
- else
- state |= BCT_ENEMY; //However, all else are enemies.
- } else {
- if (s_bl->type == BL_MOB && !((TBL_MOB*)s_bl)->special_state.ai)
- state |= BCT_ENEMY; //Natural enemy for AI mobs are normal mobs.
- }
- }
break;
}
}
@@ -3345,8 +3331,20 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
TBL_MOB*md = (TBL_MOB*)s_bl;
if (!agit_flag && md->guardian_data && md->guardian_data->guild_id)
return 0; //Disable guardians/emperium owned by Guilds on non-woe times.
- if(md->state.killer) // Is on a rampage too :D
- state |= BCT_ENEMY;
+ if(md->state.killer || !(battle_config.mob_ai&0x400))
+ state |= BCT_ENEMY; //By default everyone hates mobs.
+ else
+ { //Smart enemy criteria.
+ if (!md->special_state.ai) { //Normal mobs.
+ if (t_bl->type == BL_MOB && !((TBL_MOB*)t_bl)->special_state.ai)
+ state |= BCT_PARTY; //Normal mobs with no ai are friends.
+ else
+ state |= BCT_ENEMY; //However, all else are enemies.
+ } else {
+ if (t_bl->type == BL_MOB && !((TBL_MOB*)t_bl)->special_state.ai)
+ state |= BCT_ENEMY; //Natural enemy for AI mobs are normal mobs.
+ }
+ }
break;
}
default: