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
+6 -1
View File
@@ -306,7 +306,7 @@ namespace Game.Entities
SetSpeedRate(UnitMoveType.Swim, 1.0f); // using 1.0 rate
SetSpeedRate(UnitMoveType.Flight, 1.0f); // using 1.0 rate
SetObjectScale(cInfo.Scale);
SetObjectScale(GetNativeObjectScale());
SetHoverHeight(cInfo.HoverHeight);
@@ -2869,6 +2869,11 @@ namespace Game.Entities
return searcher.GetTarget();
}
public override float GetNativeObjectScale()
{
return GetCreatureTemplate().Scale;
}
public override void SetObjectScale(float scale)
{
base.SetObjectScale(scale);