WowAddons

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

buybackSlotIndexluaIndex

Returns

buybackItemIDnumber

C_MerchantFrame.GetItemInfo

info = C_MerchantFrame.GetItemInfo(index)

May return nothing.

Arguments

indexluaIndex

Returns

infoMerchantItemInfo

C_MerchantFrame.GetMerchantCurrencies

currencies = C_MerchantFrame.GetMerchantCurrencies()

May return nothing.

Returns

currenciesnumber[]

C_MerchantFrame.GetNumJunkItems

numJunkItems = C_MerchantFrame.GetNumJunkItems()

Returns

numJunkItemsnumber

C_MerchantFrame.IsMerchantItemRefundable

refundable = C_MerchantFrame.IsMerchantItemRefundable(index)

Arguments

indexluaIndex

Returns

refundablebool

C_MerchantFrame.IsSellAllJunkEnabled

enabled = C_MerchantFrame.IsSellAllJunkEnabled()

Returns

enabledbool

C_MerchantFrame.SellAllJunkItems

C_MerchantFrame.SellAllJunkItems()

Events

MERCHANT_CLOSED

No payload.

MERCHANT_FILTER_ITEM_UPDATE

itemIDnumber

MERCHANT_SHOW

No payload.

MERCHANT_UPDATE

No payload.

Tables

MerchantItemInfo structure

namestring may be nil
texturefileID
pricenumber default 0
stackCountnumber default 0
numAvailablenumber default 0
isPurchasablebool default false
isUsablebool default false
hasExtendedCostbool default false
currencyIDnumber may be nil
spellIDnumber may be nil
isQuestStartItembool default false

It takes WowAddons

Free, for Windows, macOS and Linux: it puts the addon in your game in one click and keeps it up to date. Open it once, then press Install again.

WowAddons runs on your computer: open wowaddons.gg there.

Download for Windows