WoW:API GetMerchantItemLink: Difference between revisions

Link to ItemLink rather than local example, itemlinks are somwhat volatile
m (cat)
(Link to ItemLink rather than local example, itemlinks are somwhat volatile)
Line 1: Line 1:
<center>'''GetMerchantItemLink''' ''-Documentation by [[user:Fenaoin|Fenaoin]]-''</center>
{{wowapi}} __NOTOC__
 
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
 
Returns a link to the indexed item in the merchant's inventory.
Returns a link to the indexed item in the merchant's inventory.
  link = GetMerchantItemLink(index);
  link = GetMerchantItemLink(index);


== Parameters ==
== Parameters ==
=== Arguments ===
=== Arguments ===
:(index)
:;index : Integer - The index of the item in the merchant's inventory
:;index : Integer - The index of the item in the merchant's inventory
=== Returns ===
=== Returns ===
;''Returns''
:link
:;link : String - returns a string that will show as a clickable link to the item
:;link : String - returns a string that will show as a clickable link to the item


== Example ==
== Example ==
 
  DEFAULT_CHAT_FRAME:AddMessage(GetMerchantItemLink(4));
  local link = GetMerchantItemLink(4);
===Result===
DEFAULT_CHAT_FRAME:AddMessage(link);
A clickable [[ItemLink|item link]] will appear in the default chat frame.
 
====Result====
 
The item from slot four's name will appear in the chat window in brackets. Clicking on it will open a small window with information about the item.
An example of the string itself looks like this:
 
|cffffffff|Hitem:3771:0:0:0|h[Wild Hog Shank]|h|r
 
<br><center><i>Last updated: Patch 1.6.1</i></center>
----
__NOTOC__
{{Template:WoW API}}