30#include <unordered_map>
118 void InitializeDefault();
123 std::vector<MovementGeneratorInformation> GetMovementGeneratorsInformation()
const;
148 void PropagateSpeedChange();
149 bool GetDestination(
float &x,
float &y,
float &z);
151 void InterruptOnTeleport();
154 void MoveTargetedHome();
155 void MoveRandom(
float wanderDistance = 0.0f);
161 void MoveFleeing(
Unit* enemy,
uint32 time = 0);
163 void MovePoint(
uint32 id,
float x,
float y,
float z,
bool generatePath =
true,
Optional<float> finalOrient = {});
169 void MoveCloserAndStop(
uint32 id,
Unit* target,
float distance);
175 void MoveKnockbackFrom(
float srcX,
float srcY,
float speedXY,
float speedZ);
176 void MoveJumpTo(
float angle,
float speedXY,
float speedZ);
177 void MoveJump(
Position const& pos,
float speedXY,
float speedZ,
uint32 id =
EVENT_JUMP,
bool hasOrientation =
false);
178 void MoveJump(
float x,
float y,
float z,
float o,
float speedXY,
float speedZ,
uint32 id =
EVENT_JUMP,
bool hasOrientation =
false);
179 void MoveCirclePath(
float x,
float y,
float z,
float radius,
bool clockwise,
uint8 stepCount);
182 void MoveAlongSplineChain(
uint32 pointId,
uint16 dbChainId,
bool walk);
183 void MoveAlongSplineChain(
uint32 pointId, std::vector<SplineChainLink>
const& chain,
bool walk);
185 void MoveFall(
uint32 id = 0);
186 void MoveSeekAssistance(
float x,
float y,
float z);
187 void MoveSeekAssistanceDistract(
uint32 timer);
189 void MoveDistract(
uint32 time,
float orientation);
190 void MovePath(
uint32 pathId,
bool repeatable);
193 void MoveFormation(
Unit* leader,
float range,
float angle,
uint32 point1,
uint32 point2);
207 void ResolveDelayedActions();
208 void Remove(MotionMasterContainer::iterator& iterator,
bool active,
bool movementInform);
209 void Pop(
bool active,
bool movementInform);
210 void DirectInitialize();
212 void DirectClearDefault();
217 void DeleteDefault(
bool active,
bool movementInform);
220 void ClearBaseUnitStates();
static bool EmptyValidator()
MotionMasterDelayedActionType
@ MOTIONMASTER_DELAYED_ADD
@ MOTIONMASTER_DELAYED_REMOVE
@ MOTIONMASTER_DELAYED_REMOVE_TYPE
@ MOTIONMASTER_DELAYED_INITIALIZE
@ MOTIONMASTER_DELAYED_CLEAR_PRIORITY
@ MOTIONMASTER_DELAYED_CLEAR
@ MOTIONMASTER_DELAYED_CLEAR_SLOT
@ MOTIONMASTER_DELAYED_CLEAR_MODE
@ MOTIONMASTER_FLAG_DELAYED
@ MOTIONMASTER_FLAG_INITIALIZING
@ MOTIONMASTER_FLAG_UPDATE
@ MOTIONMASTER_FLAG_INITIALIZATION_PENDING
@ MOTIONMASTER_FLAG_STATIC_INITIALIZATION_PENDING
MovementGeneratorPriority
std::optional< T > Optional
Optional helper class to wrap optional values within.
DelayedAction(DelayedActionDefine &&action, DelayedActionValidator &&validator, MotionMasterDelayedActionType type)
DelayedAction(DelayedActionDefine &&action, MotionMasterDelayedActionType type)
DelayedActionValidator Validator
DelayedActionDefine Action
std::set< MovementGenerator *, MovementGeneratorComparator > MotionMasterContainer
bool HasFlag(uint8 const flag) const
void MoveChase(Unit *target, float dist)
void MoveChase(Unit *target, float dist, float angle)
std::unique_ptr< MovementGenerator, MovementGeneratorDeleter > MovementGeneratorPointer
void AddFlag(uint8 const flag)
MotionMasterUnitStatesContainer _baseUnitStatesMap
void RemoveFlag(uint8 const flag)
std::function< void()> DelayedActionDefine
std::unordered_multimap< uint32, MovementGenerator const * > MotionMasterUnitStatesContainer
std::deque< DelayedAction > _delayedActions
MovementGeneratorPointer _defaultGenerator
std::function< bool()> DelayedActionValidator
MotionMasterContainer _generators
bool operator()(MovementGenerator const *a, MovementGenerator const *b) const
void operator()(MovementGenerator *a)