summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorkenpachi2k11 <kenpachi2k11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-21 22:15:28 +0000
committerkenpachi2k11 <kenpachi2k11@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-07-21 22:15:28 +0000
commit653ba172167466374794140277e34969ae544eaf (patch)
treef3ed3c317454c35609fdaca79245fc1243a5c778 /src/map/skill.c
parentee6ca5d682f79c8946fa778802cd709f1110f7fb (diff)
downloadhercules-653ba172167466374794140277e34969ae544eaf.tar.gz
hercules-653ba172167466374794140277e34969ae544eaf.tar.bz2
hercules-653ba172167466374794140277e34969ae544eaf.tar.xz
hercules-653ba172167466374794140277e34969ae544eaf.zip
Renamed bUseSPrateSkill to bSkillUseSPrate.
Added bSkillUseSP. Added documentation for bSkillUseSPrate(bUseSPrateSkill), bSkillUseSP, bSkillCooldown, bSkillFixedCast, bSkillVariableCast, bSkillFixedCast and bVariableCastrate. (bugreport:6193) Fixed Enriched White PotionZs (#12428) and Enrich Celermine Juices (#12437) bonus script. (bugreport:5790) Fixed Mental Sticks (#1654) bonus script. (bugreport:6071) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16466 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 3c99dc74a..006018d47 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -12794,10 +12794,13 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, short
req.sp += (status->max_sp * (-sp_rate))/100;
if( sd->dsprate != 100 )
req.sp = req.sp * sd->dsprate / 100;
-
- ARR_FIND(0, ARRAYLENGTH(sd->sprateskill), i, sd->sprateskill[i].id == skill);
- if( i < ARRAYLENGTH(sd->sprateskill) )
- sp_skill_rate_bonus += sd->sprateskill[i].val;
+
+ ARR_FIND(0, ARRAYLENGTH(sd->skillusesprate), i, sd->skillusesprate[i].id == skill);
+ if( i < ARRAYLENGTH(sd->skillusesprate) )
+ sp_skill_rate_bonus += sd->skillusesprate[i].val;
+ ARR_FIND(0, ARRAYLENGTH(sd->skillusesp), i, sd->skillusesp[i].id == skill);
+ if( i < ARRAYLENGTH(sd->skillusesp) )
+ req.sp -= sd->skillusesp[i].val;
req.sp = cap_value(req.sp * sp_skill_rate_bonus / 100, 0, SHRT_MAX);