17,101
edits
(_getSpellRequirements: Refactor) |
(_getSpellRequirements: Fix regressions) |
||
Line 144: | Line 144: | ||
{ ['type'] = 'SkillLevel', ['skillID'] = 'melvorD:Magic', ['level'] = spell.level } | { ['type'] = 'SkillLevel', ['skillID'] = 'melvorD:Magic', ['level'] = spell.level } | ||
} | } | ||
if spell. | if spell.requiredItemID ~= nil then | ||
table.insert(extraReqs, { ['type'] = 'SlayerItem', ['itemID'] = spell. | table.insert(extraReqs, { ['type'] = 'SlayerItem', ['itemID'] = spell.requiredItemID }) | ||
end | end | ||
local resultPart = {} | local resultPart = {} | ||
for i, reqs in ipairs({ extraReqs, spell.requirements }) do | for i, reqs in ipairs({ extraReqs, spell.requirements }) do | ||
local reqStr = Common.getRequirementString( | local reqStr = Common.getRequirementString(reqs) | ||
if reqStr ~= nil then | if reqStr ~= nil then | ||
table.insert(resultPart, reqStr) | table.insert(resultPart, reqStr) |