WoW:API GetMerchantItemLink: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Returns a link to the indexed item in the merchant's inventory)
 
m (Move page script moved page API GetMerchantItemLink to API GetMerchantItemLink without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<center>'''GetMerchantItemLink''' ''-Documentation by [[user:Fenaoin|Fenaoin]]-''</center>
{{wowapi}} __NOTOC__
 
Returns a link to the indexed item in the merchant's inventory.
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
 
  link = GetMerchantItemLink(index);
  link = GetMerchantItemLink(index);


Returns a link to the indexed item in the merchant's inventory.
== Parameters ==
 
=== Arguments ===
----
:;index : Integer - The index of the item in the merchant's inventory
;''Arguments''
=== Returns ===
 
:;[[itemLink]] : String - returns a string that will show as a clickable link to the item
<!-- List each argument, together with its type -->
:(index)
:;index : Number - The index of the item in the merchant's inventory
 
----
;''Returns''
 
<!-- List each return value, together with its type -->
:link
:;link : String - returns a string that will show as a clickable link to the item
 
----
;''Example''
 
<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
local link = GetMerchantItemLink(4);
DEFAULT_CHAT_FRAME:AddMessage(link);
 
;''Result''
 
<!-- If it helps, include example results here, though they are not required-->
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


----
== Example ==
{{Template:WoW API}}
DEFAULT_CHAT_FRAME:AddMessage(GetMerchantItemLink(4));
===Result===
A clickable [[ItemLink|item link]] will appear in the default chat frame.

Latest revision as of 04:46, 15 August 2023

WoW API < GetMerchantItemLink

Returns a link to the indexed item in the merchant's inventory.

link = GetMerchantItemLink(index);

Parameters[edit]

Arguments[edit]

index
Integer - The index of the item in the merchant's inventory

Returns[edit]

itemLink
String - returns a string that will show as a clickable link to the item

Example[edit]

DEFAULT_CHAT_FRAME:AddMessage(GetMerchantItemLink(4));

Result[edit]

A clickable item link will appear in the default chat frame.