17,101
edits
(_getSpellStat: Remove reference to undeclared var) |
(_getSpellTemplateData: Fix for AoD spells which produce bone items) |
||
Line 238: | Line 238: | ||
else | else | ||
local itemProduced = Items.getItemByID(spell.produces) | local itemProduced = Items.getItemByID(spell.produces) | ||
if itemProduced ~= nil and itemProduced.prayerPoints ~= nil and type(spell.fixedItemCosts) == 'table' then | local spellNS, spellLocalID = GameData.getLocalID(spell.id) | ||
-- Item produced is a bone | if itemProduced ~= nil and itemProduced.prayerPoints ~= nil and type(spell.fixedItemCosts) == 'table' and Shared.tableCount(spell.fixedItemCosts) == 1 and spellNS ~= 'melvorAoD' then | ||
-- Item produced is a bone and spell is not from AoD (logic from altMagic.js) | |||
local costItem = Items.getItemByID(spell.fixedItemCosts[1].id) | local costItem = Items.getItemByID(spell.fixedItemCosts[1].id) | ||
if costItem ~= nil then | if costItem ~= nil then |