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
commit3364658237805c34ebc074d52d34f540c8a8ee56 (patch)
tree1bae2bca09c3f8b08d5a41be55efbe3cb2fa3d1a /src/map/battle.c
parent1249dc22081a0be982489aae8f18e1658e0cba95 (diff)
downloadhercules-3364658237805c34ebc074d52d34f540c8a8ee56.tar.gz
hercules-3364658237805c34ebc074d52d34f540c8a8ee56.tar.bz2
hercules-3364658237805c34ebc074d52d34f540c8a8ee56.tar.xz
hercules-3364658237805c34ebc074d52d34f540c8a8ee56.zip
Change all TBL_HOM to struct homun_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.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index ded0ecac9..af2ef018a 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3202,7 +3202,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
clif->millenniumshield(bl, sc->fv_counter++);
if (sc->data[SC_STYLE_CHANGE] && rnd()%2) {
- TBL_HOM *hd = BL_CAST(BL_HOM,bl);
+ struct homun_data *hd = BL_CAST(BL_HOM,bl);
if (hd) homun->addspiritball(hd, 10); //add a sphere
}
@@ -3254,7 +3254,7 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam
if (tsc->data[SC_SHIELDSPELL_REF] && tsc->data[SC_SHIELDSPELL_REF]->val1 == 1 && damage > 0)
skill->break_equip(bl,EQP_ARMOR,10000,BCT_ENEMY );
if (tsc->data[SC_STYLE_CHANGE] && rnd()%2) {
- TBL_HOM *hd = BL_CAST(BL_HOM,bl);
+ struct homun_data *hd = BL_CAST(BL_HOM,bl);
if (hd) homun->addspiritball(hd, 10);
}
if (src->type == BL_PC && damage > 0 && (sce = tsc->data[SC_GENTLETOUCH_ENERGYGAIN]) != NULL) {
@@ -4860,7 +4860,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
break;
case HFLI_SBR44: //[orn]
if(src->type == BL_HOM) {
- wd.damage = ((TBL_HOM*)src)->homunculus.intimacy ;
+ wd.damage = ((struct homun_data *)src)->homunculus.intimacy;
break;
}
default:
@@ -5166,8 +5166,9 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
}
#endif
if(sc->data[SC_STYLE_CHANGE]){
- TBL_HOM *hd = BL_CAST(BL_HOM,src);
- if (hd) ATK_ADD(hd->homunculus.spiritball * 3);
+ struct homun_data *hd = BL_CAST(BL_HOM, src);
+ if (hd != NULL)
+ ATK_ADD(hd->homunculus.spiritball * 3);
}
}
@@ -6396,8 +6397,8 @@ struct block_list* battle_get_master(struct block_list *src) {
src = map->id2bl(((struct mob_data *)src)->master_id);
break;
case BL_HOM:
- if (((TBL_HOM*)src)->master)
- src = (struct block_list*)((TBL_HOM*)src)->master;
+ if (((struct homun_data *)src)->master != NULL)
+ src = (struct block_list *)((struct homun_data *)src)->master;
break;
case BL_MER:
if (((TBL_MER*)src)->master)