From f9c0365bbdf2db7b40306a35aaab75d74015ba55 Mon Sep 17 00:00:00 2001 From: Regisle <49933620+Regisle@users.noreply.github.com> Date: Mon, 19 Dec 2022 22:07:06 +1030 Subject: [PATCH] Use default item affix quality rather than 50% (#5388) --- src/Classes/TradeQueryGenerator.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Classes/TradeQueryGenerator.lua b/src/Classes/TradeQueryGenerator.lua index c7b59115dc6..ed01d66fb38 100644 --- a/src/Classes/TradeQueryGenerator.lua +++ b/src/Classes/TradeQueryGenerator.lua @@ -369,8 +369,8 @@ function TradeQueryGeneratorClass:GenerateModWeights(modsToTest) goto continue end - -- Test with a value halfway between the min and max available for this mod in this slot. Note that this can generate slightly different values for the same mod as implicit vs explicit. - local modValue = math.ceil((entry[self.calcContext.itemCategory].max - entry[self.calcContext.itemCategory].min) / 2 + entry[self.calcContext.itemCategory].min) + -- Test with a value halfway (or configured default Item Affix Quality) between the min and max available for this mod in this slot. Note that this can generate slightly different values for the same mod as implicit vs explicit. + local modValue = math.ceil((entry[self.calcContext.itemCategory].max - entry[self.calcContext.itemCategory].min) * ( main.defaultItemAffixQuality or 0.5 ) + entry[self.calcContext.itemCategory].min) local modValueStr = (entry.sign and entry.sign or "") .. tostring(modValue) -- Apply override text for special cases