diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-25 16:15:28 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-10-25 16:15:28 +0000 |
commit | 6c99413dac07e73d40d5d822592567f690857957 (patch) | |
tree | 1bc9500fc345ae76e851a8a6487a482a539e0b5d | |
parent | bbb2671566dada63d7a34616f93e66b18d91ef44 (diff) | |
download | hercules-6c99413dac07e73d40d5d822592567f690857957.tar.gz hercules-6c99413dac07e73d40d5d822592567f690857957.tar.bz2 hercules-6c99413dac07e73d40d5d822592567f690857957.tar.xz hercules-6c99413dac07e73d40d5d822592567f690857957.zip |
- Fixed "skill_sp_override_grffile: yes" causing crashes when parsing Homuncuus/Guild skills.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9069 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 4 | ||||
-rw-r--r-- | src/map/skill.c | 8 |
2 files changed, 10 insertions, 2 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index df83343bd..ee9d8a389 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,7 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/10/25
- - Made the exp bonus settings be adjustable: [Skotlex]
+ * Fixed "skill_sp_override_grffile: yes" causing crashes when parsing
+ Homuncuus/Guild skills. [Skotlex]
+ * Made the exp bonus settings be adjustable: [Skotlex]
- exp_bonus_attacker: Indicates how much additional exp a mob gives per
additional attacker (eg: 10 -> +10%*attacker)
- exp_bonus_max_attacker: Indicates at which number of attackers the bonus
diff --git a/src/map/skill.c b/src/map/skill.c index 685158283..8559581cb 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -11466,7 +11466,13 @@ static int skill_read_skillspamount (void) } else if (new_flag && sscanf(p,"%[^#]#",buf2) == 1) { for (idx=0; skill_names[idx].id != 0; idx++) { if (strstr(buf2, skill_names[idx].name) != NULL) { - skill = &skill_db[ skill_names[idx].id ]; + //Apply Guild/Homunc adjustment. + sp = skill_names[idx].id; + if (sp >= GD_SKILLBASE) sp = GD_SKILLRANGEMIN + sp - GD_SKILLBASE; + if (sp >= HM_SKILLBASE) sp = HM_SKILLRANGEMIN + sp - HM_SKILLBASE; + if (sp < 1 || sp >= MAX_SKILL_DB) + continue; + skill = &skill_db[sp]; new_flag = 0; break; } |