4,951
edits
Falterfire (talk | contribs) (fixed drop chance for normal loot) |
Falterfire (talk | contribs) (adding weights to p.getThievingSourcesForItem. Removing p.canItemBeStolen because it's not needed right now) |
||
Line 566: | Line 566: | ||
return result | return result | ||
end | end | ||
Line 653: | Line 601: | ||
end | end | ||
if dropWt > 0 then | if dropWt > 0 then | ||
table.insert(resultArray, {npc = npc.name, minQty = 1, maxQty = dropQty, | table.insert(resultArray, {npc = npc.name, minQty = 1, maxQty = dropQty, wt = dropWt * thievingNormalLootChance, totalWt = totalWt * 100, level = npc.level}) | ||
end | end | ||
--Chance of -1 on unique drops is to indicate variable chance | --Chance of -1 on unique drops is to indicate variable chance | ||
if npc.uniqueDrop ~= nil and npc.uniqueDrop.itemID == itemID then | if npc.uniqueDrop ~= nil and npc.uniqueDrop.itemID == itemID then | ||
table.insert(resultArray, {npc = npc.name, minQty = npc.uniqueDrop.qty, maxQty = npc.uniqueDrop.qty, | table.insert(resultArray, {npc = npc.name, minQty = npc.uniqueDrop.qty, maxQty = npc.uniqueDrop.qty, wt = -1, totalWt = -1, level = npc.level}) | ||
end | end | ||
if areaNPCs[npc.id] ~= nil then | if areaNPCs[npc.id] ~= nil then | ||
table.insert(resultArray, {npc = npc.name, minQty = areaNPCs[npc.id], maxQty = areaNPCs[npc.id], | table.insert(resultArray, {npc = npc.name, minQty = areaNPCs[npc.id], maxQty = areaNPCs[npc.id], wt = thievingAreaLootChance, totalWt = 100, level = npc.level}) | ||
end | end | ||
end | end | ||
Line 668: | Line 616: | ||
for i, drop in pairs(SkillData.Thieving.RareItems) do | for i, drop in pairs(SkillData.Thieving.RareItems) do | ||
if drop.itemID == itemID then | if drop.itemID == itemID then | ||
table.insert(resultArray, {npc = 'all', minQty = 1, maxQty = 1, | table.insert(resultArray, {npc = 'all', minQty = 1, maxQty = 1, wt = drop.chance, totalWt = 100, level = 1}) | ||
end | end | ||
end | end |