3
edits
(Added Barrier Dust drops to 'Always Drops') |
(Add column name for average healing) |
||
(One intermediate revision by the same user not shown) | |||
Line 1,220: | Line 1,220: | ||
result = result..'\r\n{|class="wikitable sortable"' | result = result..'\r\n{|class="wikitable sortable"' | ||
result = result..'\r\n!Item!!Qty' | result = result..'\r\n!Item!!Qty' | ||
result = result..'!!colspan="2"|Chance!!Price' .. (isAllFood and '!!Healing' or '') | result = result..'!!colspan="2"|Chance!!Price' .. (isAllFood and '!!Healing!!Avg. Healing' or '') | ||
--Sort the loot table by weight in descending order | --Sort the loot table by weight in descending order | ||
Line 1,247: | Line 1,247: | ||
local hp = thisItem.healsFor * 10 | local hp = thisItem.healsFor * 10 | ||
local minHeal, maxHeal = hp * row.minQuantity, hp * row.maxQuantity | local minHeal, maxHeal = hp * row.minQuantity, hp * row.maxQuantity | ||
local avgHpPerLoot = (dropChance * 0.01 * (minHeal + maxHeal) / 2) | |||
foodValue = foodValue + avgHpPerLoot | |||
result = result .. '||data-sort-value="' .. thisItem.healsFor .. '"' | result = result .. '||data-sort-value="' .. thisItem.healsFor .. '"' | ||
result = result .. '|' .. Icons.Icon({'Hitpoints', type='skill', notext=true, nolink=true}) .. ' ' .. formatNumRange(minHeal, maxHeal) | result = result .. '|' .. Icons.Icon({'Hitpoints', type='skill', notext=true, nolink=true}) .. ' ' .. formatNumRange(minHeal, maxHeal) | ||
result = result .. '||data-sort-value="' .. avgHpPerLoot .. '"' | |||
result = result .. '|' .. Icons.Icon({'Hitpoints', type='skill', notext=true, nolink=true}) .. ' ' .. Shared.round(avgHpPerLoot, 2, 0) | |||
end | end | ||
end | end |
edits