summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-11-27 16:41:56 +0100
committerGitHub <noreply@github.com>2017-11-27 16:41:56 +0100
commit8850eaf84abd09bf7cfe570e09722744c64a38c1 (patch)
tree77216932d1fbbf4a9bdf22a14a48a71764bd92b6 /src/map/skill.c
parent6300a7b1dc2b09541274f46beea844ba8ecc5507 (diff)
parent631416b1c5f4540d0db35936f59cb2d3625433d3 (diff)
downloadhercules-8850eaf84abd09bf7cfe570e09722744c64a38c1.tar.gz
hercules-8850eaf84abd09bf7cfe570e09722744c64a38c1.tar.bz2
hercules-8850eaf84abd09bf7cfe570e09722744c64a38c1.tar.xz
hercules-8850eaf84abd09bf7cfe570e09722744c64a38c1.zip
Merge pull request #1914 from MishimaHaruna/skill-get-splash-areasize
Fix handling of the special case of SplashRange < 0 meaning AREA_SIZE
Diffstat (limited to 'src/map/skill.c')
-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)