Skip to content

Commit e122c99

Browse files
committed
1 parent 75f06dc commit e122c99

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/Classes/TradeQueryGenerator.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -812,6 +812,9 @@ function TradeQueryGeneratorClass:FinishQuery()
812812

813813
-- Sort by mean Stat diff rather than weight to more accurately prioritize stats that can contribute more
814814
table.sort(self.modWeights, function(a, b)
815+
if a.meanStatDiff == b.meanStatDiff then
816+
return math.abs(a.weight) > math.abs(b.weight)
817+
end
815818
return a.meanStatDiff > b.meanStatDiff
816819
end)
817820

@@ -864,9 +867,6 @@ function TradeQueryGeneratorClass:FinishQuery()
864867

865868
local effective_max = MAX_FILTERS - num_extra
866869

867-
-- Prioritize top mods by abs(weight)
868-
table.sort(self.modWeights, function(a, b) return math.abs(a.weight) > math.abs(b.weight) end)
869-
870870
local prioritizedMods = {}
871871
for _, entry in ipairs(self.modWeights) do
872872
if #prioritizedMods < effective_max then

0 commit comments

Comments
 (0)