summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index f81053c3d..8f5df51a2 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -9237,7 +9237,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){
@@ -9245,6 +9245,7 @@ int skill_castend_id(int tid, unsigned int tick, int id, intptr_t data)
break;
}
}
+ if(cooldown)
skill_blockpc_start(sd, ud->skillid, cooldown);
}
if( battle_config.display_status_timers && sd )
@@ -9466,7 +9467,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){
@@ -9474,6 +9475,7 @@ int skill_castend_pos(int tid, unsigned int tick, int id, intptr_t data)
break;
}
}
+ if(cooldown)
skill_blockpc_start(sd, ud->skillid, cooldown);
}
if( battle_config.display_status_timers && sd )