aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2025-01-03 16:17:07 +0100
committerOvahlord <dreadkiller@gmx.de>2025-01-03 16:17:07 +0100
commitcfbb909f3e5470be467e2d175b6e8a9440d9a3d8 (patch)
treed408d10fe361d2330dd82791d74222a2aa4913bc /src
parent5893ef28b011bb4f79b05462032503a0e5bad8c1 (diff)
Core/Units: round up rage calculations and use double precision
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 1c2c44e5692..bb921c0953b 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -1327,11 +1327,11 @@ void Unit::DealSpellDamage(SpellNonMeleeDamage const* damageInfo, bool durabilit
if (!victim || damage == 0)
return 0;
- float multiplier = static_cast<float>(damage) / victim->GetMaxHealth();
+ double multiplier = static_cast<double>(damage) / victim->GetMaxHealth();
// This formula is based on sampling multiple sniff data at multiple level ranges
// There has never been any leak and the only info we have is that the amount is based on max HP and damage taken and that there is a hidden constant
- return uint32(std::round(400 * multiplier));
+ return uint32(std::ceil(400 * multiplier));
}
/// @todo for melee need create structure as in