summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-12 03:59:24 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-12 03:59:24 +0000
commit4d8a1ca7adcd8a837e5b78e7b1740c94a082ad78 (patch)
tree37f6793621e32b38c845d3fccf8b0652e4aa2556 /src/map/skill.c
parent8f5a2dddd09352b8618fbec8c4f4d9934601bec2 (diff)
downloadhercules-4d8a1ca7adcd8a837e5b78e7b1740c94a082ad78.tar.gz
hercules-4d8a1ca7adcd8a837e5b78e7b1740c94a082ad78.tar.bz2
hercules-4d8a1ca7adcd8a837e5b78e7b1740c94a082ad78.tar.xz
hercules-4d8a1ca7adcd8a837e5b78e7b1740c94a082ad78.zip
Fixed bugreport:5994 misuse of inline against msvc standards (and inline was pointless there too. thought it'd be used elsewhere, not the case).
Blame on r16273 git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16274 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index a273a245b..55c11f80d 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -12700,7 +12700,7 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, short
struct skill_condition req;
struct status_data *status;
struct status_change *sc;
- int i,j,hp_rate,sp_rate;
+ int i,j,hp_rate,sp_rate, sp_skill_rate_bonus = 100;
memset(&req,0,sizeof(req));
@@ -12750,7 +12750,11 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, short
if( sd->dsprate != 100 )
req.sp = req.sp * sd->dsprate / 100;
- req.sp = cap_value(req.sp * pc_sp_rate_skill(sd,skill) / 100, 0, SHRT_MAX);
+ 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;
+
+ req.sp = cap_value(req.sp * sp_skill_rate_bonus / 100, 0, SHRT_MAX);
if( sc ) {
if( sc->data[SC__LAZINESS] )