Anonymous

Module:Sandbox/Items/UseTables: Difference between revisions

From Melvor Idle
m
no edit summary
mNo edit summary
mNo edit summary
Line 569: Line 569:
table.insert(resultPart, '\r\n|}')
table.insert(resultPart, '\r\n|}')
end
end
local useArray = nil
local spellUseTable = p._getSpellUseTable(item)
local spellUseTable = p._getSpellUseTable(item)
if spellUseTable ~= nil and spellUseTable ~= '' then
if spellUseTable ~= nil and spellUseTable ~= '' then
Line 592: Line 591:


function p._getSpellUseTable(item)
function p._getSpellUseTable(item)
local spellList = Magic.getSpellsForRune(item.id)
local spellList = Magic.getSpellsForItem(item.id, true)
--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