World of Warcraft Forever API · C_MerchantFrame.md, for your AI
C_MerchantFrame
7 functions, 4 events, 1 tables, as Blizzard documents them for Forever 1.60.1 (70959).
Making an addon with an AI? Tell it: Read https://wowaddons.gg/agents.md, then make me a World of Warcraft Forever addon that …, try it with me in the game, and publish it. It checks every call against this API before you try it in the game, then publishes it here. How it works.
Functions
C_MerchantFrame.GetBuybackItemID
buybackItemID = C_MerchantFrame.GetBuybackItemID(buybackSlotIndex)
May return nothing.
Arguments
buybackSlotIndex | luaIndex |
|---|
Returns
buybackItemID | number |
|---|
C_MerchantFrame.GetItemInfo
info = C_MerchantFrame.GetItemInfo(index)
May return nothing.
Arguments
index | luaIndex |
|---|
Returns
info | MerchantItemInfo |
|---|
C_MerchantFrame.GetMerchantCurrencies
currencies = C_MerchantFrame.GetMerchantCurrencies()
May return nothing.
Returns
currencies | number[] |
|---|
C_MerchantFrame.GetNumJunkItems
numJunkItems = C_MerchantFrame.GetNumJunkItems()
Returns
numJunkItems | number |
|---|
C_MerchantFrame.IsMerchantItemRefundable
refundable = C_MerchantFrame.IsMerchantItemRefundable(index)
Arguments
index | luaIndex |
|---|
Returns
refundable | bool |
|---|
C_MerchantFrame.IsSellAllJunkEnabled
enabled = C_MerchantFrame.IsSellAllJunkEnabled()
Returns
enabled | bool |
|---|
C_MerchantFrame.SellAllJunkItems
C_MerchantFrame.SellAllJunkItems()
Events
MERCHANT_CLOSED
No payload.
MERCHANT_FILTER_ITEM_UPDATE
itemID | number |
|---|
MERCHANT_SHOW
No payload.
MERCHANT_UPDATE
No payload.
Tables
MerchantItemInfo structure
name | string may be nil | |
|---|---|---|
texture | fileID | |
price | number default 0 | |
stackCount | number default 0 | |
numAvailable | number default 0 | |
isPurchasable | bool default false | |
isUsable | bool default false | |
hasExtendedCost | bool default false | |
currencyID | number may be nil | |
spellID | number may be nil | |
isQuestStartItem | bool default false |