summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 07:21:48 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 07:21:48 +0000
commit4eabbb012ad6e6a4b9b3343e090b96de2841c1cf (patch)
treec7239af4c1e62dd9e6019fe1dd615df840422ce2 /src/map/battle.c
parent245f3dbc96cbbefc890ef2cd957f71185470e32f (diff)
downloadhercules-4eabbb012ad6e6a4b9b3343e090b96de2841c1cf.tar.gz
hercules-4eabbb012ad6e6a4b9b3343e090b96de2841c1cf.tar.bz2
hercules-4eabbb012ad6e6a4b9b3343e090b96de2841c1cf.tar.xz
hercules-4eabbb012ad6e6a4b9b3343e090b96de2841c1cf.zip
* Change scripting engine's NPC scope vars to dot (.) style.
* Improved and (should be fully) fixed the mob control engine. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6769 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 77e5bc7d7..a263d4874 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3426,6 +3426,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
case BL_MOB:
{
TBL_MOB*md = (TBL_MOB*)s_bl;
+ if(md->state.killer) // Is on a rampage too :D
+ state |= BCT_ENEMY;
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->special_state.ai) { //Normal mobs.
@@ -3434,7 +3436,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
else
state |= BCT_ENEMY; //However, all else are enemies.
} else {
- //if (t_bl->type == BL_MOB && !((TBL_MOB*)t_bl)->special_state.ai)
+ if (t_bl->type == BL_MOB && !((TBL_MOB*)t_bl)->special_state.ai)
state |= BCT_ENEMY; //Natural enemy for AI mobs are normal mobs.
}
if (md->master_id && (s_bl = map_id2bl(md->master_id)) == NULL)