diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/pc.c | 10 | ||||
-rw-r--r-- | src/map/pc.h | 2 | ||||
-rw-r--r-- | src/map/skill.c | 8 |
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] ) |