WoW:API LootSlotHasItem: Difference between revisions
Jump to navigation
Jump to search
(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 ...') |
m (Added Stub/API template) |
||
Line 1: | Line 1: | ||
{{Stub/API}} | |||
=== Returns === | === Returns === | ||
<!-- List each return value, together with its type --> | <!-- List each return value, together with its type --> | ||
Line 19: | Line 20: | ||
end | end | ||
DEFAULT_CHAT_FRAME:AddMessage(itemLinkText) | DEFAULT_CHAT_FRAME:AddMessage(itemLinkText) | ||
[[Category:World of Warcraft API]] |
Revision as of 05:37, 2 July 2009
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)