mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 18:36:31 +01:00
[7848] Fix set variable to zero on apply -100% mod Author: SeT
--HG-- branch : trunk
This commit is contained in:
@@ -92,7 +92,7 @@ inline void ApplyModFloatVar(float& var, float val, bool apply)
|
||||
|
||||
inline void ApplyPercentModFloatVar(float& var, float val, bool apply)
|
||||
{
|
||||
if (!apply && val == -100.0f)
|
||||
if (val == -100.0f) // prevent set var to zero
|
||||
val = -99.99f;
|
||||
var *= (apply?(100.0f+val)/100.0f : 100.0f / (100.0f+val));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user