* The skill ID check should only take place on parsing bonus2, bonus3, bonus4, or bonus5.
This commit is contained in:
aleos
2019-02-05 22:16:28 -05:00
parent 360cc25cc9
commit 42b71e6f6e

View File

@@ -9162,7 +9162,7 @@ BUILDIN_FUNC(bonus)
} else {
val1 = script_getnum(st, 3);
if (!skill_get_index(val1)) {
if (strcmpi(script_getfuncname(st), "bonus") && !skill_get_index(val1)) { // Only check skill ID for bonus2, bonus3, bonus4, or bonus5
ShowError("buildin_bonus: Invalid skill ID %d passed to item bonus. Skipping.\n", val1);
return SCRIPT_CMD_FAILURE;
}