summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 09:46:45 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 09:46:45 +0000
commitffcebec91192484588b2a5853782d026e5370f0c (patch)
tree2e97d4e2b613bf2395f0f1b47435c0caf1686cc5 /src/map/battle.c
parent4eabbb012ad6e6a4b9b3343e090b96de2841c1cf (diff)
downloadhercules-ffcebec91192484588b2a5853782d026e5370f0c.tar.gz
hercules-ffcebec91192484588b2a5853782d026e5370f0c.tar.bz2
hercules-ffcebec91192484588b2a5853782d026e5370f0c.tar.xz
hercules-ffcebec91192484588b2a5853782d026e5370f0c.zip
* Mob control engine tested 99% working so far.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6770 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index a263d4874..9bbcce01e 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3426,8 +3426,24 @@ 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
+ if(md->state.killer){ // Is on a rampage too :D
+ switch(t_bl->type){
+ case BL_MOB:
+ if(md->master_id != 0 && ((TBL_MOB *)t_bl)->master_id == md->master_id)
+ state |= BCT_PARTY;
+ break;
+ case BL_PC:
+ if(t_bl->id == md->master_id)
+ state |= BCT_PARTY;
+ break;
+ case BL_PET:
+ if(((TBL_PET *)t_bl)->msd->bl.id == md->master_id)
+ state |= BCT_PARTY;
+ break;
+ }
state |= BCT_ENEMY;
+ break;
+ }
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.