summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-14 08:54:54 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-01-14 08:54:54 +0000
commitc59ea57a893908f54d2960a1e18d2473a1bb8196 (patch)
treeffd267754c4bc8b70d559e9e416f326c82757ecb /src/map/battle.c
parentdde2e2fa9619a504765b676caa3ac0b05b67cfbc (diff)
downloadhercules-c59ea57a893908f54d2960a1e18d2473a1bb8196.tar.gz
hercules-c59ea57a893908f54d2960a1e18d2473a1bb8196.tar.bz2
hercules-c59ea57a893908f54d2960a1e18d2473a1bb8196.tar.xz
hercules-c59ea57a893908f54d2960a1e18d2473a1bb8196.zip
Simplified the BL_CAST macro (see topic:166795)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12072 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 9d3bfe31c..e0d21f4ec 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -878,8 +878,8 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo
if (tsc && !tsc->count)
tsc = NULL; //Skip checking as there are no status changes active.
- BL_CAST(BL_PC, src, sd);
- BL_CAST(BL_PC, target, tsd);
+ sd = BL_CAST(BL_PC, src);
+ tsd = BL_CAST(BL_PC, target);
if(sd)
wd.blewcount += battle_blewcount_bonus(sd, skill_num);
@@ -2111,8 +2111,8 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
nk = skill_get_nk(skill_num);
flag.imdef = nk&NK_IGNORE_DEF?1:0;
- BL_CAST(BL_PC, src, sd);
- BL_CAST(BL_PC, target, tsd);
+ sd = BL_CAST(BL_PC, src);
+ tsd = BL_CAST(BL_PC, target);
//Initialize variables that will be used afterwards
s_ele = skill_get_ele(skill_num, skill_lv);
@@ -2442,8 +2442,8 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
nk = skill_get_nk(skill_num);
- BL_CAST(BL_PC, src, sd);
- BL_CAST(BL_PC, target, tsd);
+ sd = BL_CAST(BL_PC, src);
+ tsd = BL_CAST(BL_PC, target);
if(sd) {
sd->state.arrow_atk = 0;
@@ -2664,7 +2664,7 @@ int battle_calc_return_damage(struct block_list* bl, int damage, int flag)
struct map_session_data* sd = NULL;
int rdamage = 0;
- BL_CAST(BL_PC, bl, sd);
+ sd = BL_CAST(BL_PC, bl);
//Bounces back part of the damage.
if (flag & BF_SHORT) {
@@ -2753,8 +2753,8 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
if (src->prev == NULL || target->prev == NULL)
return 0;
- BL_CAST(BL_PC, src, sd);
- BL_CAST(BL_PC, target, tsd);
+ sd = BL_CAST(BL_PC, src);
+ tsd = BL_CAST(BL_PC, target);
sstatus = status_get_status_data(src);
tstatus = status_get_status_data(target);