![]() |
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 (MovementGeneratorPriority priority) |
| void | PropagateSpeedChange () |
| bool | GetDestination (float &x, float &y, float &z) |
| bool | StopOnDeath () |
| void | InterruptOnTeleport () |
| void | MoveIdle () |
| void | MoveTargetedHome () |
| void | MoveRandom (float wanderDistance=0.0f) |
| void | MoveFollow (Unit *target, float dist, ChaseAngle angle, MovementSlot slot=MOTION_SLOT_ACTIVE) |
| void | MoveChase (Unit *target, Optional< ChaseRange > dist={}, Optional< ChaseAngle > angle={}) |
| void | MoveChase (Unit *target, float dist, float angle) |
| void | MoveChase (Unit *target, float dist) |
| void | MoveConfused () |
| void | MoveFleeing (Unit *enemy, uint32 time=0) |
| void | MovePoint (uint32 id, Position const &pos, bool generatePath=true, Optional< float > finalOrient={}) |
| void | MovePoint (uint32 id, float x, float y, float z, bool generatePath=true, Optional< float > finalOrient={}) |
| void | MoveCloserAndStop (uint32 id, Unit *target, float distance) |
| void | MoveLand (uint32 id, Position const &pos, Optional< float > velocity={}) |
| void | MoveTakeoff (uint32 id, Position const &pos, Optional< float > velocity={}) |
| void | MoveCharge (float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, bool generatePath=false) |
| void | MoveCharge (PathGenerator const &path, float speed=SPEED_CHARGE) |
| void | MoveKnockbackFrom (float srcX, float srcY, float speedXY, float speedZ) |
| void | MoveJumpTo (float angle, float speedXY, float speedZ) |
| void | MoveJump (Position const &pos, float speedXY, float speedZ, uint32 id=EVENT_JUMP, bool hasOrientation=false) |
| void | MoveJump (float x, float y, float z, float o, float speedXY, float speedZ, uint32 id=EVENT_JUMP, bool hasOrientation=false) |
| void | MoveCirclePath (float x, float y, float z, float radius, bool clockwise, uint8 stepCount) |
| void | MoveSmoothPath (uint32 pointId, Position const *pathPoints, size_t pathSize, bool walk) |
| 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) |
| void | MoveSeekAssistance (float x, float y, float z) |
| void | MoveSeekAssistanceDistract (uint32 timer) |
| void | MoveTaxiFlight (uint32 path, uint32 pathnode) |
| void | MoveDistract (uint32 time, float orientation) |
| void | MovePath (uint32 pathId, bool repeatable) |
| void | MovePath (WaypointPath &path, bool repeatable) |
| void | MoveRotate (uint32 id, uint32 time, RotateDirection direction) |
| void | MoveFormation (Unit *leader, float range, float angle, uint32 point1, uint32 point2) |
| void | MoveFace (float orientation, uint32 id=EVENT_FACE) |
| void | MoveFace (WorldObject const *object, uint32 id=EVENT_FACE) |
| void | LaunchMoveSpline (std::function< void(Movement::MoveSplineInit &init)> &&initializer, uint32 id=0, MovementGeneratorPriority priority=MOTION_PRIORITY_NORMAL, MovementGeneratorType type=EFFECT_MOTION_TYPE) |
Private Types | |
| typedef std::unique_ptr< MovementGenerator, MovementGeneratorDeleter > | MovementGeneratorPointer |
| typedef std::set< 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 94 of file MotionMaster.h.
| typedef std::function<void()> MotionMaster::DelayedActionDefine |
Definition at line 97 of file MotionMaster.h.
| typedef std::function<bool()> MotionMaster::DelayedActionValidator |
Definition at line 98 of file MotionMaster.h.
|
private |
Definition at line 200 of file MotionMaster.h.
|
private |
Definition at line 201 of file MotionMaster.h.
|
private |
Definition at line 199 of file MotionMaster.h.
|
explicit |
Definition at line 80 of file MotionMaster.cpp.
| MotionMaster::~MotionMaster | ( | ) |
| void MotionMaster::Add | ( | MovementGenerator * | movement, |
| MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
| ) |
Definition at line 325 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1220 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
| void MotionMaster::AddToWorld | ( | ) |
Definition at line 113 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::Clear | ( | ) |
Definition at line 426 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::Clear | ( | MovementGeneratorPriority | priority | ) |
| void MotionMaster::Clear | ( | MovementSlot | slot | ) |
|
private |
Definition at line 1229 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1239 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1200 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1210 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1155 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1123 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
|
private |
Definition at line 1137 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1114 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| bool MotionMaster::Empty | ( | ) | const |
| MovementGenerator * MotionMaster::GetCurrentMovementGenerator | ( | ) | const |
| MovementGenerator * MotionMaster::GetCurrentMovementGenerator | ( | MovementSlot | slot | ) | const |
| MovementGeneratorType MotionMaster::GetCurrentMovementGeneratorType | ( | ) | const |
Definition at line 193 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| MovementGeneratorType MotionMaster::GetCurrentMovementGeneratorType | ( | MovementSlot | slot | ) | const |
| MovementSlot MotionMaster::GetCurrentSlot | ( | ) | const |
Definition at line 171 of file MotionMaster.cpp.
| bool MotionMaster::GetDestination | ( | float & | x, |
| float & | y, | ||
| float & | z | ||
| ) |
Definition at line 503 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| MovementGenerator * MotionMaster::GetMovementGenerator | ( | std::function< bool(MovementGenerator const *)> const & | filter, |
| MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
| ) | const |
Definition at line 233 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| std::vector< MovementGeneratorInformation > MotionMaster::GetMovementGeneratorsInformation | ( | ) | const |
Definition at line 137 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlineprivate |
| bool MotionMaster::HasMovementGenerator | ( | std::function< bool(MovementGenerator const *)> const & | filter, |
| MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
| ) | const |
Definition at line 259 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::Initialize | ( | ) |
Definition at line 90 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::InitializeDefault | ( | ) |
Definition at line 108 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::InterruptOnTeleport | ( | ) |
Definition at line 537 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| 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 1074 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveAlongSplineChain | ( | uint32 | pointId, |
| std::vector< SplineChainLink > const & | chain, | ||
| bool | walk | ||
| ) |
Definition at line 880 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveCharge | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | speed = SPEED_CHARGE, |
||
| uint32 | id = EVENT_CHARGE, |
||
| bool | generatePath = false |
||
| ) |
Definition at line 702 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveCharge | ( | PathGenerator const & | path, |
| float | speed = SPEED_CHARGE |
||
| ) |
|
inline |
Definition at line 159 of file MotionMaster.h.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 158 of file MotionMaster.h.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveChase | ( | Unit * | target, |
| Optional< ChaseRange > | dist = {}, |
||
| Optional< ChaseAngle > | angle = {} |
||
| ) |
Definition at line 592 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveCirclePath | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | radius, | ||
| bool | clockwise, | ||
| uint8 | stepCount | ||
| ) |
Definition at line 817 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 652 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveConfused | ( | ) |
Definition at line 602 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveDistract | ( | uint32 | time, |
| float | orientation | ||
| ) |
Definition at line 1000 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveFace | ( | float | orientation, |
| uint32 | id = EVENT_FACE |
||
| ) |
Definition at line 1043 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveFace | ( | WorldObject const * | object, |
| uint32 | id = EVENT_FACE |
||
| ) |
| void MotionMaster::MoveFall | ( | uint32 | id = 0 | ) |
Definition at line 912 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 616 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveFollow | ( | Unit * | target, |
| float | dist, | ||
| ChaseAngle | angle, | ||
| MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
| ) |
Definition at line 582 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveFormation | ( | Unit * | leader, |
| float | range, | ||
| float | angle, | ||
| uint32 | point1, | ||
| uint32 | point2 | ||
| ) |
Definition at line 1034 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveIdle | ( | ) |
Definition at line 544 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveJump | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | o, | ||
| float | speedXY, | ||
| float | speedZ, | ||
| uint32 | id = EVENT_JUMP, |
||
| bool | hasOrientation = false |
||
| ) |
| void MotionMaster::MoveJump | ( | Position const & | pos, |
| float | speedXY, | ||
| float | speedZ, | ||
| uint32 | id = EVENT_JUMP, |
||
| bool | hasOrientation = false |
||
| ) |
Definition at line 787 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveJumpTo | ( | float | angle, |
| float | speedXY, | ||
| float | speedZ | ||
| ) |
Definition at line 770 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveKnockbackFrom | ( | float | srcX, |
| float | srcY, | ||
| float | speedXY, | ||
| float | speedZ | ||
| ) |
Definition at line 739 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 674 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MovePath | ( | uint32 | pathId, |
| bool | repeatable | ||
| ) |
Definition at line 1010 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MovePath | ( | WaypointPath & | path, |
| bool | repeatable | ||
| ) |
| void MotionMaster::MoveRandom | ( | float | wanderDistance = 0.0f | ) |
Definition at line 573 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveRotate | ( | uint32 | id, |
| uint32 | time, | ||
| RotateDirection | direction | ||
| ) |
| void MotionMaster::MoveSeekAssistance | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Definition at line 951 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveSeekAssistanceDistract | ( | uint32 | timer | ) |
Definition at line 966 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveSmoothPath | ( | uint32 | pointId, |
| Position const * | pathPoints, | ||
| size_t | pathSize, | ||
| bool | walk | ||
| ) |
Definition at line 858 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 688 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::MoveTargetedHome | ( | ) |
Definition at line 549 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 977 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 1107 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::PropagateSpeedChange | ( | ) |
Definition at line 491 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
| void MotionMaster::Remove | ( | MovementGenerator * | movement, |
| MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
| ) |
Definition at line 358 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void MotionMaster::Remove | ( | MovementGeneratorType | type, |
| MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
| ) |
|
inlineprivate |
|
private |
| void MotionMaster::ResumeSplineChain | ( | SplineChainResumeInfo const & | info | ) |
Definition at line 902 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| uint32 MotionMaster::Size | ( | ) | const |
| bool MotionMaster::StopOnDeath | ( | ) |
| void MotionMaster::Update | ( | uint32 | diff | ) |
Definition at line 280 of file MotionMaster.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 225 of file MotionMaster.h.
|
private |
Definition at line 223 of file MotionMaster.h.
|
private |
Definition at line 226 of file MotionMaster.h.
|
private |
Definition at line 227 of file MotionMaster.h.
|
private |
Definition at line 224 of file MotionMaster.h.
|
private |
Definition at line 222 of file MotionMaster.h.