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.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 7815bbe5e..2fe20e2ec 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -9361,7 +9361,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
if (!sd || sd->skillitem != ud->skillid || skill_get_delay(ud->skillid,ud->skilllv))
ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv); //Tests show wings don't overwrite the delay but skill scrolls do. [Inkfish]
- if (sd && skill_get_cooldown(ud->skillid,ud->skilllv) > 0) {
+ if (sd) { //Cooldown application
int i, cooldown = skill_get_cooldown(ud->skillid, ud->skilllv);
for (i = 0; i < ARRAYLENGTH(sd->skillcooldown) && sd->skillcooldown[i].id; i++) { // Increases/Decreases cooldown of a skill by item/card bonuses.
if (sd->skillcooldown[i].id == ud->skillid) {
@@ -9369,7 +9369,8 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
break;
}
}
- skill_blockpc_start(sd, ud->skillid, cooldown);
+ if(cooldown)
+ skill_blockpc_start(sd, ud->skillid, cooldown);
}
if (battle_config.display_status_timers && sd)
clif_status_change(src, SI_ACTIONDELAY, 1, skill_delayfix(src, ud->skillid, ud->skilllv), 0, 0, 0);
@@ -9582,7 +9583,7 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data)
if (!sd || sd->skillitem != ud->skillid || skill_get_delay(ud->skillid,ud->skilllv))
ud->canact_tick = tick + skill_delayfix(src, ud->skillid, ud->skilllv);
- if (sd && skill_get_cooldown(ud->skillid,ud->skilllv) > 0) {
+ if (sd) { //Cooldown application
int i, cooldown = skill_get_cooldown(ud->skillid, ud->skilllv);
for (i = 0; i < ARRAYLENGTH(sd->skillcooldown) && sd->skillcooldown[i].id; i++) { // Increases/Decreases cooldown of a skill by item/card bonuses.
if (sd->skillcooldown[i].id == ud->skillid) {
@@ -9590,7 +9591,8 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data)
break;
}
}
- skill_blockpc_start(sd, ud->skillid, cooldown);
+ if(cooldown)
+ skill_blockpc_start(sd, ud->skillid, cooldown);
}
if (battle_config.display_status_timers && sd)
clif_status_change(src, SI_ACTIONDELAY, 1, skill_delayfix(src, ud->skillid, ud->skilllv), 0, 0, 0);