WoW:API GetLootSlotLink: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
(upgraded deprecated template)
Line 1: Line 1:
{{wowapi}}
Returns loot slot items link for input into chat frames or any textual display.
Returns loot slot items link for input into chat frames or any textual display.
The example below will insert the items link into your chat text box while you're typing.  Note, this obviously doesn't work with Macro's as they clear your chat buffer.
The example below will insert the items link into your chat text box while you're typing.  Note, this obviously doesn't work with Macro's as they clear your chat buffer.
Line 7: Line 8:
         ChatFrameEditBox:Insert(iteminfo);
         ChatFrameEditBox:Insert(iteminfo);
       end
       end
     end  
     end
 
 
{{Template:WoW API}}

Revision as of 18:08, 6 January 2007

WoW API < GetLootSlotLink

Returns loot slot items link for input into chat frames or any textual display. The example below will insert the items link into your chat text box while you're typing. Note, this obviously doesn't work with Macro's as they clear your chat buffer.

   for index = 1, GetNumLootItems(), 1 do
     if (LootSlotIsItem(index)) then
       local iteminfo = GetLootSlotLink(index);
       ChatFrameEditBox:Insert(iteminfo);
     end
   end