summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-05 14:15:15 +0000
committerglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-12-05 14:15:15 +0000
commita6a7512d138abf322b48f16ba4dbb583e614d5b9 (patch)
treeff6e8b47f397e3fe242e94d2f12fe951e4814caa /src/map
parent4d0d981ae30ca3b643e8727e2e5087b957e5d27a (diff)
downloadhercules-a6a7512d138abf322b48f16ba4dbb583e614d5b9.tar.gz
hercules-a6a7512d138abf322b48f16ba4dbb583e614d5b9.tar.bz2
hercules-a6a7512d138abf322b48f16ba4dbb583e614d5b9.tar.xz
hercules-a6a7512d138abf322b48f16ba4dbb583e614d5b9.zip
- Re-committed r16984 (pid:161281).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@17000 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map')
-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 )