892
edits
m (nil values can't be stringed) |
m (rounding the normalised value (we already have the precise denominator if we need it)) |
||
Line 170: | Line 170: | ||
local numerator = droppable[2] | local numerator = droppable[2] | ||
table.insert(itemWeights, numerator) | table.insert(itemWeights, numerator) | ||
table.insert(itemNormalised, | local norm = itemDenominator/(numerator*monster.lootChance) | ||
table.insert(itemNormalised, string.format("%.3f", norm)) | |||
table.insert(itemQtyMins, 1) | table.insert(itemQtyMins, 1) | ||
table.insert(itemQtyMaxs, droppable[3]) | table.insert(itemQtyMaxs, droppable[3]) |
edits