Module:Items/UseTables: Difference between revisions

Now pulls spell runes from Magic.getSpellRunes
(Moved getSpellRunes to Magic.)
(Now pulls spell runes from Magic.getSpellRunes)
Line 503: Line 503:
     end
     end
     rowTxt = rowTxt..'||style="text-align:center"|'
     rowTxt = rowTxt..'||style="text-align:center"|'
     for i, req in pairs(spell.runesRequired) do
     rowTxt = rowTxt..Magic._getSpellRunes(spell)
      local rune = Items.getItemByID(req.id)
      if i > 1 then rowTxt = rowTxt..', ' end
      rowTxt = rowTxt..Icons.Icon({rune.name, type='item', notext=true, qty=req.qty})
    end
    if spell.runesRequiredAlt ~= nil then
      rowTxt = rowTxt.."<br/>'''OR'''<br/>"
      for i, req in pairs(spell.runesRequiredAlt) do
        local rune = Items.getItemByID(req.id)
        if i > 1 then rowTxt = rowTxt..', ' end
        rowTxt = rowTxt..Icons.Icon({rune.name, type='item', notext=true, qty=req.qty})
      end
    end
     result = result..rowTxt
     result = result..rowTxt
   end
   end