WoW:API GetMerchantItemInfo: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (formatting)
mNo edit summary
Line 20: Line 20:
=== Result ===
=== Result ===
A message stating the name and price of the item in merchant slot 4 appears.
A message stating the name and price of the item in merchant slot 4 appears.
<br><br>
==See also==
{{AlsoSee|[[API GetMerchantItemCostInfo|GetMerchantItemCostInfo]]}}
*[[API GetMerchantItemCostInfo|GetMerchantItemCostInfo]]

Revision as of 16:42, 1 July 2008

WoW API < GetMerchantItemInfo

Returns information about a merchant's item.

name, texture, price, quantity, numAvailable, isUsable, extendedCost = GetMerchantItemInfo(index)

Parameters

Arguments

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

Returns

name
String - The name of the item
texture
String - The texture that represents the item's icon
price
Number - The price of the item (in copper)
quantity
Number - The quantity that will be purchased
numAvailable
Number - The number of this item that the merchant has in stock. -1 for unlimited stock.
isUsable
Number - Is 1 if the player can use this item, nil otherwise
extendedCost
Number - Is 1 if the item has extended (PvP) cost info, nil otherwise

Example

local name, texture, price, quantity, numAvailable, isUsable, extendedCost = GetMerchantItemInfo(4);
message(name .. " " .. price .. "c");

Result

A message stating the name and price of the item in merchant slot 4 appears.

See also