diff options
author | Haru <haru@dotalux.com> | 2015-05-24 02:09:21 +0200 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2015-05-24 02:09:21 +0200 |
commit | b2e53cca3b50f8daef0cb1f9f44d3d8989ea8d4a (patch) | |
tree | 0f6fc7dd80f517cabe3f4034fdd8632bb0d7215f | |
parent | df24cb3220fcbb8c43d258656de10a92f53018a0 (diff) | |
download | hercules-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>
-rw-r--r-- | src/map/skill.c | 7 |
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; |