Module:ItemsByStat: Difference between revisions

mNo edit summary
mNo edit summary
Line 31: Line 31:
local tableData = selectByStat(stat)
local tableData = selectByStat(stat)
local outString = '{| class="wikitable sortable"\n|-\n!Item!!Tier!!Cost!!Slot!!Value\n'
local outString = '{| class="wikitable sortable"\n|-\n!Item!!Tier!!Cost!!Slot!!Value\n'
local display = frame:ExpandTemplate{title='ItemIcon',args = {tableData[1][i]}}
for i=1,#tableData[1] do
for i=1,#tableData[1] do
outString = outString..'|-style="background:'..colorBySlot[tableData[4][i]]..'"\n|'..display.."||"..tableData[2][i].."||"..tableData[3][i].."||"..tableData[5][i].."\n"
outString = outString..'|-style="background:'..colorBySlot[tableData[4][i]]..'"\n|'..tableData[1][i].."||"..tableData[2][i].."||"..tableData[3][i].."||"..tableData[5][i].."\n"
end
end
return outString.."|}"
return outString.."|}"