summaryrefslogtreecommitdiff
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
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
-rw-r--r--src/map/pc.c10
-rw-r--r--src/map/pc.h2
-rw-r--r--src/map/skill.c8
3 files changed, 6 insertions, 14 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index b7f4a965e..26f60c0af 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -6098,16 +6098,6 @@ int pc_skillatk_bonus(struct map_session_data *sd, int skill_num)
return bonus;
}
-inline int pc_sp_rate_skill(struct map_session_data *sd, int skill_num) {
- int i, bonus = 100;
-
- ARR_FIND(0, ARRAYLENGTH(sd->sprateskill), i, sd->sprateskill[i].id == skill_num);
- if( i < ARRAYLENGTH(sd->sprateskill) )
- bonus += sd->sprateskill[i].val;
-
- return bonus;
-}
-
int pc_skillheal_bonus(struct map_session_data *sd, int skill_num) {
int i, bonus = sd->bonus.add_heal_rate;
diff --git a/src/map/pc.h b/src/map/pc.h
index 418f59b9e..ba6f73d17 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -907,6 +907,4 @@ void pc_overheat(struct map_session_data *sd, int val);
int pc_banding(struct map_session_data *sd, short skill_lv);
void pc_itemcd_do(struct map_session_data *sd, bool load);
-
-inline int pc_sp_rate_skill(struct map_session_data *sd, int skill_num);
#endif /* _PC_H_ */
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] )