summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/status.c b/src/map/status.c
index e29e27236..cfae64536 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -11783,9 +11783,12 @@ int status_change_timer_sub(struct block_list* bl, va_list ap) {
if (battle->check_target( src, bl, BCT_ENEMY ) > 0
&& status->check_skilluse(src, bl, WZ_SIGHTBLASTER, 2)
) {
- struct skill_unit *su = (struct skill_unit *)bl;
- if (sce && skill->attack(BF_MAGIC,src,src,bl,WZ_SIGHTBLASTER,sce->val1,tick,0x4000)
- && (!su || !su->group || !(skill->get_inf2(su->group->skill_id)&INF2_TRAP))) { // The hit is not counted if it's against a trap
+ const struct skill_unit *su = BL_CCAST(BL_SKILL, bl);
+ if (sce != NULL
+ && skill->attack(BF_MAGIC,src,src,bl,WZ_SIGHTBLASTER,sce->val1,tick,0x4000)
+ && (su == NULL || su->group == NULL || !(skill->get_inf2(su->group->skill_id)&INF2_TRAP))
+ ) {
+ // The hit is not counted if it's against a trap
sce->val2 = 0; // This signals it to end.
} else if ((bl->type&BL_SKILL) && sce && sce->val4%2 == 0) {
//Remove trap immunity temporarily so it triggers if you still stand on it