summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c12
-rw-r--r--src/map/battleground.c2
-rw-r--r--src/map/clif.c4
-rw-r--r--src/map/skill.c10
-rw-r--r--src/map/status.c8
5 files changed, 18 insertions, 18 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 9e3c05641..54769374a 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3571,7 +3571,7 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
//Skill Range Criteria
ad.flag |= battle->range_type(src, target, skill_id, skill_lv);
flag.infdef = (tstatus->mode&MD_PLANT) ? 1 : 0;
- if( !flag.infdef && target->type == BL_SKILL && ((TBL_SKILL*)target)->group->unit_id == UNT_REVERBERATION )
+ if (!flag.infdef && target->type == BL_SKILL && ((struct skill_unit *)target)->group->unit_id == UNT_REVERBERATION)
flag.infdef = 1; // Reverberation takes 1 damage
switch(skill_id) {
@@ -4312,7 +4312,7 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
&& skill_id != HT_FREEZINGTRAP
#endif
?1:0);
- if( !flag.infdef && target->type == BL_SKILL && ((TBL_SKILL*)target)->group->unit_id == UNT_REVERBERATION )
+ if (!flag.infdef && target->type == BL_SKILL && ((struct skill_unit *)target)->group->unit_id == UNT_REVERBERATION)
flag.infdef = 1; // Reverberation takes 1 damage
//Initial Values
@@ -6187,7 +6187,7 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
if (sd && sd->bonus.splash_range > 0 && damage > 0)
skill->castend_damage_id(src, target, 0, 1, tick, 0);
if ( target->type == BL_SKILL && damage > 0 ){
- TBL_SKILL *su = (TBL_SKILL*)target;
+ struct skill_unit *su = (struct skill_unit *)target;
if( su->group && su->group->skill_id == HT_BLASTMINE)
skill->blown(src, target, 3, -1, 0);
}
@@ -6409,8 +6409,8 @@ struct block_list* battle_get_master(struct block_list *src) {
src = (struct block_list*)((TBL_ELEM*)src)->master;
break;
case BL_SKILL:
- if (((TBL_SKILL*)src)->group && ((TBL_SKILL*)src)->group->src_id)
- src = map->id2bl(((TBL_SKILL*)src)->group->src_id);
+ if (((struct skill_unit *)src)->group != NULL && ((struct skill_unit *)src)->group->src_id != 0)
+ src = map->id2bl(((struct skill_unit *)src)->group->src_id);
break;
}
} while (src && src != prev);
@@ -6505,7 +6505,7 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
}
case BL_SKILL:
{
- TBL_SKILL *su = (TBL_SKILL*)target;
+ struct skill_unit *su = (struct skill_unit *)target;
if( !su->group )
return 0;
if( skill->get_inf2(su->group->skill_id)&INF2_TRAP &&
diff --git a/src/map/battleground.c b/src/map/battleground.c
index e740a3370..72ccbeb78 100644
--- a/src/map/battleground.c
+++ b/src/map/battleground.c
@@ -242,7 +242,7 @@ int bg_team_get_id(struct block_list *bl) {
return ((struct mercenary_data *)bl)->master->bg_id;
break;
case BL_SKILL:
- return ((TBL_SKILL*)bl)->group->bg_id;
+ return ((struct skill_unit *)bl)->group->bg_id;
}
return 0;
diff --git a/src/map/clif.c b/src/map/clif.c
index af5af4e8c..a4ff28bb6 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -4586,7 +4586,7 @@ int clif_getareachar(struct block_list* bl,va_list ap) {
clif->getareachar_item(sd,(struct flooritem_data*) bl);
break;
case BL_SKILL:
- clif->getareachar_skillunit(&sd->bl,(TBL_SKILL*)bl,SELF);
+ clif->getareachar_skillunit(&sd->bl, (struct skill_unit *)bl, SELF);
break;
default:
if(&sd->bl == bl)
@@ -4676,7 +4676,7 @@ int clif_insight(struct block_list *bl,va_list ap)
clif->getareachar_item(tsd,(struct flooritem_data*)bl);
break;
case BL_SKILL:
- clif->getareachar_skillunit(&tsd->bl,(TBL_SKILL*)bl,SELF);
+ clif->getareachar_skillunit(&tsd->bl, (struct skill_unit *)bl, SELF);
break;
default:
clif->getareachar_unit(tsd,bl);
diff --git a/src/map/skill.c b/src/map/skill.c
index a7fea4a58..dd69092e8 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -2877,7 +2877,7 @@ void skill_attack_display_unknown(int *attack_type, struct block_list* src, stru
if (*flag & SD_ANIMATION && dmg->div_ < 2) //Disabling skill animation doesn't works on multi-hit.
*type = BDT_SPLASH;
if (bl->type == BL_SKILL ) {
- TBL_SKILL *su = (TBL_SKILL*)bl;
+ struct skill_unit *su = (struct skill_unit *)bl;
if (su->group && skill->get_inf2(su->group->skill_id) & INF2_TRAP) // show damage on trap targets
clif->skill_damage(src, bl, *tick, dmg->amotion, dmg->dmotion, *damage, dmg->div_, *skill_id, (*flag & SD_LEVEL) ? -1 : *skill_lv, BDT_SPLASH);
}
@@ -2895,7 +2895,7 @@ int skill_attack_dir_unknown(int *attack_type, struct block_list* src, struct bl
void skill_attack_blow_unknown(int *attack_type, struct block_list* src, struct block_list *dsrc, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag, int *type, struct Damage *dmg, int64 *damage, int8 *dir) {
skill->blown(dsrc, bl, dmg->blewcount, *dir, 0x0);
if (!dmg->blewcount && bl->type == BL_SKILL && *damage > 0){
- TBL_SKILL *su = (TBL_SKILL*)bl;
+ struct skill_unit *su = (struct skill_unit *)bl;
if (su->group && su->group->skill_id == HT_BLASTMINE)
skill->blown(src, bl, 3, -1, 0);
}
@@ -3507,7 +3507,7 @@ bool skill_cleartimerskill_exception(int skill_id)
}
int skill_activate_reverberation(struct block_list *bl, va_list ap) {
- struct skill_unit *su = (TBL_SKILL*)bl;
+ struct skill_unit *su = (struct skill_unit *)bl;
struct skill_unit_group *sg;
if( bl->type != BL_SKILL )
return 0;
@@ -3522,7 +3522,7 @@ int skill_activate_reverberation(struct block_list *bl, va_list ap) {
}
int skill_reveal_trap (struct block_list *bl, va_list ap) {
- TBL_SKILL *su = (TBL_SKILL*)bl;
+ struct skill_unit *su = (struct skill_unit *)bl;
if (su->alive && su->group && skill->get_inf2(su->group->skill_id)&INF2_TRAP) { //Reveal trap.
//Change look is not good enough, the client ignores it as an actual trap still. [Skotlex]
//clif->changetraplook(bl, su->group->unit_id);
@@ -11135,7 +11135,7 @@ struct skill_unit_group* skill_unitsetting(struct block_list *src, uint16 skill_
} else { // previous implementation (not used anymore)
//Warp Portal morphing to active mode, extract relevant data from src. [Skotlex]
if( src->type != BL_SKILL ) return NULL;
- group = ((TBL_SKILL*)src)->group;
+ group = ((struct skill_unit *)src)->group;
src = map->id2bl(group->src_id);
if( !src ) return NULL;
val2 = group->val2; //Copy the (x,y) position you warp to
diff --git a/src/map/status.c b/src/map/status.c
index 1af57b94f..ba99cb562 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -6344,8 +6344,8 @@ int status_get_party_id(struct block_list *bl) {
return ((struct mercenary_data *)bl)->master->status.party_id;
break;
case BL_SKILL:
- if (((TBL_SKILL*)bl)->group)
- return ((TBL_SKILL*)bl)->group->party_id;
+ if (((struct skill_unit *)bl)->group != NULL)
+ return ((struct skill_unit *)bl)->group->party_id;
break;
case BL_ELEM:
if (((TBL_ELEM*)bl)->master)
@@ -6389,8 +6389,8 @@ int status_get_guild_id(struct block_list *bl) {
return ((TBL_NPC*)bl)->u.scr.guild_id;
break;
case BL_SKILL:
- if (((TBL_SKILL*)bl)->group)
- return ((TBL_SKILL*)bl)->group->guild_id;
+ if (((struct skill_unit *)bl)->group != NULL)
+ return ((struct skill_unit *)bl)->group->guild_id;
break;
case BL_ELEM:
if (((TBL_ELEM*)bl)->master)