19 #ifndef TRINITY_WAYPOINTMOVEMENTGENERATOR_H
20 #define TRINITY_WAYPOINTMOVEMENTGENERATOR_H
32 #define FLIGHT_TRAVEL_UPDATE 100
33 #define STOP_TIME_FOR_PLAYER 3 * MINUTE * IN_MILLISECONDS // 3 Minutes
34 #define TIMEDIFF_NEXT_WP 250
36 template<
class T,
class P>
59 : i_nextMoveTime(0), m_isArrivalDone(
false), path_id(_path_id), repeating(_repeating) { }
73 bool GetResetPos(
Creature*,
float&
x,
float&
y,
float&
z);
77 void Stop(
int32 time) { i_nextMoveTime.Reset(time);}
79 bool Stopped() {
return !i_nextMoveTime.Passed();}
83 i_nextMoveTime.Update(diff);
84 return i_nextMoveTime.Passed();
92 i_nextMoveTime.Reset(0);
void SetCurrentNodeAfterTeleport()
Definition: WaypointMovementGenerator.cpp:392
TimeTrackerSmall i_nextMoveTime
Definition: WaypointMovementGenerator.h:96
int32 Cost
Definition: WaypointMovementGenerator.h:146
bool m_isArrivalDone
Definition: WaypointMovementGenerator.h:97
uint32 GetCurrentNode() const
Definition: WaypointMovementGenerator.h:43
Definition: WaypointMovementGenerator.h:105
node index where preloading starts
Definition: WaypointMovementGenerator.h:143
bool DoUpdate(Player *, uint32)
Definition: WaypointMovementGenerator.cpp:358
void PreloadEndGrid()
Definition: WaypointMovementGenerator.cpp:437
Definition: MotionMaster.h:45
arena_t NULL
Definition: jemalloc_internal.h:624
#define false
Definition: CascPort.h:18
WaypointMovementGenerator(uint32 _path_id=0, bool _repeating=true)
Definition: WaypointMovementGenerator.h:58
FlightPathMovementGenerator()
Definition: WaypointMovementGenerator.h:109
virtual ~PathMovementBase()
Definition: WaypointMovementGenerator.h:41
Definition: Creature.h:467
void LoadPath(Player *player, uint32 startNode=0)
Definition: WaypointMovementGenerator.cpp:266
bool HasArrived() const
Definition: WaypointMovementGenerator.h:126
MovementGeneratorType GetMovementGeneratorType() const override
Definition: WaypointMovementGenerator.h:68
Definition: WaypointMovementGenerator.h:37
P i_path
Definition: WaypointMovementGenerator.h:46
void DoReset(Player *)
Definition: WaypointMovementGenerator.cpp:336
bool repeating
Definition: WaypointMovementGenerator.h:99
uint32 _endMapId
Y coord of last node location.
Definition: WaypointMovementGenerator.h:140
void InitEndGridInfo()
Definition: WaypointMovementGenerator.cpp:426
bool GetResetPos(Player *, float &x, float &y, float &z)
Definition: WaypointMovementGenerator.cpp:417
Definition: WaypointMovementGenerator.h:51
G3D::int16 z
Definition: Vector3int16.h:46
std::deque< TaxiNodeChangeInfo > _pointsForPathSwitch
Definition: WaypointMovementGenerator.h:149
void StartMoveNow(Creature *creature)
Definition: WaypointMovementGenerator.h:90
int32_t int32
Definition: Define.h:146
MovementGeneratorType GetMovementGeneratorType() const override
Definition: WaypointMovementGenerator.h:122
void SkipCurrentNode()
Definition: WaypointMovementGenerator.h:128
uint32_t uint32
Definition: Define.h:150
G3D::int16 y
Definition: Vector2int16.h:38
uint32 path_id
Definition: WaypointMovementGenerator.h:98
bool CanMove(int32 diff)
Definition: WaypointMovementGenerator.h:81
Definition: MovementGenerator.h:51
Definition: DB2Structure.h:1345
uint32 i_currentNode
Definition: WaypointMovementGenerator.h:47
bool Stopped()
Definition: WaypointMovementGenerator.h:79
void DoEventIfAny(Player *player, TaxiPathNodeEntry const *node, bool departure)
Definition: WaypointMovementGenerator.cpp:408
PathMovementBase()
Definition: WaypointMovementGenerator.h:40
uint32 _preloadTargetNode
map Id of last node location
Definition: WaypointMovementGenerator.h:141
void DoInitialize(Player *)
Definition: WaypointMovementGenerator.cpp:308
float _endGridX
Definition: WaypointMovementGenerator.h:138
MovementGeneratorType
Definition: MotionMaster.h:35
void Stop(int32 time)
Definition: WaypointMovementGenerator.h:77
uint32 GetPathAtMapEnd() const
Definition: WaypointMovementGenerator.cpp:246
void DoFinalize(Player *)
Definition: WaypointMovementGenerator.cpp:314
G3D::int16 x
Definition: Vector2int16.h:37
uint8 const P[]
Definition: AuthenticationPackets.cpp:225
~WaypointMovementGenerator()
Definition: WaypointMovementGenerator.h:60
Definition: MotionMaster.h:39
float _endGridY
X coord of last node location.
Definition: WaypointMovementGenerator.h:139
TaxiPathNodeList const & GetPath()
Definition: WaypointMovementGenerator.h:124
uint32 PathIndex
Definition: WaypointMovementGenerator.h:145
std::vector< TaxiPathNodeEntry const * > TaxiPathNodeList
Definition: DB2Structure.h:1449