mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Revert "Shared/Utils: Fixed ApplyPercentModFloatVar."
This reverts commit 2005be0474.
Note to self: do not touch maths past 10 any more.
This commit is contained in:
@@ -114,8 +114,7 @@ inline void ApplyPercentModFloatVar(float& var, float val, bool apply)
|
||||
{
|
||||
if (val == -100.0f) // prevent set var to zero
|
||||
val = -99.99f;
|
||||
|
||||
var *= apply ? (100.0f + val) / 100.0f : (100.0f - val) / 100.0f;
|
||||
var *= (apply ? (100.0f + val) / 100.0f : 100.0f / (100.0f + val));
|
||||
}
|
||||
|
||||
// Percentage calculation
|
||||
|
||||
Reference in New Issue
Block a user