mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
Add MovePointBackwards in MotionMaster.h
This commit is contained in:
@@ -909,6 +909,25 @@ void MotionMaster::MoveKnockbackFromForPlayer(float srcX, float srcY, float spee
|
||||
init.Launch();
|
||||
Mutate(new EffectMovementGenerator(0), MOTION_SLOT_CONTROLLED);
|
||||
}
|
||||
|
||||
// Similar to MovePoint except setting orientationInversed
|
||||
void MotionMaster::MovePointBackwards(uint32 id, float x, float y, float z, bool generatePath, bool forceDestination, MovementSlot slot, float orientation /* = 0.0f*/)
|
||||
{
|
||||
if (_owner->HasUnitFlag(UNIT_FLAG_DISABLE_MOVE))
|
||||
return;
|
||||
|
||||
if (_owner->IsPlayer())
|
||||
{
|
||||
LOG_DEBUG("movement.motionmaster", "Player ({}) targeted point (Id: {} X: {} Y: {} Z: {})", _owner->GetGUID().ToString(), id, x, y, z);
|
||||
Mutate(new PointMovementGenerator<Player>(id, x, y, z, 0.0f, orientation, nullptr, generatePath, forceDestination, ObjectGuid::Empty, true), slot);
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG_DEBUG("movement.motionmaster", "Creature ({}) targeted point (ID: {} X: {} Y: {} Z: {})", _owner->GetGUID().ToString(), id, x, y, z);
|
||||
Mutate(new PointMovementGenerator<Creature>(id, x, y, z, 0.0f, orientation, nullptr, generatePath, forceDestination, ObjectGuid::Empty, true), slot);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void MotionMaster::propagateSpeedChange()
|
||||
|
||||
Reference in New Issue
Block a user