Core/Movement: MotionMaster reimplementation
Port From (https://github.com/TrinityCore/TrinityCore/commit/426f9f2f92b26fbb68e7cda9290ccbd586c6af4e)
This commit is contained in:
@@ -353,11 +353,8 @@ namespace Game.Entities
|
||||
|
||||
if (IsTypeId(TypeId.Unit))
|
||||
{
|
||||
IMovementGenerator movementGenerator = GetMotionMaster().GetMotionSlot(MovementSlot.Idle);
|
||||
if (movementGenerator != null)
|
||||
movementGenerator.Pause(0);
|
||||
|
||||
GetMotionMaster().Clear(MovementSlot.Active);
|
||||
PauseMovement(0, 0, false);
|
||||
GetMotionMaster().Clear(MovementGeneratorPriority.Normal);
|
||||
|
||||
StopMoving();
|
||||
|
||||
@@ -476,7 +473,7 @@ namespace Game.Entities
|
||||
RestoreFaction();
|
||||
|
||||
///@todo Handle SLOT_IDLE motion resume
|
||||
GetMotionMaster().InitDefault();
|
||||
GetMotionMaster().InitializeDefault();
|
||||
|
||||
Creature creature = ToCreature();
|
||||
if (creature)
|
||||
@@ -547,8 +544,6 @@ namespace Game.Entities
|
||||
player.SetClientControl(this, true);
|
||||
}
|
||||
|
||||
EngageWithTarget(charmer);
|
||||
|
||||
// a guardian should always have charminfo
|
||||
if (playerCharmer && this != charmer.GetFirstControlled())
|
||||
playerCharmer.SendRemoveControlBar();
|
||||
|
||||
Reference in New Issue
Block a user