summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-29 18:08:07 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-29 18:08:07 +0000
commit69ca5fffbb6a940b9c5b7753c6c57d2c9c5b5abe (patch)
tree284aec7bb707c2ef343eeaed207f0769cb0f6a7a /src/map/battle.c
parent21b1dac6905f6e74054c567d6af3236f2de94dbc (diff)
downloadhercules-69ca5fffbb6a940b9c5b7753c6c57d2c9c5b5abe.tar.gz
hercules-69ca5fffbb6a940b9c5b7753c6c57d2c9c5b5abe.tar.bz2
hercules-69ca5fffbb6a940b9c5b7753c6c57d2c9c5b5abe.tar.xz
hercules-69ca5fffbb6a940b9c5b7753c6c57d2c9c5b5abe.zip
- Updated max_def parameter to not apply to mdef if magic_defense_type is set (rather than weapon_defense_type)
- Updated comment description for config setting max_def - Fixed battle_check_target check on BCT_ALL to check versus BL_CHAR instead of BL_PC and BL_MOB git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6826 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 5e2a0d1b6..52e82ce9f 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -25,8 +25,6 @@
#include "guild.h"
#include "party.h"
-#include "mercenary.h"
-
#define is_boss(bl) status_get_mexp(bl) // Can refine later [Aru]
int attr_fix_table[4][10][10];
@@ -3154,7 +3152,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
if (t_bl->type == BL_MOB && !((TBL_MOB*)t_bl)->special_state.ai)
state |= BCT_ENEMY; //Default enemy. Normal mobs.
//Pass on to master.
- s_bl=(struct block_list *)((struct homun_data*)src)->master; //Whoever is the master's enemy is the homunculus' enemy.
+ s_bl=(struct block_list *)((struct homun_data*)src)->master;
break;
}
case BL_PET:
@@ -3176,8 +3174,8 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
return 0;
}
- if ((flag&BCT_ALL) == BCT_ALL) { //All actually stands for all players/mobs
- if (target->type == BL_MOB || target->type == BL_PC)
+ if ((flag&BCT_ALL) == BCT_ALL) { //All actually stands for all attackable chars
+ if (target->type&BL_CHAR)
return 1;
else
return -1;