summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 47ec44abc..27bf689ac 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -5770,7 +5770,14 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr data)
break;
}
}
- else
+
+ if( ud->skillid == PR_TURNUNDEAD )
+ {
+ struct status_data *tstatus = status_get_status_data(target);
+ if( !battle_check_undead(tstatus->race, tstatus->def_ele) )
+ break;
+ }
+
if( ud->skillid == PR_LEXDIVINA || ud->skillid == MER_LEXDIVINA )
{
sc = status_get_sc(target);
@@ -5781,13 +5788,6 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr data)
}
}
else
- if( ud->skillid == PR_TURNUNDEAD )
- {
- struct status_data *tstatus = status_get_status_data(target);
- if( !battle_check_undead(tstatus->race, tstatus->def_ele) )
- break;
- }
- else
{ // Check target validity.
inf = skill_get_inf(ud->skillid);
inf2 = skill_get_inf2(ud->skillid);