17,105
edits
(Handle new scope source ID 'melvorD:CombatArea') |
(Fix for change in AttackSpell scope source ID) |
||
Line 388: | Line 388: | ||
-- affect certain categories of spells | -- affect certain categories of spells | ||
local scopeSourceID, scopeSourceData = scopeDefn.scopeSource or scopeData.skillID, nil | local scopeSourceID, scopeSourceData = scopeDefn.scopeSource or scopeData.skillID, nil | ||
if scopeSourceID == 'AttackSpell' then | if scopeSourceID == 'melvorD:AttackSpell' then | ||
-- Uses spell categories, contained within magic skill data | -- Uses spell categories, contained within magic skill data | ||
scopeSourceData = GameData.skillData.Magic | scopeSourceData = GameData.skillData.Magic | ||
Line 438: | Line 438: | ||
end | end | ||
local catKey = ( | local catKey = ( | ||
(scopeSourceID == 'AttackSpell' and 'spellCategories') | (scopeSourceID == 'melvorD:AttackSpell' and 'spellCategories') | ||
or (scopeSourceID == 'melvorD:CombatArea' and 'combatAreaCategories') | or (scopeSourceID == 'melvorD:CombatArea' and 'combatAreaCategories') | ||
or (scopeSourceID == 'melvorD:Thieving' and 'areas') | or (scopeSourceID == 'melvorD:Thieving' and 'areas') | ||
Line 473: | Line 473: | ||
if scopeSourceData == nil then | if scopeSourceData == nil then | ||
error('Scope source data is required for scope type ' .. tKey, 2) | error('Scope source data is required for scope type ' .. tKey, 2) | ||
elseif scopeSourceID == 'AttackSpell' then | elseif scopeSourceID == 'melvorD:AttackSpell' then | ||
subcategory = GameData.getEntityByID(scopeSourceData.spellCategories, v) | subcategory = GameData.getEntityByID(scopeSourceData.spellCategories, v) | ||
else | else |