summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authormarkzd <markzd@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-29 22:38:26 +0000
committermarkzd <markzd@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-29 22:38:26 +0000
commit98e452dbcb1f120c744b88209eeb41b133c1d57b (patch)
tree3e694fb5de10833bfb2aea935857a3e1139e3c8f /src/map/skill.c
parentbbc0d98442fa9019ace74103a30389eea614e73e (diff)
downloadhercules-98e452dbcb1f120c744b88209eeb41b133c1d57b.tar.gz
hercules-98e452dbcb1f120c744b88209eeb41b133c1d57b.tar.bz2
hercules-98e452dbcb1f120c744b88209eeb41b133c1d57b.tar.xz
hercules-98e452dbcb1f120c744b88209eeb41b133c1d57b.zip
* Fixed bugreport:6942 where bSkillCooldown was not applying to skills.
* Fixed some grammar typos in pc.c git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16984 54d463be-8e91-2dee-dedb-b68131a5f0ec
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);