Core/Units: round stat pct bonus values to the nearest integral number to match sniff behavior

This commit is contained in:
Ovahlord committed 2026-06-11 09:23:21 +02:00
1 parent d0b0f35a42
commit 133b635925
1 file changed
+2 -2
+2 -2
View File
@@ -234,7 +234,7 @@ void Stats::updateStat(StatType statType)
// ==== Calculate the total base value (Base pct multiplier auras)
double basePctMultiplier = _basePctMultipliers[AsUnderlyingType(statType)];
int32 baseTotalValue = static_cast<int32>(flatStatValue * basePctMultiplier);
int32 baseTotalValue = static_cast<int32>(std::round(flatStatValue * basePctMultiplier));
if (flatStatValue < baseTotalValue)
posStatValue += baseTotalValue - flatStatValue;
else
@@ -251,7 +251,7 @@ void Stats::updateStat(StatType statType)
// ==== Calculate the total value (Total pct multipliers)
double totalPctMultiplier = _totalPctMultipliers[AsUnderlyingType(statType)];
int32 statValue = static_cast<int32>(totalValue * totalPctMultiplier);
int32 statValue = static_cast<int32>(std::round(totalValue * totalPctMultiplier));
if (totalValue < statValue)
posStatValue += statValue - totalValue;
else