WoW:API GetLootSlotLink: Difference between revisions
Jump to navigation
Jump to search
(upgraded deprecated template) |
No edit summary |
||
Line 1: | Line 1: | ||
{{wowapi}} | {{wowapi}} | ||
Retrieves the [[itemLink]] of one item in the current loot window. | |||
"itemLink" = GetLootSlotLink(index) | |||
== Argument == | |||
:(index) | |||
:;index : Number - The index of the item in the list to retrieve info from (1 to GetNumLootItems()) | |||
== Returns == | |||
:;"itemLink" : [[itemLink]] - The itemLink for the specified item or | |||
:: nil, if index is invalid. | |||
== Example == | |||
The example below will display the item links into your chat window. | |||
local linkstext | |||
for index = 1, GetNumLootItems() do | |||
if (LootSlotIsItem(index)) then | if (LootSlotIsItem(index)) then | ||
local iteminfo = GetLootSlotLink(index); | local iteminfo = GetLootSlotLink(index); | ||
if linkstext == nil then | |||
linkstext = iteminfo | |||
else | |||
linkstext = linkstext..iteminfo | |||
end | |||
end | end | ||
end | end | ||
DEFAULT_CHAT_FRAME:AddMessage(linkstext) |
Revision as of 07:28, 21 June 2008
Retrieves the itemLink of one item in the current loot window.
"itemLink" = GetLootSlotLink(index)
Argument
- (index)
- index
- Number - The index of the item in the list to retrieve info from (1 to GetNumLootItems())
Returns
- "itemLink"
- itemLink - The itemLink for the specified item or
- nil, if index is invalid.
Example
The example below will display the item links into your chat window.
local linkstext for index = 1, GetNumLootItems() do if (LootSlotIsItem(index)) then local iteminfo = GetLootSlotLink(index); if linkstext == nil then linkstext = iteminfo else linkstext = linkstext..iteminfo end end end DEFAULT_CHAT_FRAME:AddMessage(linkstext)