WoW:API LootSlotHasItem: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
m (Move page script moved page API LootSlotHasItem to API LootSlotHasItem without leaving a redirect) |
||
(One intermediate revision by one other user not shown) | |||
Line 15: | Line 15: | ||
local itemLinkText | local itemLinkText | ||
for i = 1, GetNumLootItems() do | for i = 1, GetNumLootItems() do | ||
if ( | if (LootSlotHasItem(i)) then | ||
local iteminfo = GetLootSlotLink(i); | local iteminfo = GetLootSlotLink(i); | ||
if itemLinkText == nil then | if itemLinkText == nil then |
Latest revision as of 04:46, 15 August 2023
Parameters[edit]
Arguments[edit]
- slot
- number - the loot slot.
Returns[edit]
- isLootItem
- boolean - is it a loot item instead of a coin
Example[edit]
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[edit]
- Renamed from LootSlotIsItem in 5.0.4