Core/Auras: Prevent getting negative scale with auras

Port From (https://github.com/TrinityCore/TrinityCore/commit/679e9910e09a55dd1743f236dbd99b7fa48fe9c1)
This commit is contained in:
hondacrx
2022-02-18 16:40:32 -05:00
parent e7eba5907d
commit a031530b2a
5 changed files with 39 additions and 19 deletions
+1 -5
View File
@@ -1586,11 +1586,7 @@ namespace Game.Spells
if (!mode.HasAnyFlag(AuraEffectHandleModes.ChangeAmountSendForClientMask))
return;
Unit target = aurApp.GetTarget();
float scale = target.GetObjectScale();
scale += MathFunctions.CalculatePct(1.0f, apply ? GetAmount() : -GetAmount());
target.SetObjectScale(scale);
aurApp.GetTarget().RecalculateObjectScale();
}
[AuraEffectHandler(AuraType.CloneCaster)]