summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorhemagx <hemagx2@gmail.com>2015-12-26 11:17:14 +0200
committerHaru <haru@dotalux.com>2016-01-06 15:09:54 +0100
commit00c95f652e5a2c572b9f210507e346af031c6f96 (patch)
treeaeaef59669cf66ac232982b6c0b62d7b6436d077 /src/map/battle.c
parent3364658237805c34ebc074d52d34f540c8a8ee56 (diff)
downloadhercules-00c95f652e5a2c572b9f210507e346af031c6f96.tar.gz
hercules-00c95f652e5a2c572b9f210507e346af031c6f96.tar.bz2
hercules-00c95f652e5a2c572b9f210507e346af031c6f96.tar.xz
hercules-00c95f652e5a2c572b9f210507e346af031c6f96.zip
Change all TBL_MER to struct mercenary_data as per style guidelines
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index af2ef018a..9e3c05641 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2870,7 +2870,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
// Autoguard will be disabled later on
struct block_list *d_bl = map->id2bl(sce_d->val1);
if (d_bl && check_distance_bl(bl, d_bl, sce_d->val3)
- && ((d_bl->type == BL_MER && ((TBL_MER*)d_bl)->master && ((TBL_MER*)d_bl)->master->bl.id == bl->id)
+ && ((d_bl->type == BL_MER && ((struct mercenary_data *)d_bl)->master && ((struct mercenary_data *)d_bl)->master->bl.id == bl->id)
|| (d_bl->type == BL_PC && ((struct map_session_data *)d_bl)->devotion[sce_d->val2] == bl->id))
) {
// if player is target of devotion, show guard effect on the devotion caster rather than the target
@@ -6206,7 +6206,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
struct block_list *d_bl = map->id2bl(sce->val1);
if (d_bl != NULL
- && ((d_bl->type == BL_MER && ((TBL_MER *)d_bl)->master && ((TBL_MER *)d_bl)->master->bl.id == target->id)
+ && ((d_bl->type == BL_MER && ((struct mercenary_data *)d_bl)->master && ((struct mercenary_data *)d_bl)->master->bl.id == target->id)
|| (d_bl->type == BL_PC && ((struct map_session_data *)d_bl)->devotion[sce->val2] == target->id)
)
&& check_distance_bl(target, d_bl, sce->val3)
@@ -6401,8 +6401,8 @@ struct block_list* battle_get_master(struct block_list *src) {
src = (struct block_list *)((struct homun_data *)src)->master;
break;
case BL_MER:
- if (((TBL_MER*)src)->master)
- src = (struct block_list*)((TBL_MER*)src)->master;
+ if (((struct mercenary_data *)src)->master != NULL)
+ src = (struct block_list *)((struct mercenary_data *)src)->master;
break;
case BL_ELEM:
if (((TBL_ELEM*)src)->master)