17,101
edits
(getThievingSourcesForItem: Include type property in return value to distinguish between various sources) |
(getThievingSourcesForItem: Expose further information in return value) |
||
Line 142: | Line 142: | ||
if drop.id == itemID then | if drop.id == itemID then | ||
for k, npcID in ipairs(area.npcIDs) do | for k, npcID in ipairs(area.npcIDs) do | ||
areaNPCs[npcID] = drop.quantity | areaNPCs[npcID] = { qty = drop.quantity, area = area } | ||
end | end | ||
break | break | ||
Line 170: | Line 170: | ||
end | end | ||
local areaNPC = areaNPCs[npc.id] | |||
table.insert(resultArray, {npc = npc.name, minQty = | if areaNPC ~= nil then | ||
table.insert(resultArray, {npc = npc.name, minQty = areaNPC.qty, maxQty = areaNPC.qty, wt = SkillData.Thieving.baseAreaUniqueChance, totalWt = 100, level = npc.level, npcID = npc.id, area = areaNPC.area, type = 'areaUnique'}) | |||
end | end | ||
end | end |