summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2015-05-24 02:09:21 +0200
committerHaru <haru@dotalux.com>2015-05-24 02:09:21 +0200
commitb2e53cca3b50f8daef0cb1f9f44d3d8989ea8d4a (patch)
tree0f6fc7dd80f517cabe3f4034fdd8632bb0d7215f /src/map/skill.c
parentdf24cb3220fcbb8c43d258656de10a92f53018a0 (diff)
downloadhercules-b2e53cca3b50f8daef0cb1f9f44d3d8989ea8d4a.tar.gz
hercules-b2e53cca3b50f8daef0cb1f9f44d3d8989ea8d4a.tar.bz2
hercules-b2e53cca3b50f8daef0cb1f9f44d3d8989ea8d4a.tar.xz
hercules-b2e53cca3b50f8daef0cb1f9f44d3d8989ea8d4a.zip
Corrected a skill level check
- Caused by yet another overwritten variable, this time from 61135037. - This fixes some of the failed assertions from bug 8672 http://hercules.ws/board/index.php?app=tracker&showissue=8672 - Special thanks to csnv. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 48dfebe2b..58dbe2472 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -14734,8 +14734,11 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16
fixcast_r = max(fixcast_r, sc->data[SC_DANCE_WITH_WUG]->val4);
if( sc->data[SC_SECRAMENT] )
fixcast_r = max(fixcast_r, sc->data[SC_SECRAMENT]->val2);
- if( sd && ( skill_lv = pc->checkskill(sd, WL_RADIUS) ) && (skill_id >= WL_WHITEIMPRISON && skill_id < WL_FREEZE_SP) )
- fixcast_r = max(fixcast_r, (status_get_int(bl) + status->get_lv(bl)) / 15 + skill_lv * 5); // [{(Caster?s INT / 15) + (Caster?s Base Level / 15) + (Radius Skill Level x 5)}] %
+ if (sd && skill_id >= WL_WHITEIMPRISON && skill_id < WL_FREEZE_SP) {
+ int radius_lv = pc->checkskill(sd, WL_RADIUS);
+ if (radius_lv)
+ fixcast_r = max(fixcast_r, (status_get_int(bl) + status->get_lv(bl)) / 15 + radius_lv * 5); // [{(Caster?s INT / 15) + (Caster?s Base Level / 15) + (Radius Skill Level x 5)}] %
+ }
// Fixed cast non percentage bonuses
if( sc->data[SC_MANDRAGORA] )
fixed += sc->data[SC_MANDRAGORA]->val1 * 500;