TrinityCore
|
#include <MotionMaster.h>
Public Member Functions | |
MotionMaster (Unit *unit) | |
~MotionMaster () | |
void | Initialize () |
void | InitDefault () |
bool | empty () const |
int | size () const |
_Ty | top () const |
_Ty | GetMotionSlot (int slot) const |
void | DirectDelete (_Ty curr) |
void | DelayedDelete (_Ty curr) |
void | UpdateMotion (uint32 diff) |
void | Clear (bool reset=true) |
void | MovementExpired (bool reset=true) |
void | MoveIdle () |
void | MoveTargetedHome () |
void | MoveRandom (float spawndist=0.0f) |
void | MoveFollow (Unit *target, float dist, float angle, MovementSlot slot=MOTION_SLOT_ACTIVE) |
void | MoveChase (Unit *target, float dist=0.0f, float angle=0.0f) |
void | MoveConfused () |
void | MoveFleeing (Unit *enemy, uint32 time=0) |
void | MovePoint (uint32 id, Position const &pos, bool generatePath=true) |
void | MovePoint (uint32 id, float x, float y, float z, bool generatePath=true) |
void | MoveLand (uint32 id, Position const &pos) |
void | MoveTakeoff (uint32 id, Position const &pos) |
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, uint32 arrivalSpellId=0, ObjectGuid const &arrivalSpellTargetGuid=ObjectGuid::Empty) |
void | MoveJump (float x, float y, float z, float o, float speedXY, float speedZ, uint32 id=EVENT_JUMP, bool hasOrientation=false, uint32 arrivalSpellId=0, ObjectGuid const &arrivalSpellTargetGuid=ObjectGuid::Empty) |
void | MoveCirclePath (float x, float y, float z, float radius, bool clockwise, uint8 stepCount) |
void | MoveSmoothPath (uint32 pointId, G3D::Vector3 const *pathPoints, size_t pathSize, bool walk) |
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) |
void | MovePath (uint32 path_id, bool repeatable) |
void | MoveRotate (uint32 time, RotateDirection direction) |
MovementGeneratorType | GetCurrentMovementGeneratorType () const |
MovementGeneratorType | GetMotionSlotType (int slot) const |
void | propagateSpeedChange () |
bool | GetDestination (float &x, float &y, float &z) |
Private Types | |
typedef MovementGenerator * | _Ty |
typedef std::vector< _Ty > | ExpireList |
Private Member Functions | |
void | pop () |
void | push (_Ty _Val) |
bool | needInitTop () const |
void | InitTop () |
void | Mutate (MovementGenerator *m, MovementSlot slot) |
void | DirectClean (bool reset) |
void | DelayedClean () |
void | DirectExpire (bool reset) |
void | DelayedExpire () |
Private Attributes | |
ExpireList * | _expList |
_Ty | Impl [MAX_MOTION_SLOT] |
int | _top |
Unit * | _owner |
bool | _needInit [MAX_MOTION_SLOT] |
uint8 | _cleanFlag |
|
private |
|
private |
|
inlineexplicit |
MotionMaster::~MotionMaster | ( | ) |
|
private |
void MotionMaster::DelayedDelete | ( | _Ty | curr | ) |
|
private |
|
private |
void MotionMaster::DirectDelete | ( | _Ty | curr | ) |
|
private |
|
inline |
MovementGeneratorType MotionMaster::GetCurrentMovementGeneratorType | ( | ) | const |
bool MotionMaster::GetDestination | ( | float & | x, |
float & | y, | ||
float & | z | ||
) |
|
inline |
MovementGeneratorType MotionMaster::GetMotionSlotType | ( | int | slot | ) | const |
void MotionMaster::InitDefault | ( | ) |
void MotionMaster::Initialize | ( | void | ) |
|
private |
void MotionMaster::MoveCharge | ( | float | x, |
float | y, | ||
float | z, | ||
float | speed = SPEED_CHARGE , |
||
uint32 | id = EVENT_CHARGE , |
||
bool | generatePath = false |
||
) |
void MotionMaster::MoveCharge | ( | PathGenerator const & | path, |
float | speed = SPEED_CHARGE |
||
) |
void MotionMaster::MoveChase | ( | Unit * | target, |
float | dist = 0.0f , |
||
float | angle = 0.0f |
||
) |
void MotionMaster::MoveCirclePath | ( | float | x, |
float | y, | ||
float | z, | ||
float | radius, | ||
bool | clockwise, | ||
uint8 | stepCount | ||
) |
void MotionMaster::MoveConfused | ( | ) |
void MotionMaster::MoveDistract | ( | uint32 | time | ) |
void MotionMaster::MoveFall | ( | uint32 | id = 0 | ) |
void MotionMaster::MoveFollow | ( | Unit * | target, |
float | dist, | ||
float | angle, | ||
MovementSlot | slot = MOTION_SLOT_ACTIVE |
||
) |
void MotionMaster::MoveIdle | ( | ) |
Should be preceded by MovementExpired or Clear if there's an overlying movementgenerator active
|
inline |
void MotionMaster::MoveJump | ( | float | x, |
float | y, | ||
float | z, | ||
float | o, | ||
float | speedXY, | ||
float | speedZ, | ||
uint32 | id = EVENT_JUMP , |
||
bool | hasOrientation = false , |
||
uint32 | arrivalSpellId = 0 , |
||
ObjectGuid const & | arrivalSpellTargetGuid = ObjectGuid::Empty |
||
) |
void MotionMaster::MoveJumpTo | ( | float | angle, |
float | speedXY, | ||
float | speedZ | ||
) |
void MotionMaster::MoveKnockbackFrom | ( | float | srcX, |
float | srcY, | ||
float | speedXY, | ||
float | speedZ | ||
) |
void MotionMaster::MoveRandom | ( | float | spawndist = 0.0f | ) |
void MotionMaster::MoveRotate | ( | uint32 | time, |
RotateDirection | direction | ||
) |
void MotionMaster::MoveSeekAssistance | ( | float | x, |
float | y, | ||
float | z | ||
) |
void MotionMaster::MoveSeekAssistanceDistract | ( | uint32 | timer | ) |
void MotionMaster::MoveSmoothPath | ( | uint32 | pointId, |
G3D::Vector3 const * | pathPoints, | ||
size_t | pathSize, | ||
bool | walk | ||
) |
void MotionMaster::MoveTargetedHome | ( | ) |
|
private |
|
inlineprivate |
|
inlineprivate |
void MotionMaster::propagateSpeedChange | ( | ) |
|
inlineprivate |
|
inline |
|
inline |
void MotionMaster::UpdateMotion | ( | uint32 | diff | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |