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)
 
mNo edit summary
Line 2: Line 2:


<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
link = GetMerchantItemLink(index);


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);
;''Arguments''


<!-- List each argument, together with its type -->
== Parameters ==
=== Arguments ===
:(index)
:(index)
:;index : Number - 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''


<!-- List each return value, together with its type -->
:link
: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''


<!-- If it helps, include an example here, though it's not required if the usage is self-explanatory -->
  local link = GetMerchantItemLink(4);
  local link = GetMerchantItemLink(4);
  DEFAULT_CHAT_FRAME:AddMessage(link);
  DEFAULT_CHAT_FRAME:AddMessage(link);


;''Result''
====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.
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:
An example of the string itself looks like this:
Line 36: Line 30:
  |cffffffff|Hitem:3771:0:0:0|h[Wild Hog Shank]|h|r
  |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}}
{{Template:WoW API}}
[[Category:API Item Functions|GetMerchantItemLink]]

Revision as of 19:27, 19 August 2005

GetMerchantItemLink -Documentation by Fenaoin-


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

link = GetMerchantItemLink(index);

Parameters

Arguments

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

Returns

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

Example

local link = GetMerchantItemLink(4);
DEFAULT_CHAT_FRAME:AddMessage(link);

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


Last updated: Patch 1.6.1

Template:WoW API