GetLootSlotLink

From Warcraft Wiki
Jump to navigation Jump to search
Flavors
Links
Info
Added in 1.0.0 / 1.13.2

Returns the item link for a loot slot.

itemLink = GetLootSlotLink(index)

Arguments

index
number - The index of the item in the list to retrieve info from (1 to GetNumLootItems())

Returns

itemLink
string - The itemLink for the specified item, or nil if index is invalid.

Example

The example below will display the item links into your chat window.

local linkstext = ""
for index = 1, GetNumLootItems() do
  if LootSlotHasItem(index) then
    local itemLink = GetLootSlotLink(index)
    linkstext = linkstext .. itemLink
  end
end
print(linkstext)