diff --git a/Source/Game/AI/CoreAI/PetAI.cs b/Source/Game/AI/CoreAI/PetAI.cs index 2adfa7a9b..b7705b5cd 100644 --- a/Source/Game/AI/CoreAI/PetAI.cs +++ b/Source/Game/AI/CoreAI/PetAI.cs @@ -623,6 +623,14 @@ namespace Game.AI _allySet.Add(owner.GetGUID()); } + public override void OnCharmed(bool isNew) + { + if (me.IsCharmed()) + me.GetMotionMaster().MoveFollow(me.GetCharmer(), SharedConst.PetFollowDist, me.GetFollowAngle()); + + base.OnCharmed(isNew); + } + void ClearCharmInfoFlags() { // Quick access to set all flags to FALSE diff --git a/Source/Game/AI/SmartScripts/SmartAI.cs b/Source/Game/AI/SmartScripts/SmartAI.cs index 1c03cad88..940389586 100644 --- a/Source/Game/AI/SmartScripts/SmartAI.cs +++ b/Source/Game/AI/SmartScripts/SmartAI.cs @@ -741,6 +741,9 @@ namespace Game.AI _isCharmed = charmed; + if (charmed) + me.GetMotionMaster().MoveFollow(me.GetCharmer(), SharedConst.PetFollowDist, me.GetFollowAngle()); + if (!charmed && !me.IsInEvadeMode()) { if (_repeatWaypointPath)