![]() |
TrinityCore
|
#include <MotionMaster.h>
Classes | |
class | DelayedAction |
Public Types | |
typedef std::function< void()> | DelayedActionDefine |
typedef std::function< bool()> | DelayedActionValidator |
Public Member Functions | |
MotionMaster (Unit *unit) | |
~MotionMaster () | |
void | Initialize () |
void | InitializeDefault () |
void | AddToWorld () |
bool | Empty () const |
uint32 | Size () const |
std::vector< MovementGeneratorInformation > | GetMovementGeneratorsInformation () const |
MovementSlot | GetCurrentSlot () const |
MovementGenerator * | GetCurrentMovementGenerator () const |
MovementGeneratorType | GetCurrentMovementGeneratorType () const |
MovementGeneratorType | GetCurrentMovementGeneratorType (MovementSlot slot) const |
MovementGenerator * | GetCurrentMovementGenerator (MovementSlot slot) const |
MovementGenerator * | GetMovementGenerator (std::function< bool(MovementGenerator const *)> const &filter, MovementSlot slot=MOTION_SLOT_ACTIVE) const |
bool | HasMovementGenerator (std::function< bool(MovementGenerator const *)> const &filter, MovementSlot slot=MOTION_SLOT_ACTIVE) const |
void | Update (uint32 diff) |
void | Add (MovementGenerator *movement, MovementSlot slot=MOTION_SLOT_ACTIVE) |
void | Remove (MovementGenerator *movement, MovementSlot slot=MOTION_SLOT_ACTIVE) |
void | Remove (MovementGeneratorType type, MovementSlot slot=MOTION_SLOT_ACTIVE) |
void | Clear () |
void | Clear (MovementSlot slot) |
void | Clear (MovementGeneratorMode mode) |
void | Clear (MovementGeneratorPriority priority) |
void | PropagateSpeedChange () |
bool | GetDestination (float &x, float &y, float &z) |
bool | StopOnDeath () |
void | MoveIdle () |
void | MoveTargetedHome () |
void | MoveRandom (float wanderDistance=0.0f, Optional< Milliseconds > duration={}, MovementSlot slot=MOTION_SLOT_DEFAULT, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveFollow (Unit *target, float dist, Optional< ChaseAngle > angle={}, Optional< Milliseconds > duration={}, bool ignoreTargetWalk=false, MovementSlot slot=MOTION_SLOT_ACTIVE, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveChase (Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={}) |
void | MoveChase (Unit *target, float dist, float angle) |
void | MoveConfused () |
void | MoveFleeing (Unit *enemy, Milliseconds time=0ms, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MovePoint (uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MovePoint (uint32 id, float x, float y, float z, bool generatePath=true, Optional< float > finalOrient={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< float > closeEnoughDistance={}, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveCloserAndStop (uint32 id, Unit *target, float distance) |
void | MoveLand (uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveTakeoff (uint32 id, Position const &pos, Optional< int32 > tierTransitionId={}, Optional< float > velocity={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveCharge (float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, bool generatePath=false, Unit const *target=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr) |
void | MoveCharge (PathGenerator const &path, float speed=SPEED_CHARGE, Unit const *target=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr) |
void | MoveKnockbackFrom (Position const &origin, float speedXY, float speedZ, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr) |
void | MoveJumpTo (float angle, float speedXY, float speedZ) |
void | MoveJump (Position const &pos, float speedXY, float speedZ, uint32 id=EVENT_JUMP, MovementFacingTarget const &facing={}, bool orientationFixed=false, JumpArrivalCastArgs const *arrivalCast=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveJump (float x, float y, float z, float speedXY, float speedZ, uint32 id=EVENT_JUMP, MovementFacingTarget const &facing={}, bool orientationFixed=false, JumpArrivalCastArgs const *arrivalCast=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveJumpWithGravity (Position const &pos, float speedXY, float gravity, uint32 id=EVENT_JUMP, MovementFacingTarget const &facing={}, bool orientationFixed=false, JumpArrivalCastArgs const *arrivalCast=nullptr, Movement::SpellEffectExtraData const *spellEffectExtraData=nullptr, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveCirclePath (float x, float y, float z, float radius, bool clockwise, uint8 stepCount, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveAlongSplineChain (uint32 pointId, uint16 dbChainId, bool walk) |
void | MoveAlongSplineChain (uint32 pointId, std::vector< SplineChainLink > const &chain, bool walk) |
void | ResumeSplineChain (SplineChainResumeInfo const &info) |
void | MoveFall (uint32 id=0, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveSeekAssistance (float x, float y, float z) |
void | MoveSeekAssistanceDistract (uint32 timer) |
void | MoveTaxiFlight (uint32 path, uint32 pathnode, Optional< float > speed={}, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveDistract (uint32 time, float orientation) |
void | MovePath (uint32 pathId, bool repeatable, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, Optional< bool > exactSplinePath={}, bool generatePath=true, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MovePath (WaypointPath const &path, bool repeatable, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, Optional< bool > exactSplinePath={}, bool generatePath=true, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
void | MoveRotate (uint32 id, RotateDirection direction, Optional< Milliseconds > time={}, Optional< float > turnSpeed={}, Optional< float > totalTurnAngle={}, Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > &&scriptResult={}) |
Makes the Unit turn in place. More... | |
void | MoveFormation (Unit *leader, float range, float angle, uint32 point1, uint32 point2) |
void | LaunchMoveSpline (std::function< void(Movement::MoveSplineInit &init)> &&initializer, uint32 id=0, MovementGeneratorPriority priority=MOTION_PRIORITY_NORMAL, MovementGeneratorType type=EFFECT_MOTION_TYPE) |
void | CalculateJumpSpeeds (float dist, UnitMoveType moveType, float speedMultiplier, float minHeight, float maxHeight, float &speedXY, float &speedZ) const |
Private Types | |
typedef std::unique_ptr< MovementGenerator, MovementGeneratorDeleter > | MovementGeneratorPointer |
typedef std::multiset< MovementGenerator *, MovementGeneratorComparator > | MotionMasterContainer |
typedef std::unordered_multimap< uint32, MovementGenerator const * > | MotionMasterUnitStatesContainer |
Private Member Functions | |
void | AddFlag (uint8 const flag) |
bool | HasFlag (uint8 const flag) const |
void | RemoveFlag (uint8 const flag) |
void | ResolveDelayedActions () |
void | Remove (MotionMasterContainer::iterator iterator, bool active, bool movementInform) |
void | Pop (bool active, bool movementInform) |
void | DirectInitialize () |
void | DirectClear () |
void | DirectClearDefault () |
void | DirectClear (std::function< bool(MovementGenerator *)> const &filter) |
void | DirectAdd (MovementGenerator *movement, MovementSlot slot) |
void | Delete (MovementGenerator *movement, bool active, bool movementInform) |
void | DeleteDefault (bool active, bool movementInform) |
void | AddBaseUnitState (MovementGenerator const *movement) |
void | ClearBaseUnitState (MovementGenerator const *movement) |
void | ClearBaseUnitStates () |
Private Attributes | |
Unit * | _owner |
MovementGeneratorPointer | _defaultGenerator |
MotionMasterContainer | _generators |
MotionMasterUnitStatesContainer | _baseUnitStatesMap |
std::deque< DelayedAction > | _delayedActions |
uint8 | _flags |
Definition at line 96 of file MotionMaster.h.
typedef std::function<void()> MotionMaster::DelayedActionDefine |
Definition at line 99 of file MotionMaster.h.
typedef std::function<bool()> MotionMaster::DelayedActionValidator |
Definition at line 100 of file MotionMaster.h.
|
private |
Definition at line 246 of file MotionMaster.h.
|
private |
Definition at line 247 of file MotionMaster.h.
|
private |
Definition at line 245 of file MotionMaster.h.
|
explicit |
Definition at line 82 of file MotionMaster.cpp.
MotionMaster::~MotionMaster | ( | ) |
void MotionMaster::Add | ( | MovementGenerator * | movement, |
MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
) |
Definition at line 326 of file MotionMaster.cpp.
|
private |
Definition at line 1379 of file MotionMaster.cpp.
|
inlineprivate |
void MotionMaster::AddToWorld | ( | ) |
void MotionMaster::CalculateJumpSpeeds | ( | float | dist, |
UnitMoveType | moveType, | ||
float | speedMultiplier, | ||
float | minHeight, | ||
float | maxHeight, | ||
float & | speedXY, | ||
float & | speedZ | ||
) | const |
Definition at line 1192 of file MotionMaster.cpp.
void MotionMaster::Clear | ( | ) |
Definition at line 428 of file MotionMaster.cpp.
void MotionMaster::Clear | ( | MovementGeneratorMode | mode | ) |
void MotionMaster::Clear | ( | MovementGeneratorPriority | priority | ) |
void MotionMaster::Clear | ( | MovementSlot | slot | ) |
|
private |
Definition at line 1388 of file MotionMaster.cpp.
|
private |
Definition at line 1398 of file MotionMaster.cpp.
|
private |
Definition at line 1359 of file MotionMaster.cpp.
|
private |
Definition at line 1369 of file MotionMaster.cpp.
|
private |
Definition at line 1285 of file MotionMaster.cpp.
|
private |
Definition at line 1246 of file MotionMaster.cpp.
|
private |
|
private |
Definition at line 1260 of file MotionMaster.cpp.
|
private |
Definition at line 1237 of file MotionMaster.cpp.
bool MotionMaster::Empty | ( | ) | const |
MovementGenerator * MotionMaster::GetCurrentMovementGenerator | ( | ) | const |
MovementGenerator * MotionMaster::GetCurrentMovementGenerator | ( | MovementSlot | slot | ) | const |
MovementGeneratorType MotionMaster::GetCurrentMovementGeneratorType | ( | ) | const |
Definition at line 195 of file MotionMaster.cpp.
MovementGeneratorType MotionMaster::GetCurrentMovementGeneratorType | ( | MovementSlot | slot | ) | const |
MovementSlot MotionMaster::GetCurrentSlot | ( | ) | const |
Definition at line 173 of file MotionMaster.cpp.
bool MotionMaster::GetDestination | ( | float & | x, |
float & | y, | ||
float & | z | ||
) |
MovementGenerator * MotionMaster::GetMovementGenerator | ( | std::function< bool(MovementGenerator const *)> const & | filter, |
MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
) | const |
Definition at line 235 of file MotionMaster.cpp.
std::vector< MovementGeneratorInformation > MotionMaster::GetMovementGeneratorsInformation | ( | ) | const |
Definition at line 139 of file MotionMaster.cpp.
|
inlineprivate |
bool MotionMaster::HasMovementGenerator | ( | std::function< bool(MovementGenerator const *)> const & | filter, |
MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
) | const |
Definition at line 262 of file MotionMaster.cpp.
void MotionMaster::Initialize | ( | ) |
Definition at line 92 of file MotionMaster.cpp.
void MotionMaster::InitializeDefault | ( | ) |
Definition at line 110 of file MotionMaster.cpp.
void MotionMaster::LaunchMoveSpline | ( | std::function< void(Movement::MoveSplineInit &init)> && | initializer, |
uint32 | id = 0 , |
||
MovementGeneratorPriority | priority = MOTION_PRIORITY_NORMAL , |
||
MovementGeneratorType | type = EFFECT_MOTION_TYPE |
||
) |
Definition at line 1177 of file MotionMaster.cpp.
void MotionMaster::MoveAlongSplineChain | ( | uint32 | pointId, |
std::vector< SplineChainLink > const & | chain, | ||
bool | walk | ||
) |
Definition at line 987 of file MotionMaster.cpp.
void MotionMaster::MoveCharge | ( | float | x, |
float | y, | ||
float | z, | ||
float | speed = SPEED_CHARGE , |
||
uint32 | id = EVENT_CHARGE , |
||
bool | generatePath = false , |
||
Unit const * | target = nullptr , |
||
Movement::SpellEffectExtraData const * | spellEffectExtraData = nullptr |
||
) |
Definition at line 759 of file MotionMaster.cpp.
void MotionMaster::MoveCharge | ( | PathGenerator const & | path, |
float | speed = SPEED_CHARGE , |
||
Unit const * | target = nullptr , |
||
Movement::SpellEffectExtraData const * | spellEffectExtraData = nullptr |
||
) |
|
inline |
Definition at line 164 of file MotionMaster.h.
void MotionMaster::MoveChase | ( | Unit * | target, |
Optional< ChaseRange > | dist = {} , |
||
Optional< ChaseAngle > | angle = {} |
||
) |
Definition at line 621 of file MotionMaster.cpp.
void MotionMaster::MoveCirclePath | ( | float | x, |
float | y, | ||
float | z, | ||
float | radius, | ||
bool | clockwise, | ||
uint8 | stepCount, | ||
Optional< Milliseconds > | duration = {} , |
||
Optional< float > | speed = {} , |
||
MovementWalkRunSpeedSelectionMode | speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Definition at line 933 of file MotionMaster.cpp.
Definition at line 677 of file MotionMaster.cpp.
void MotionMaster::MoveConfused | ( | ) |
Definition at line 631 of file MotionMaster.cpp.
void MotionMaster::MoveDistract | ( | uint32 | time, |
float | orientation | ||
) |
Definition at line 1115 of file MotionMaster.cpp.
void MotionMaster::MoveFall | ( | uint32 | id = 0 , |
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Definition at line 1019 of file MotionMaster.cpp.
void MotionMaster::MoveFleeing | ( | Unit * | enemy, |
Milliseconds | time = 0ms , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Definition at line 645 of file MotionMaster.cpp.
void MotionMaster::MoveFollow | ( | Unit * | target, |
float | dist, | ||
Optional< ChaseAngle > | angle = {} , |
||
Optional< Milliseconds > | duration = {} , |
||
bool | ignoreTargetWalk = false , |
||
MovementSlot | slot = MOTION_SLOT_ACTIVE , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Definition at line 606 of file MotionMaster.cpp.
void MotionMaster::MoveIdle | ( | ) |
Definition at line 565 of file MotionMaster.cpp.
void MotionMaster::MoveJump | ( | float | x, |
float | y, | ||
float | z, | ||
float | speedXY, | ||
float | speedZ, | ||
uint32 | id = EVENT_JUMP , |
||
MovementFacingTarget const & | facing = {} , |
||
bool | orientationFixed = false , |
||
JumpArrivalCastArgs const * | arrivalCast = nullptr , |
||
Movement::SpellEffectExtraData const * | spellEffectExtraData = nullptr , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
void MotionMaster::MoveJump | ( | Position const & | pos, |
float | speedXY, | ||
float | speedZ, | ||
uint32 | id = EVENT_JUMP , |
||
MovementFacingTarget const & | facing = {} , |
||
bool | orientationFixed = false , |
||
JumpArrivalCastArgs const * | arrivalCast = nullptr , |
||
Movement::SpellEffectExtraData const * | spellEffectExtraData = nullptr , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Definition at line 843 of file MotionMaster.cpp.
void MotionMaster::MoveJumpTo | ( | float | angle, |
float | speedXY, | ||
float | speedZ | ||
) |
Definition at line 826 of file MotionMaster.cpp.
void MotionMaster::MoveJumpWithGravity | ( | Position const & | pos, |
float | speedXY, | ||
float | gravity, | ||
uint32 | id = EVENT_JUMP , |
||
MovementFacingTarget const & | facing = {} , |
||
bool | orientationFixed = false , |
||
JumpArrivalCastArgs const * | arrivalCast = nullptr , |
||
Movement::SpellEffectExtraData const * | spellEffectExtraData = nullptr , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Definition at line 892 of file MotionMaster.cpp.
void MotionMaster::MoveKnockbackFrom | ( | Position const & | origin, |
float | speedXY, | ||
float | speedZ, | ||
Movement::SpellEffectExtraData const * | spellEffectExtraData = nullptr |
||
) |
Definition at line 793 of file MotionMaster.cpp.
void MotionMaster::MoveLand | ( | uint32 | id, |
Position const & | pos, | ||
Optional< int32 > | tierTransitionId = {} , |
||
Optional< float > | velocity = {} , |
||
MovementWalkRunSpeedSelectionMode | speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Definition at line 700 of file MotionMaster.cpp.
void MotionMaster::MovePath | ( | uint32 | pathId, |
bool | repeatable, | ||
Optional< Milliseconds > | duration = {} , |
||
Optional< float > | speed = {} , |
||
MovementWalkRunSpeedSelectionMode | speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default , |
||
Optional< std::pair< Milliseconds, Milliseconds > > | waitTimeRangeAtPathEnd = {} , |
||
Optional< float > | wanderDistanceAtPathEnds = {} , |
||
Optional< bool > | followPathBackwardsFromEndToStart = {} , |
||
Optional< bool > | exactSplinePath = {} , |
||
bool | generatePath = true , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Definition at line 1125 of file MotionMaster.cpp.
void MotionMaster::MovePath | ( | WaypointPath const & | path, |
bool | repeatable, | ||
Optional< Milliseconds > | duration = {} , |
||
Optional< float > | speed = {} , |
||
MovementWalkRunSpeedSelectionMode | speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default , |
||
Optional< std::pair< Milliseconds, Milliseconds > > | waitTimeRangeAtPathEnd = {} , |
||
Optional< float > | wanderDistanceAtPathEnds = {} , |
||
Optional< bool > | followPathBackwardsFromEndToStart = {} , |
||
Optional< bool > | exactSplinePath = {} , |
||
bool | generatePath = true , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
void MotionMaster::MovePoint | ( | uint32 | id, |
float | x, | ||
float | y, | ||
float | z, | ||
bool | generatePath = true , |
||
Optional< float > | finalOrient = {} , |
||
Optional< float > | speed = {} , |
||
MovementWalkRunSpeedSelectionMode | speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default , |
||
Optional< float > | closeEnoughDistance = {} , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
void MotionMaster::MovePoint | ( | uint32 | id, |
Position const & | pos, | ||
bool | generatePath = true , |
||
Optional< float > | finalOrient = {} , |
||
Optional< float > | speed = {} , |
||
MovementWalkRunSpeedSelectionMode | speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default , |
||
Optional< float > | closeEnoughDistance = {} , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
void MotionMaster::MoveRandom | ( | float | wanderDistance = 0.0f , |
Optional< Milliseconds > | duration = {} , |
||
MovementSlot | slot = MOTION_SLOT_DEFAULT , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Definition at line 594 of file MotionMaster.cpp.
void MotionMaster::MoveRotate | ( | uint32 | id, |
RotateDirection | direction, | ||
Optional< Milliseconds > | time = {} , |
||
Optional< float > | turnSpeed = {} , |
||
Optional< float > | totalTurnAngle = {} , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Makes the Unit turn in place.
id | Movement identifier, later passed to script MovementInform hooks |
direction | Rotation direction |
time | How long should this movement last, infinite if not set |
turnSpeed | How fast should the unit rotate, in radians per second. Uses unit's turn speed if not set |
totalTurnAngle | Total angle of the entire movement, infinite if not set |
scriptResult | Awaitable script result (for internal use) |
Definition at line 1158 of file MotionMaster.cpp.
void MotionMaster::MoveSeekAssistance | ( | float | x, |
float | y, | ||
float | z | ||
) |
Definition at line 1065 of file MotionMaster.cpp.
void MotionMaster::MoveSeekAssistanceDistract | ( | uint32 | timer | ) |
Definition at line 1080 of file MotionMaster.cpp.
void MotionMaster::MoveTakeoff | ( | uint32 | id, |
Position const & | pos, | ||
Optional< int32 > | tierTransitionId = {} , |
||
Optional< float > | velocity = {} , |
||
MovementWalkRunSpeedSelectionMode | speedSelectionMode = MovementWalkRunSpeedSelectionMode::Default , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Definition at line 730 of file MotionMaster.cpp.
void MotionMaster::MoveTargetedHome | ( | ) |
Definition at line 570 of file MotionMaster.cpp.
void MotionMaster::MoveTaxiFlight | ( | uint32 | path, |
uint32 | pathnode, | ||
Optional< float > | speed = {} , |
||
Optional< Scripting::v2::ActionResultSetter< MovementStopReason > > && | scriptResult = {} |
||
) |
Definition at line 1091 of file MotionMaster.cpp.
|
private |
Definition at line 1231 of file MotionMaster.cpp.
void MotionMaster::PropagateSpeedChange | ( | ) |
Definition at line 519 of file MotionMaster.cpp.
|
private |
void MotionMaster::Remove | ( | MovementGenerator * | movement, |
MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
) |
Definition at line 349 of file MotionMaster.cpp.
void MotionMaster::Remove | ( | MovementGeneratorType | type, |
MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
) |
|
inlineprivate |
|
private |
void MotionMaster::ResumeSplineChain | ( | SplineChainResumeInfo const & | info | ) |
Definition at line 1009 of file MotionMaster.cpp.
uint32 MotionMaster::Size | ( | ) | const |
bool MotionMaster::StopOnDeath | ( | ) |
void MotionMaster::Update | ( | uint32 | diff | ) |
|
private |
Definition at line 271 of file MotionMaster.h.
|
private |
Definition at line 269 of file MotionMaster.h.
|
private |
Definition at line 272 of file MotionMaster.h.
|
private |
Definition at line 273 of file MotionMaster.h.
|
private |
Definition at line 270 of file MotionMaster.h.
|
private |
Definition at line 268 of file MotionMaster.h.