4,951
edits
(_getItemLootSourceTable: Add secondary sort on average quantity descending) |
Falterfire (talk | contribs) (Tweaked getCombatPassiveSlotItems to sort by item id) |
||
Line 924: | Line 924: | ||
function p.getCombatPassiveSlotItems(frame) | function p.getCombatPassiveSlotItems(frame) | ||
local | local result = '{| class="wikitable"\r\n' | ||
result = result..'|-\r\n' | |||
result = result..'!colspan="2"|Item\r\n! Passive\r\n' | |||
local itemArray = Items.getItems(function(item) return item.isPassiveItem and true or false end) | local itemArray = Items.getItems(function(item) return item.isPassiveItem and true or false end) | ||
table.sort(itemArray, function(a, b) return a.id < b.id end) | |||
for i, item in Shared.skpairs(itemArray) do | for i, item in Shared.skpairs(itemArray) do | ||
result = result..'|-\r\n' | |||
result = result..'! '..Icons.Icon({item.name, type='item', notext='true'})..'\r\n! [['..item.name..']]\r\n' | |||
result = result..'| '..item.description..'\r\n' | |||
end | end | ||
result = result..'|}' | |||
return | return result | ||
end | end | ||
return p | return p |