Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cap trader stat weight per mod to 100% increased #6121

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/Classes/TradeQueryGenerator.lua
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,16 @@ function TradeQueryGeneratorClass.WeightedRatioOutputs(baseOutput, newOutput, st
baseModSum = baseModSum + (baseOutput[mod] or 0)
newModSum = newModSum + (newOutput[mod] or 0)
end
return newModSum / ((baseModSum ~= 0) and baseModSum or 1)

if baseModSum == math.huge then
return 0
else
if newModSum == math.huge then
return data.misc.maxStatIncrease
else
return math.min(newModSum / ((baseModSum ~= 0) and baseModSum or 1), data.misc.maxStatIncrease)
end
end
end
for _, statTable in ipairs(statWeights) do
if statTable.stat == "FullDPS" and not GlobalCache.useFullDPS then
Expand Down
2 changes: 2 additions & 0 deletions src/Modules/Data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ data.misc = { -- magic numbers
ehpCalcMaxDamage = 100000000,
-- max iterations can be increased for more accuracy this should be perfectly accurate unless it runs out of iterations and so high eHP values will be underestimated.
ehpCalcMaxIterationsToCalc = 50,
-- maximum increase for stat weights, only used in trader for now.
maxStatIncrease = 2, -- 100% increased
-- PvP scaling used for hogm
PvpElemental1 = 0.55,
PvpElemental2 = 150,
Expand Down