Core/Movement: Add MovePoint with facing
Port From (https://github.com/TrinityCore/TrinityCore/commit/c6d6ece1c7a450145598d5ac3c83b399cc731ee9)
This commit is contained in:
@@ -259,17 +259,17 @@ namespace Game.Movement
|
||||
}
|
||||
}
|
||||
|
||||
public void MovePoint(uint id, Position pos, bool generatePath = true)
|
||||
public void MovePoint(uint id, Position pos, bool generatePath = true, float? finalOrient = null)
|
||||
{
|
||||
MovePoint(id, pos.posX, pos.posY, pos.posZ, generatePath);
|
||||
MovePoint(id, pos.posX, pos.posY, pos.posZ, generatePath, finalOrient);
|
||||
}
|
||||
|
||||
public void MovePoint(uint id, float x, float y, float z, bool generatePath = true)
|
||||
public void MovePoint(uint id, float x, float y, float z, bool generatePath = true, float? finalOrient = null)
|
||||
{
|
||||
if (_owner.IsTypeId(TypeId.Player))
|
||||
StartMovement(new PointMovementGenerator<Player>(id, x, y, z, generatePath), MovementSlot.Active);
|
||||
StartMovement(new PointMovementGenerator<Player>(id, x, y, z, generatePath, 0.0f, null, null, finalOrient), MovementSlot.Active);
|
||||
else
|
||||
StartMovement(new PointMovementGenerator<Creature>(id, x, y, z, generatePath), MovementSlot.Active);
|
||||
StartMovement(new PointMovementGenerator<Creature>(id, x, y, z, generatePath, 0.0f, null, null, finalOrient), MovementSlot.Active);
|
||||
}
|
||||
|
||||
public void MoveCloserAndStop(uint id, Unit target, float distance)
|
||||
|
||||
Reference in New Issue
Block a user