WoW:API LootSlotHasItem

Revision as of 16:44, 7 May 2009 by WoWWiki>Jaycyn (Created page with '=== Returns === <!-- List each return value, together with its type --> :;isLootItem : Boolean - is it a loot item instead of a coin == Example == <!-- If it helps, include an ...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 (LootSlotIsItem(i)) then
         local iteminfo = GetLootSlotLink(i);
         if itemLinkText == nil then
              itemLinkText = iteminfo
         else
              itemLinkText = itemLinkText..iteminfo
         end
    end
end
DEFAULT_CHAT_FRAME:AddMessage(itemLinkText)