TrinityCore
FlightPathMovementGenerator Class Reference

#include <FlightPathMovementGenerator.h>

+ Inheritance diagram for FlightPathMovementGenerator:

Classes

struct  TaxiNodeChangeInfo
 

Public Member Functions

 FlightPathMovementGenerator ()
 
MovementGeneratorType GetMovementGeneratorType () const override
 
bool GetResetPosition (Unit *owner, float &x, float &y, float &z) override
 
void DoInitialize (Player *)
 
void DoReset (Player *)
 
bool DoUpdate (Player *, uint32)
 
void DoDeactivate (Player *)
 
void DoFinalize (Player *, bool, bool)
 
std::vector< TaxiPathNodeEntry const * > const & GetPath ()
 
uint32 GetPathAtMapEnd () const
 
bool HasArrived () const
 
uint32 GetPathId (size_t index) const
 
void LoadPath (Player *owner, uint32 startNode=0)
 
void SetCurrentNodeAfterTeleport ()
 
void SkipCurrentNode ()
 
void DoEventIfAny (Player *owner, TaxiPathNodeEntry const *node, bool departure)
 
void InitEndGridInfo ()
 
void PreloadEndGrid (Player *owner)
 
std::string GetDebugInfo () const override
 
- Public Member Functions inherited from MovementGeneratorMedium< Player, FlightPathMovementGenerator >
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
 
MovementGeneratoroperator= (MovementGenerator const &)=delete
 
MovementGeneratoroperator= (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< Player, std::vector< TaxiPathNodeEntry const * > >
 PathMovementBase ()
 
virtual ~PathMovementBase ()
 
uint32 GetCurrentNode () const
 
virtual std::string GetDebugInfo () const
 

Private Attributes

float _endGridX
 X coord of last node location. More...
 
float _endGridY
 Y coord of last node location. More...
 
uint32 _endMapId
 map Id of last node location More...
 
uint32 _preloadTargetNode
 node index where preloading starts More...
 
std::deque< TaxiNodeChangeInfo_pointsForPathSwitch
 node indexes and costs where TaxiPath changes More...
 

Additional Inherited Members

- Public Attributes inherited from MovementGenerator
uint8 Mode
 
uint8 Priority
 
uint16 Flags
 
uint32 BaseUnitState
 
- Protected Attributes inherited from PathMovementBase< Player, std::vector< TaxiPathNodeEntry const * > >
std::vector< TaxiPathNodeEntry const * > _path
 
uint32 _currentNode
 

Detailed Description

FlightPathMovementGenerator generates movement of the player for the paths and hence generates ground and activities for the player.

Definition at line 33 of file FlightPathMovementGenerator.h.

Constructor & Destructor Documentation

◆ FlightPathMovementGenerator()

FlightPathMovementGenerator::FlightPathMovementGenerator ( )
explicit

Definition at line 35 of file FlightPathMovementGenerator.cpp.

Member Function Documentation

◆ DoDeactivate()

void FlightPathMovementGenerator::DoDeactivate ( Player )

Definition at line 150 of file FlightPathMovementGenerator.cpp.

+ Here is the call graph for this function:

◆ DoEventIfAny()

void FlightPathMovementGenerator::DoEventIfAny ( Player owner,
TaxiPathNodeEntry const *  node,
bool  departure 
)

Definition at line 269 of file FlightPathMovementGenerator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoFinalize()

void FlightPathMovementGenerator::DoFinalize ( Player owner,
bool  active,
bool   
)

Definition at line 155 of file FlightPathMovementGenerator.cpp.

+ Here is the call graph for this function:

◆ DoInitialize()

void FlightPathMovementGenerator::DoInitialize ( Player owner)

Definition at line 63 of file FlightPathMovementGenerator.cpp.

+ Here is the call graph for this function:

◆ DoReset()

void FlightPathMovementGenerator::DoReset ( Player owner)

Definition at line 72 of file FlightPathMovementGenerator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ DoUpdate()

bool FlightPathMovementGenerator::DoUpdate ( Player owner,
uint32   
)

Definition at line 105 of file FlightPathMovementGenerator.cpp.

+ Here is the call graph for this function:

◆ GetDebugInfo()

std::string FlightPathMovementGenerator::GetDebugInfo ( ) const
overridevirtual

Reimplemented from PathMovementBase< Player, std::vector< TaxiPathNodeEntry const * > >.

Definition at line 324 of file FlightPathMovementGenerator.cpp.

+ Here is the call graph for this function:

◆ GetMovementGeneratorType()

MovementGeneratorType FlightPathMovementGenerator::GetMovementGeneratorType ( ) const
overridevirtual

Implements MovementGenerator.

Definition at line 49 of file FlightPathMovementGenerator.cpp.

◆ GetPath()

std::vector< TaxiPathNodeEntry const * > const & FlightPathMovementGenerator::GetPath ( )
inline

Definition at line 47 of file FlightPathMovementGenerator.h.

◆ GetPathAtMapEnd()

uint32 FlightPathMovementGenerator::GetPathAtMapEnd ( ) const

Definition at line 184 of file FlightPathMovementGenerator.cpp.

+ Here is the caller graph for this function:

◆ GetPathId()

uint32 FlightPathMovementGenerator::GetPathId ( size_t  index) const

Definition at line 316 of file FlightPathMovementGenerator.cpp.

+ Here is the caller graph for this function:

◆ GetResetPosition()

bool FlightPathMovementGenerator::GetResetPosition ( Unit owner,
float &  x,
float &  y,
float &  z 
)
overridevirtual

Reimplemented from MovementGenerator.

Definition at line 54 of file FlightPathMovementGenerator.cpp.

◆ HasArrived()

bool FlightPathMovementGenerator::HasArrived ( ) const
inline

Definition at line 49 of file FlightPathMovementGenerator.h.

+ Here is the caller graph for this function:

◆ InitEndGridInfo()

void FlightPathMovementGenerator::InitEndGridInfo ( )

Storage to preload flightmaster grid at end of flight. For multi-stop flights, this will be reinitialized for each flightmaster at the end of each spline (or stop) in the flight.

Definition at line 280 of file FlightPathMovementGenerator.cpp.

+ Here is the caller graph for this function:

◆ LoadPath()

void FlightPathMovementGenerator::LoadPath ( Player owner,
uint32  startNode = 0 
)

Definition at line 209 of file FlightPathMovementGenerator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PreloadEndGrid()

void FlightPathMovementGenerator::PreloadEndGrid ( Player owner)

Definition at line 301 of file FlightPathMovementGenerator.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetCurrentNodeAfterTeleport()

void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport ( )

Definition at line 253 of file FlightPathMovementGenerator.cpp.

◆ SkipCurrentNode()

void FlightPathMovementGenerator::SkipCurrentNode ( )
inline

Definition at line 54 of file FlightPathMovementGenerator.h.

Member Data Documentation

◆ _endGridX

float FlightPathMovementGenerator::_endGridX
private

X coord of last node location.

Definition at line 62 of file FlightPathMovementGenerator.h.

◆ _endGridY

float FlightPathMovementGenerator::_endGridY
private

Y coord of last node location.

Definition at line 63 of file FlightPathMovementGenerator.h.

◆ _endMapId

uint32 FlightPathMovementGenerator::_endMapId
private

map Id of last node location

Definition at line 64 of file FlightPathMovementGenerator.h.

◆ _pointsForPathSwitch

std::deque<TaxiNodeChangeInfo> FlightPathMovementGenerator::_pointsForPathSwitch
private

node indexes and costs where TaxiPath changes

Definition at line 72 of file FlightPathMovementGenerator.h.

◆ _preloadTargetNode

uint32 FlightPathMovementGenerator::_preloadTargetNode
private

node index where preloading starts

Definition at line 65 of file FlightPathMovementGenerator.h.


The documentation for this class was generated from the following files: