WoW:API GetMerchantItemInfo: Difference between revisions

m
formatting
({{wowapi}}, format)
m (formatting)
Line 1: Line 1:
{{wowapi}} __NOTOC__
{{wowapi}} __NOTOC__
Returns information about a merchant's item.
Returns information about a merchant's item.
  name, texture, price, quantity, numAvailable, isUsable = GetMerchantItemInfo(index)
  name, texture, price, quantity, numAvailable, isUsable, extendedCost = GetMerchantItemInfo(index)


==Parameters==
==Parameters==
Line 13: Line 13:
:;numAvailable : Number - The number of this item that the merchant has in stock. -1 for unlimited stock.
:;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
:;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 ==
== Example ==
  local name, texture, price, quantity, numAvailable, isUsable = GetMerchantItemInfo(4);
  local name, texture, price, quantity, numAvailable, isUsable, extendedCost = GetMerchantItemInfo(4);
  message(name .. " " .. price .. "c");
  message(name .. " " .. price .. "c");
=== 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>
{{AlsoSee|[[API GetMerchantItemCostInfo|GetMerchantItemCostInfo]]}}
Anonymous user