summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt4
-rw-r--r--src/map/skill.c8
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;
}