From b8c291571e0adcfbef36ab3f3345b5f2074e3731 Mon Sep 17 00:00:00 2001 From: Mickael Cagnion Date: Wed, 30 Sep 2026 11:28:07 +0200 Subject: [PATCH] Fix weighted trade search repeating when exactly 10 results match A search returning exactly maxFetchPerSearch results matched no finalize condition and was treated as clipped: the threshold was raised, then halved again, until the recursion limit. A full result window is not clipped, so fetch it directly. --- src/Classes/TradeQueryRequests.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Classes/TradeQueryRequests.lua b/src/Classes/TradeQueryRequests.lua index 709d0c51bbf..0ddff307ebb 100644 --- a/src/Classes/TradeQueryRequests.lua +++ b/src/Classes/TradeQueryRequests.lua @@ -133,7 +133,7 @@ function TradeQueryRequestsClass:SearchWithQueryWeightAdjusted(realm, league, qu if errMsg and ((errMsg == "No Matching Results Found" and currentRecursion >= maxRecursion) or errMsg ~= "No Matching Results Found") then return callback(nil, errMsg) end - if (response.total > self.maxFetchPerSearch and response.total < 10000) or currentRecursion >= maxRecursion then + if (response.total >= self.maxFetchPerSearch and response.total < 10000) or currentRecursion >= maxRecursion then -- Search not clipped or max recursion reached, fetch results and finalize if previousSearchItems and self.maxFetchPerSearch > response.total then -- Not enough items in the last search, fill results from previous search