17,097
edits
mNo edit summary |
mNo edit summary |
||
Line 171: | Line 171: | ||
table.insert(resultPart, '\r\n!style="padding:0 1em 0 0.5em;"|Sources') | table.insert(resultPart, '\r\n!style="padding:0 1em 0 0.5em;"|Sources') | ||
table.sort(itemList, function(a, b) return a.id < b.id end) | table.sort(itemList, function(a, b) return a.id < b.id end) | ||
for i, item in pairs(itemList) do | for i, item in pairs(itemList) do | ||
if isWeaponType then | if isWeaponType then | ||
--Building rows for weapons | --Building rows for weapons | ||
Line 194: | Line 178: | ||
table.insert(resultPart, '\r\n|style ="text-align: left;padding: 0 0 0 0;"|'..Icons.Icon({item.name, type='item', size=50, notext=true})) | table.insert(resultPart, '\r\n|style ="text-align: left;padding: 0 0 0 0;"|'..Icons.Icon({item.name, type='item', size=50, notext=true})) | ||
table.insert(resultPart, '\r\n|style ="text-align: left;padding: 0 0.5em 0 0.5em;"|[['..item.name..']]') | table.insert(resultPart, '\r\n|style ="text-align: left;padding: 0 0.5em 0 0.5em;"|[['..item.name..']]') | ||
table.insert(resultPart, '\r\n| style ="text-align: right;padding: 0 0.5em 0 0;" |'..Shared.formatnum( | table.insert(resultPart, '\r\n| style ="text-align: right;padding: 0 0.5em 0 0;" |'..Shared.formatnum(Items._getItemStat(item, 'attackSpeed'))) | ||
--That's the first list out of the way, now for 2-Handed | --That's the first list out of the way, now for 2-Handed | ||
table.insert(resultPart, '\r\n| style ="text-align: right;"|') | table.insert(resultPart, '\r\n| style ="text-align: right;"|') | ||
table.insert(resultPart, Items._getItemStat(item, 'isTwoHanded') and 'Yes' or 'No') | table.insert(resultPart, Items._getItemStat(item, 'isTwoHanded') and 'Yes' or 'No') | ||
for j, statName in pairs(statColumns) do | for j, statName in pairs(statColumns) do | ||
local statValue = | local statValue = Items._getItemStat(item, statName) | ||
table.insert(resultPart, '\r\n| style ="text-align: right;padding: 0 0.5em 0 0;') | table.insert(resultPart, '\r\n| style ="text-align: right;padding: 0 0.5em 0 0;') | ||
if string.find(statName, '^(.+)LevelRequired$') == nil then | if string.find(statName, '^(.+)LevelRequired$') == nil then | ||
Line 230: | Line 214: | ||
table.insert(resultPart, '\r\n|style ="text-align: left;padding: 0 0.5em 0 0.5em;"|[['..item.name..']]') | table.insert(resultPart, '\r\n|style ="text-align: left;padding: 0 0.5em 0 0.5em;"|[['..item.name..']]') | ||
for j, statName in pairs(statColumns) do | for j, statName in pairs(statColumns) do | ||
local statValue = | local statValue = Items._getItemStat(item, statName) | ||
table.insert(resultPart, '\r\n| style ="text-align: right;padding: 0 0.5em 0 0;') | table.insert(resultPart, '\r\n| style ="text-align: right;padding: 0 0.5em 0 0;') | ||
if statValue > 0 then | if statValue > 0 then |