WoW:API LootSlotHasItem: Difference between revisions

m
Move page script moved page API LootSlotHasItem to WoW:API LootSlotHasItem without leaving a redirect
(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 (Move page script moved page API LootSlotHasItem to WoW:API LootSlotHasItem without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
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 : Boolean - is it a loot item instead of a coin
:;isLootItem : boolean - is it a loot item instead of a coin


== Example ==
== Example ==
Line 9: Line 15:
  local itemLinkText
  local itemLinkText
  for i = 1, GetNumLootItems() do
  for i = 1, GetNumLootItems() do
     if (LootSlotIsItem(i)) then
     if (LootSlotHasItem(i)) then
           local iteminfo = GetLootSlotLink(i);
           local iteminfo = GetLootSlotLink(i);
           if itemLinkText == nil then
           if itemLinkText == nil then
Line 19: 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]]
Anonymous user