TrinityCore
|
#include <WaypointMovementGenerator.h>
Public Member Functions | |
WaypointMovementGenerator (uint32 pathId, bool repeating, Optional< Milliseconds > duration={}, Optional< float > speed={}, MovementWalkRunSpeedSelectionMode speedSelectionMode=MovementWalkRunSpeedSelectionMode::Default, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd={}, Optional< float > wanderDistanceAtPathEnds={}, Optional< bool > followPathBackwardsFromEndToStart={}, bool generatePath=true) | |
WaypointMovementGenerator (WaypointPath const &path, bool repeating, Optional< Milliseconds > duration, Optional< float > speed, MovementWalkRunSpeedSelectionMode speedSelectionMode, Optional< std::pair< Milliseconds, Milliseconds > > waitTimeRangeAtPathEnd, Optional< float > wanderDistanceAtPathEnds, Optional< bool > followPathBackwardsFromEndToStart, bool generatePath) | |
~WaypointMovementGenerator () | |
MovementGeneratorType | GetMovementGeneratorType () const override |
void | UnitSpeedChanged () override |
void | Pause (uint32 timer) override |
void | Resume (uint32 overrideTimer) override |
bool | GetResetPosition (Unit *, float &x, float &y, float &z) override |
void | DoInitialize (Creature *) |
void | DoReset (Creature *) |
bool | DoUpdate (Creature *, uint32) |
void | DoDeactivate (Creature *) |
void | DoFinalize (Creature *, bool, bool) |
WaypointPath const * | GetPath () const |
std::string | GetDebugInfo () const override |
Public Member Functions inherited from MovementGeneratorMedium< Creature, WaypointMovementGenerator< Creature > > | |
void | Initialize (Unit *owner) override |
void | Reset (Unit *owner) override |
bool | Update (Unit *owner, uint32 diff) override |
void | Deactivate (Unit *owner) override |
void | Finalize (Unit *owner, bool active, bool movementInform) override |
Public Member Functions inherited from MovementGenerator | |
MovementGenerator () | |
MovementGenerator (MovementGenerator const &)=delete | |
MovementGenerator (MovementGenerator &&)=delete | |
MovementGenerator & | operator= (MovementGenerator const &)=delete |
MovementGenerator & | operator= (MovementGenerator &&)=delete |
virtual | ~MovementGenerator () |
virtual void | Initialize (Unit *owner)=0 |
virtual void | Reset (Unit *owner)=0 |
virtual bool | Update (Unit *owner, uint32 diff)=0 |
virtual void | Deactivate (Unit *owner)=0 |
virtual void | Finalize (Unit *owner, bool active, bool movementInform)=0 |
virtual MovementGeneratorType | GetMovementGeneratorType () const =0 |
virtual void | UnitSpeedChanged () |
virtual void | Pause (uint32) |
virtual void | Resume (uint32) |
virtual bool | GetResetPosition (Unit *, float &, float &, float &) |
void | AddFlag (uint16 const flag) |
bool | HasFlag (uint16 const flag) const |
void | RemoveFlag (uint16 const flag) |
virtual std::string | GetDebugInfo () const |
Public Member Functions inherited from PathMovementBase< Creature, std::variant< WaypointPath const *, std::unique_ptr< WaypointPath > > > | |
PathMovementBase () | |
virtual | ~PathMovementBase () |
uint32 | GetCurrentNode () const |
virtual std::string | GetDebugInfo () const |
Private Member Functions | |
void | MovementInform (Creature *) |
void | OnArrived (Creature *) |
void | StartMove (Creature *, bool relaunch=false) |
bool | ComputeNextNode () |
bool | UpdateTimer (uint32 diff) |
bool | IsFollowingPathBackwardsFromEndToStart () const |
Private Attributes | |
TimeTracker | _nextMoveTime |
uint32 | _pathId |
bool | _repeating |
bool | _loadedFromDB |
Optional< TimeTracker > | _duration |
Optional< float > | _speed |
MovementWalkRunSpeedSelectionMode | _speedSelectionMode |
Optional< std::pair< Milliseconds, Milliseconds > > | _waitTimeRangeAtPathEnd |
Optional< float > | _wanderDistanceAtPathEnds |
Optional< bool > | _followPathBackwardsFromEndToStart |
bool | _isReturningToStart |
bool | _generatePath |
Additional Inherited Members | |
Public Attributes inherited from MovementGenerator | |
uint8 | Mode |
uint8 | Priority |
uint16 | Flags |
uint32 | BaseUnitState |
Protected Attributes inherited from PathMovementBase< Creature, std::variant< WaypointPath const *, std::unique_ptr< WaypointPath > > > | |
std::variant< WaypointPath const *, std::unique_ptr< WaypointPath > > | _path |
uint32 | _currentNode |
Definition at line 34 of file WaypointMovementGenerator.h.
|
explicit |
Definition at line 31 of file WaypointMovementGenerator.cpp.
|
explicit |
Definition at line 47 of file WaypointMovementGenerator.cpp.
|
default |
|
private |
Definition at line 429 of file WaypointMovementGenerator.cpp.
void WaypointMovementGenerator< Creature >::DoDeactivate | ( | Creature * | owner | ) |
Definition at line 245 of file WaypointMovementGenerator.cpp.
void WaypointMovementGenerator< Creature >::DoFinalize | ( | Creature * | owner, |
bool | active, | ||
bool | |||
) |
Definition at line 251 of file WaypointMovementGenerator.cpp.
void WaypointMovementGenerator< Creature >::DoInitialize | ( | Creature * | owner | ) |
Definition at line 118 of file WaypointMovementGenerator.cpp.
void WaypointMovementGenerator< Creature >::DoReset | ( | Creature * | owner | ) |
Definition at line 144 of file WaypointMovementGenerator.cpp.
bool WaypointMovementGenerator< Creature >::DoUpdate | ( | Creature * | owner, |
uint32 | diff | ||
) |
Definition at line 154 of file WaypointMovementGenerator.cpp.
|
overridevirtual |
Reimplemented from PathMovementBase< Creature, std::variant< WaypointPath const *, std::unique_ptr< WaypointPath > > >.
Definition at line 467 of file WaypointMovementGenerator.cpp.
|
overridevirtual |
Implements MovementGenerator.
Definition at line 67 of file WaypointMovementGenerator.cpp.
|
inline |
Definition at line 61 of file WaypointMovementGenerator.h.
|
overridevirtual |
Reimplemented from MovementGenerator.
Definition at line 103 of file WaypointMovementGenerator.cpp.
|
private |
Definition at line 459 of file WaypointMovementGenerator.cpp.
|
private |
Definition at line 263 of file WaypointMovementGenerator.cpp.
|
private |
Definition at line 273 of file WaypointMovementGenerator.cpp.
|
overridevirtual |
Reimplemented from MovementGenerator.
Definition at line 72 of file WaypointMovementGenerator.cpp.
|
overridevirtual |
Reimplemented from MovementGenerator.
Definition at line 92 of file WaypointMovementGenerator.cpp.
|
private |
If creature is on transport, we assume waypoints set in DB are already transport offsets
Do not use formationDest here, MoveTo requires transport offsets due to DisableTransportPathTransformations() call but formationDest contains global coordinates
Definition at line 305 of file WaypointMovementGenerator.cpp.
|
inlineoverridevirtual |
Reimplemented from MovementGenerator.
Definition at line 50 of file WaypointMovementGenerator.h.
|
inlineprivate |
Definition at line 70 of file WaypointMovementGenerator.h.
|
private |
Definition at line 88 of file WaypointMovementGenerator.h.
|
private |
Definition at line 93 of file WaypointMovementGenerator.h.
|
private |
Definition at line 95 of file WaypointMovementGenerator.h.
|
private |
Definition at line 94 of file WaypointMovementGenerator.h.
|
private |
Definition at line 86 of file WaypointMovementGenerator.h.
|
private |
Definition at line 83 of file WaypointMovementGenerator.h.
|
private |
Definition at line 84 of file WaypointMovementGenerator.h.
|
private |
Definition at line 85 of file WaypointMovementGenerator.h.
|
private |
Definition at line 89 of file WaypointMovementGenerator.h.
|
private |
Definition at line 90 of file WaypointMovementGenerator.h.
|
private |
Definition at line 91 of file WaypointMovementGenerator.h.
|
private |
Definition at line 92 of file WaypointMovementGenerator.h.