Module:Items/UseTables: Difference between revisions

m
Undo revision 51304 - This change made many pages unhappy (error 1)
(_getSpellUseTable: Include Alt. Magic spells for items which said spells consume (e.g. Junk/Coal))
m (Undo revision 51304 - This change made many pages unhappy (error 1))
Tag: Undo
Line 673: Line 673:
end
end


-- TODO Doesn't include Alt. Magic spells that use particular classes of items, e.g. Junk/Coal for Rags to Riches
-- Tempory Template calling Items/SourceTables|getAltMagicTable for Junk/Coal added to respective pages. Remove after TODO is completed.
function p._getSpellUseTable(item)
function p._getSpellUseTable(item)
local spellList = Magic.getSpellsForItem(item.id, true)
local spellList = Magic.getSpellsForRune(item.id)
--Bail immediately if no spells are found
--Bail immediately if no spells are found
if Shared.tableCount(spellList) == 0 then
if Shared.tableCount(spellList) == 0 then