WoW:API LootSlotHasItem: Difference between revisions
Jump to navigation
Jump to search
m (Added Stub/API template) |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{ | {{wowapi}} | ||
== Parameters == | |||
=== Arguments === | |||
:;slot : number - the loot slot. | |||
=== Returns === | === Returns === | ||
<!-- List each return value, together with its type --> | <!-- List each return value, together with its type --> | ||
:;isLootItem : | :;isLootItem : boolean - is it a loot item instead of a coin | ||
== Example == | == Example == | ||
| Line 20: | Line 25: | ||
end | end | ||
DEFAULT_CHAT_FRAME:AddMessage(itemLinkText) | DEFAULT_CHAT_FRAME:AddMessage(itemLinkText) | ||
== Notes == | |||
* Renamed from LootSlotIsItem in 5.0.4 | |||
[[Category:World of Warcraft API]] | [[Category:World of Warcraft API]] | ||
Revision as of 19:21, 15 January 2015
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 (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)
Notes
- Renamed from LootSlotIsItem in 5.0.4