621
edits
(attempting to fix the math...?) |
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. | lootValue = lootValue + (dropChance * 0.01 * thisItem.sellsFor * ((row.minQuantity + row.maxQuantity)/ 2)) | ||
end | end | ||