Core/Creatures: Only remove formation movement on formation remove instead of fully resetting MotionMaster

Port From (https://github.com/TrinityCore/TrinityCore/commit/67dd9a920fdabb26e6429432885345b1a1771b9a)
This commit is contained in:
Hondacrx
2024-09-01 15:26:19 -04:00
parent 762c26f16e
commit 530e8dbd36
2 changed files with 5 additions and 4 deletions
@@ -247,7 +247,7 @@ namespace Game.Entities
foreach (var (creature, _) in _members)
{
if (dismiss)
creature.GetMotionMaster().Initialize();
creature.GetMotionMaster().Remove(MovementGeneratorType.Formation, MovementSlot.Default);
else
creature.GetMotionMaster().MoveIdle();
Log.outDebug(LogFilter.Unit, $"CreatureGroup::FormationReset: Set {(dismiss ? "default" : "idle")} movement for member {creature.GetGUID()}");