summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-11-26 00:33:33 +0100
committerHaru <haru@dotalux.com>2017-11-26 00:33:33 +0100
commit631416b1c5f4540d0db35936f59cb2d3625433d3 (patch)
tree77216932d1fbbf4a9bdf22a14a48a71764bd92b6
parent6300a7b1dc2b09541274f46beea844ba8ecc5507 (diff)
downloadhercules-631416b1c5f4540d0db35936f59cb2d3625433d3.tar.gz
hercules-631416b1c5f4540d0db35936f59cb2d3625433d3.tar.bz2
hercules-631416b1c5f4540d0db35936f59cb2d3625433d3.tar.xz
hercules-631416b1c5f4540d0db35936f59cb2d3625433d3.zip
Fix handling of the special case of SplashRange < 0 meaning AREA_SIZE
This restores the behavior that was broken in 2b4bfa5d0. Fixes #1911 Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r--src/map/skill.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 1bf1880e8..88a29b9a8 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -231,17 +231,20 @@ int skill_get_range(int skill_id, int skill_lv)
int skill_get_splash(int skill_id, int skill_lv)
{
- int idx;
+ int idx, val;
if (skill_id == 0)
return 0;
idx = skill->get_index(skill_id);
Assert_ret(idx != 0);
Assert_ret(skill_lv > 0);
+ val = skill->dbs->db[idx].splash[skill_get_lvl_idx(skill_lv)];
+ if (val < 0) {
+ val = AREA_SIZE;
+ }
if (skill_lv > MAX_SKILL_LEVEL) {
- int val = skill->dbs->db[idx].splash[skill_get_lvl_idx(skill_lv)];
return skill_adjust_over_level(val, skill_lv, skill->dbs->db[idx].max);
}
- return skill->dbs->db[idx].splash[skill_get_lvl_idx(skill_lv)];
+ return val;
}
int skill_get_hp(int skill_id, int skill_lv)