87 for (
size_t i = 0; i <
_expList->size(); ++i)
180 SF_LOG_DEBUG(
"misc",
"Creature (GUID: %u) start moving random",
_owner->GetGUIDLow());
196 SF_LOG_DEBUG(
"misc",
"Pet or controlled creature (Entry: %u GUID: %u) targeting home",
_owner->GetEntry(),
_owner->GetGUIDLow());
197 Unit* target =
_owner->ToCreature()->GetCharmerOrOwner();
206 SF_LOG_ERROR(
"misc",
"Player (GUID: %u) attempt targeted home",
_owner->GetGUIDLow());
219 SF_LOG_DEBUG(
"misc",
"Creature (Entry: %u GUID: %u) move confused",
234 SF_LOG_DEBUG(
"misc",
"Player (GUID: %u) chase to %s (GUID: %u)",
242 SF_LOG_DEBUG(
"misc",
"Creature (Entry: %u GUID: %u) chase to %s (GUID: %u)",
259 SF_LOG_DEBUG(
"misc",
"Player (GUID: %u) follow to %s (GUID: %u)",
_owner->GetGUIDLow(),
266 SF_LOG_DEBUG(
"misc",
"Creature (Entry: %u GUID: %u) follow to %s (GUID: %u)",
278 SF_LOG_DEBUG(
"misc",
"Player (GUID: %u) targeted point (Id: %u X: %f Y: %f Z: %f)",
_owner->GetGUIDLow(),
id, x, y, z);
283 SF_LOG_DEBUG(
"misc",
"Creature (Entry: %u GUID: %u) targeted point (ID: %u X: %f Y: %f Z: %f)",
294 SF_LOG_DEBUG(
"misc",
"Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)",
_owner->GetEntry(),
id, x, y, z);
308 SF_LOG_DEBUG(
"misc",
"Creature (Entry: %u) landing point (ID: %u X: %f Y: %f Z: %f)",
_owner->GetEntry(),
id, x, y, z);
325 float dist = 2 * moveTimeHalf * speedXY;
348 float dist = 2 * moveTimeHalf * speedXY;
349 _owner->GetClosePoint(x, y, z,
_owner->GetObjectSize(), dist, angle);
355 SF_LOG_DEBUG(
"misc",
"Unit (GUID: %u) jump to point (X: %f Y: %f Z: %f)",
_owner->GetGUIDLow(), x, y, z);
361 init.
MoveTo(x, y, z,
false);
374 SF_LOG_DEBUG(
"misc",
"MotionMaster::MoveFall: unable retrive a proper height at map %u (x: %f, y: %f, z: %f).",
380 if (fabs(
_owner->GetPositionZ() - tz) < 0.1f)
400 SF_LOG_DEBUG(
"misc",
"Player (GUID: %u) charge point (X: %f Y: %f Z: %f)",
_owner->GetGUIDLow(), x, y, z);
405 SF_LOG_DEBUG(
"misc",
"Creature (Entry: %u GUID: %u) charge point (X: %f Y: %f Z: %f)",
428 SF_LOG_ERROR(
"misc",
"Player (GUID: %u) attempt to seek assistance",
_owner->GetGUIDLow());
432 SF_LOG_DEBUG(
"misc",
"Creature (Entry: %u GUID: %u) seek assistance (X: %f Y: %f Z: %f)",
444 SF_LOG_ERROR(
"misc",
"Player (GUID: %u) attempt to call distract after assistance",
_owner->GetGUIDLow());
448 SF_LOG_DEBUG(
"misc",
"Creature (Entry: %u GUID: %u) is distracted after assistance call (Time: %u)",
464 SF_LOG_DEBUG(
"misc",
"Player (GUID: %u) flee from %s (GUID: %u)",
_owner->GetGUIDLow(),
471 SF_LOG_DEBUG(
"misc",
"Creature (Entry: %u GUID: %u) flee from %s (GUID: %u)%s",
475 time ?
" for a limited time" :
"");
489 SF_LOG_DEBUG(
"misc",
"%s taxi to (Path %u node %u)",
_owner->GetName().c_str(), path, pathnode);
495 SF_LOG_ERROR(
"misc",
"%s attempt taxi to (not existed Path %u node %u)",
496 _owner->GetName().c_str(), path, pathnode);
501 SF_LOG_ERROR(
"misc",
"Creature (Entry: %u GUID: %u) attempt taxi to (Path %u node %u)",
502 _owner->GetEntry(),
_owner->GetGUIDLow(), path, pathnode);
513 SF_LOG_DEBUG(
"misc",
"Player (GUID: %u) distracted (timer: %u)",
_owner->GetGUIDLow(), timer);
517 SF_LOG_DEBUG(
"misc",
"Creature (Entry: %u GUID: %u) (timer: %u)",
535 else if (
_top < slot)
569 SF_LOG_DEBUG(
"misc",
"%s (GUID: %u) start moving over path(Id:%u, repeatable: %s)",
571 _owner->GetGUIDLow(), path_id, repeatable ?
"YES" :
"NO");
589 for (
int i = 0; i <=
_top; ++i)
592 Impl[i]->unitSpeedChanged();
609 return Impl[slot]->GetMovementGeneratorType();
638 if (
_owner->movespline->Finalized())
641 G3D::Vector3
const& dest =
_owner->movespline->FinalDestination();
TaxiPathNodesByPath sTaxiPathNodesByPath
IdleMovementGenerator si_idleMovement
#define SF_LOG_DEBUG(filterType__,...)
#define SF_LOG_FATAL(filterType__,...)
#define SF_LOG_ERROR(filterType__,...)
#define MAX_FALL_DISTANCE
bool isStatic(MovementGenerator *mv)
@ SPELL_AURA_PREVENTS_FLEEING
uint32 GetDBTableGUIDLow() const
void UpdateMotion(uint32 diff)
void MoveTaxiFlight(uint32 path, uint32 pathnode)
void MoveJump(Position const &pos, float speedXY, float speedZ, uint32 id=EVENT_JUMP)
void DirectDelete(_Ty curr)
MovementGeneratorType GetMotionSlotType(int slot) const
std::vector< _Ty > ExpireList
MovementGeneratorType GetCurrentMovementGeneratorType() const
void propagateSpeedChange()
void MoveRotate(uint32 time, RotateDirection direction)
void DirectExpire(bool reset)
bool _needInit[MAX_MOTION_SLOT]
void MoveFollow(Unit *target, float dist, float angle, MovementSlot slot=MOTION_SLOT_ACTIVE)
void DirectClean(bool reset)
void MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ)
void MovementExpired(bool reset=true)
void MoveChase(Unit *target, float dist=0.0f, float angle=0.0f)
void MoveCharge(float x, float y, float z, float speed=SPEED_CHARGE, uint32 id=EVENT_CHARGE, bool generatePath=false)
void Mutate(MovementGenerator *m, MovementSlot slot)
void MoveRandom(float spawndist=0.0f)
void MoveSeekAssistance(float x, float y, float z)
void MoveSeekAssistanceDistract(uint32 timer)
void MoveLand(uint32 id, Position const &pos)
_Ty Impl[MAX_MOTION_SLOT]
void MovePoint(uint32 id, Position const &pos, bool generatePath=true)
bool GetDestination(float &x, float &y, float &z)
void DelayedDelete(_Ty curr)
void MovePath(uint32 path_id, bool repeatable)
void MoveDistract(uint32 time)
void MoveJumpTo(float angle, float speedXY, float speedZ)
void MoveFall(uint32 id=0)
void MoveTakeoff(uint32 id, Position const &pos)
void Clear(bool reset=true)
void MoveFleeing(Unit *enemy, uint32 time=0)
void SetAnimation(AnimType anim)
void SetParabolic(float amplitude, float start_time)
void SetVelocity(float velocity)
void MoveTo(const Vector3 &destination, bool generatePath=true, bool forceDestination=false)
void MovebyPath(const PointsArray &path, int32 pointId=0)
void SetOrientationFixed(bool enable)
virtual void Initialize(Unit *)=0
virtual MovementGeneratorType GetMovementGeneratorType()=0
virtual void Reset(Unit *)=0
virtual void Finalize(Unit *)=0
uint32 GetGUIDLow() const
Movement::PointsArray const & GetPath() const
G3D::Vector3 const & GetActualEndPosition() const
MovementGenerator * selectMovementGenerator(Creature *creature)
float computeFallElevation(float t_passed, bool isSafeFall, float start_velocity=0.0f)
void GetPosition(float &x, float &y) const