Module:Skills/Archaeology: Difference between revisions

Undo revision 64450 by BasChana (talk)
(attempting to fix the math...?)
(Undo revision 64450 by BasChana (talk))
Tag: Undo
Line 104: Line 104:
local fmt = (dropChance < 0.10 and '%.2g') or '%.2f'
local fmt = (dropChance < 0.10 and '%.2g') or '%.2f'
table.insert(result, 'style="text-align:right"|'..string.format(fmt, dropChance * 100)..'%')
table.insert(result, 'style="text-align:right"|'..string.format(fmt, dropChance * 100)..'%')
lootValue = lootValue + (dropChance * 0.01 * thisItem.itemPrice * ((row.minQuantity + row.maxQuantity)/ 2))
lootValue = lootValue + (dropChance * 0.01 * thisItem.sellsFor * ((row.minQuantity + row.maxQuantity)/ 2))
end
end