WoW API: LootSlotHasItem

From AddOn Studio
Revision as of 04:46, 15 August 2023 by Move page script (talk | contribs) (Move page script moved page API LootSlotHasItem to API LootSlotHasItem without leaving a redirect)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

WoW API < LootSlotHasItem

Parameters

Arguments

slot
number - the loot slot.

Returns

isLootItem
boolean - is it a loot item instead of a coin

Example

Iterate through the items in the currently opened loot window an display them in the chat frame, side by side.

local itemLinkText
for i = 1, GetNumLootItems() do
    if (LootSlotHasItem(i)) then
         local iteminfo = GetLootSlotLink(i);
         if itemLinkText == nil then
              itemLinkText = iteminfo
         else
              itemLinkText = itemLinkText..iteminfo
         end
    end
end
DEFAULT_CHAT_FRAME:AddMessage(itemLinkText)

Notes

  • Renamed from LootSlotIsItem in 5.0.4