summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 15:29:17 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-30 15:29:17 +0000
commita1fddcf716995eddf1c26e1395c8cc24ce6b3eba (patch)
tree81c5947a93a0b58b2d684a2d9589cec4c68f1673 /src/map/battle.c
parent6f704b3e087d36513e4c5b190da10141231fb187 (diff)
downloadhercules-a1fddcf716995eddf1c26e1395c8cc24ce6b3eba.tar.gz
hercules-a1fddcf716995eddf1c26e1395c8cc24ce6b3eba.tar.bz2
hercules-a1fddcf716995eddf1c26e1395c8cc24ce6b3eba.tar.xz
hercules-a1fddcf716995eddf1c26e1395c8cc24ce6b3eba.zip
- Small optimization in battle_check_target
- Disabled ontouch npcs triggering on hidden/chase-walk characters. - Added the SC* code blocks relevant to SC_AVOID, SC_CHANGE, SC_BLOODLUST, SC_FLEET - Added structure status_data to homun_data - Added handling of BL_HOMUNCULUS in status_heal, status_damage. - Cleaned up the homun-submitted code, moved the relevant code to status_calc_homunculus. - Updated map-server Makefile to compile mercenary.* files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6847 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index f655c4619..52aee5c69 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3043,9 +3043,9 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
case BL_MOB:
{
TBL_MOB *md = (TBL_MOB*)t_bl;
- if(md->state.killer)
- if(md->master_id != s_bl->id)
- state |= BCT_ENEMY; // If he can attack you, you can attack him.
+ if(md->state.killer) //Enable retaliation
+ state |= BCT_ENEMY;
+
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->special_state.ai == 2)
@@ -3062,8 +3062,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return 0; //Pets cannot be targetted.
}
case BL_HOMUNCULUS:
- {
- t_bl=(struct block_list *)((struct homun_data*)target)->master; //...and vice versa.
+ { //Just fallback on master.
+ t_bl=(struct block_list *)((TBL_HOMUNCULUS*)target)->master;
break;
}
case BL_SKILL: //Skill with no owner? Kinda odd... but.. let it through.