Automated updating of API pages at this location, to reflect patch changes, has ceased from 10.1.7 onwards. |
Returns information about the source of the objects in a loot slot.
guid, quantity, ... = GetLootSourceInfo(lootSlot)
Arguments[]
- lootSlot
- number - index of the loot slot, ascending from 1 up to GetNumLootItems()
Returns[]
(Variable returns: guid1, quantity1, guid2, quantity2, ...
)
Example[]
Prints out the source guid and quantity of each loot source item individually.
local function OnEvent(self, event)
for i = 1, GetNumLootItems() do
local sources = {GetLootSourceInfo(i)}
local _, name = GetLootSlotInfo(i)
for j = 1, #sources, 2 do
print(i, name, j, sources[j], sources[j+1])
end
end
end
local f = CreateFrame("Frame")
f:RegisterEvent("LOOT_OPENED")
f:SetScript("OnEvent", OnEvent)
Patch changes[]
Patch 5.0.4 (2012-08-28): Added.