View Single Post
12-24-20, 07:51 PM   #1
jpiv
A Defias Bandit
Join Date: Dec 2020
Posts: 3
Sort order not correct C_AuctionHouse.SendSearchA

I've been trying to debug this all day

I'm trying to send a search for specific items on the AH and I'm listening to the
ITEM_SEARCH_RESULTS_UPDATED
event.

The issue I'm having is that no matter what I pass in for the sort parameter I always get the items in the same sort order(bid sorted). Here is how I'm search and getting the item info:

This is confusing me to no end so if someone has experience with this help would be amazing

Code:
	local numResults = C_AuctionHouse.GetNumItemSearchResults(itemKey)
	if numResults > 0 then
		local results = {} 
		for i = 1, numResults do
			local info = C_AuctionHouse.GetItemSearchResultInfo(itemKey, i)
			table.insert(results, info)
		end

           .

           .

           .
Code:
	for _, auction in pairs(AH.ownedAuctions) do
		if AH.scannedAuctions[auction.itemKey.itemID] == nil then
			local sort = {
				sortOrder = Enum.AuctionHouseSortOrder.Buyout,
				reverseOrder = false
			}
			C_AuctionHouse.SendSearchQuery(auction.itemKey, sort, true)
		end
	end
Thanks!
  Reply With Quote