318
edits
No edit summary |
No edit summary |
||
Line 778: | Line 778: | ||
end | end | ||
if not p._isDungeonOnlyMonster(monster) then | if not p._isDungeonOnlyMonster(monster) then | ||
local lootChance = monster.lootChance ~= nil and monster.lootChance or 100 | local lootChance = monster.lootChance ~= nil and monster.lootChance or 100 | ||
Line 789: | Line 788: | ||
for i, row in Shared.skpairs(monster.lootTable) do | for i, row in Shared.skpairs(monster.lootTable) do | ||
local thisItem = Items.getItemByID(row[1]) | local thisItem = Items.getItemByID(row[1]) | ||
if item['id'] == thisItem['id'] then | if item['id'] == thisItem['id'] then | ||
local dropChance = (row[2] / totalWt * lootChance) | local dropChance = (row[2] / totalWt * lootChance) | ||
mw.log(dropChance) | |||
end | end | ||
end | end | ||
return Shared.round(dropChance, 2, 2) | |||
end | end | ||
end | end | ||
edits