Wowpedia
Advertisement
Wowpedia
240,511
pages
Game Flavors
Links
Patch
Added in 8.3.0

Completes a commodity item purchase.

C_AuctionHouse.ConfirmCommoditiesPurchase(itemID, quantity)

Arguments

itemID 
number
quantity 
number

Details

Example

  • Buys 3x Wool Cloth and uses a delay to wait for the auction house to process.
/run C_AuctionHouse.StartCommoditiesPurchase(2592, 3); C_Timer.After(.5, function() C_AuctionHouse.ConfirmCommoditiesPurchase(2592, 3) end)
local item = {}

function TestPurchaseCommodity(itemID, quantity)
	C_AuctionHouse.StartCommoditiesPurchase(itemID, quantity)
	item.itemID = itemID
	item.quantity = quantity
end

local function OnEvent(self, event)
	if next(item) then
		C_AuctionHouse.ConfirmCommoditiesPurchase(item.itemID, item.quantity)
		wipe(item)
	end
end

local f = CreateFrame("Frame")
f:RegisterEvent("AUCTION_HOUSE_THROTTLED_SYSTEM_READY")
f:SetScript("OnEvent", OnEvent)

-- /run TestPurchaseCommodity(2592, 2)
  • Clicks the Buy button instead of using this API. Split into two parts because it requires a secure click and doesn't fit within <255 chars.
/run if not ProxyAHBuy then local f = CreateFrame("Button", "ProxyAHBuy", nil, "SecureActionButtonTemplate") f:SetAttribute("type", "click") f:SetAttribute("clickbutton", AuctionHouseFrame.CommoditiesBuyFrame.BuyDisplay.BuyButton) end
/click ProxyAHBuy
/run AuctionHouseFrame.BuyDialog.BuyNowButton:Click()

Patch changes


Advertisement