diff options
author | Haru <haru@dotalux.com> | 2017-11-05 21:13:14 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2017-11-05 21:13:14 +0100 |
commit | 3edcd549cee863ecc8a2a96dfb5bbb56d435d97a (patch) | |
tree | c08ceaa38363344110bb0d2b7b4e556e3a88c436 /src/char | |
parent | 09d5c20572424e7a92dff5cf560001278c6ffaa0 (diff) | |
download | hercules-3edcd549cee863ecc8a2a96dfb5bbb56d435d97a.tar.gz hercules-3edcd549cee863ecc8a2a96dfb5bbb56d435d97a.tar.bz2 hercules-3edcd549cee863ecc8a2a96dfb5bbb56d435d97a.tar.xz hercules-3edcd549cee863ecc8a2a96dfb5bbb56d435d97a.zip |
Fix/clarify various incorrect modulo operations
Most relevantly, `skill_lv%11 - 1` is not a valid skill item
requirement index, since it can return -1 depending on the skill_lv. It
was replaced with `(skill_lv - 1) % MAX_SKILL_ITEM_REQUIRE`, which
always returns a value in the 0 ~ MAX_SKILL_ITEM_REQUIRE range.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/char')
0 files changed, 0 insertions, 0 deletions