diff options
author | hemagx <hemagx2@gmail.com> | 2015-12-26 11:17:14 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-01-06 15:09:55 +0100 |
commit | 829ebdd1527a7a4a585056463f8871d926698e2d (patch) | |
tree | db7a21cf1f33a05896793f9500580b969ca914ba /src/map/skill.c | |
parent | b040c619b505fd7423576f88bb0fe7de35848d3d (diff) | |
download | hercules-829ebdd1527a7a4a585056463f8871d926698e2d.tar.gz hercules-829ebdd1527a7a4a585056463f8871d926698e2d.tar.bz2 hercules-829ebdd1527a7a4a585056463f8871d926698e2d.tar.xz hercules-829ebdd1527a7a4a585056463f8871d926698e2d.zip |
Change all TBL_PET to struct pet_data as per style guidelines
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r-- | src/map/skill.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index dd69092e8..9f7ecc049 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -2231,8 +2231,8 @@ int skill_attack(int attack_type, struct block_list* src, struct block_list *dsr dmg = battle->calc_attack(attack_type,src,bl,skill_id,skill_lv,flag&0xFFF); //Skotlex: Adjusted to the new system - if( src->type == BL_PET ) { // [Valaris] - struct pet_data *pd = (TBL_PET*)src; + if (src->type == BL_PET) { // [Valaris] + struct pet_data *pd = (struct pet_data *)src; if (pd->a_skill && pd->a_skill->div_ && pd->a_skill->id == skill_id) { int element = skill->get_ele(skill_id, skill_lv); /*if (skill_id == -1) Does it ever worked? @@ -5574,8 +5574,9 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (!ud) break; if (inf&INF_SELF_SKILL || inf&INF_SUPPORT_SKILL) { if (src->type == BL_PET) - bl = (struct block_list*)((TBL_PET*)src)->msd; - if (!bl) bl = src; + bl = (struct block_list *)((struct pet_data *)src)->msd; + if (bl == NULL) + bl = src; unit->skilluse_id(src, bl->id, abra_skill_id, abra_skill_lv); } else { //Assume offensive skills int target_id = 0; @@ -5583,7 +5584,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin target_id = ud->target; else switch (src->type) { case BL_MOB: target_id = ((struct mob_data *)src)->target_id; break; - case BL_PET: target_id = ((TBL_PET*)src)->target_id; break; + case BL_PET: target_id = ((struct pet_data *)src)->target_id; break; } if (!target_id) break; @@ -9262,8 +9263,9 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin if (!ud) break; if (inf&INF_SELF_SKILL || inf&INF_SUPPORT_SKILL) { if (src->type == BL_PET) - bl = (struct block_list*)((TBL_PET*)src)->msd; - if (!bl) bl = src; + bl = (struct block_list *)((struct pet_data *)src)->msd; + if (bl == NULL) + bl = src; unit->skilluse_id(src, bl->id, improv_skill_id, improv_skill_lv); } else { int target_id = 0; @@ -9271,7 +9273,7 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin target_id = ud->target; else switch (src->type) { case BL_MOB: target_id = ((struct mob_data *)src)->target_id; break; - case BL_PET: target_id = ((TBL_PET*)src)->target_id; break; + case BL_PET: target_id = ((struct pet_data *)src)->target_id; break; } if (!target_id) break; |