TrinityCore
Loading...
Searching...
No Matches
FlightPathMovementGenerator Class Reference

#include <FlightPathMovementGenerator.h>

+ Inheritance diagram for FlightPathMovementGenerator:

Classes

struct  TaxiNodeChangeInfo
 node index where preloading starts More...
 

Public Member Functions

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

Private Attributes

float _endGridX
 
float _endGridY
 X coord of last node location.
 
uint32 _endMapId
 Y coord of last node location.
 
uint32 _preloadTargetNode
 map Id of last node location
 
std::deque< TaxiNodeChangeInfo > _pointsForPathSwitch
 

Additional Inherited Members

- Public Attributes inherited from MovementGenerator
uint8 Priority
 
uint16 Flags
 
uint32 BaseUnitState
 
- Protected Attributes inherited from PathMovementBase< Player, TaxiPathNodeList >
TaxiPathNodeList _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 32 of file FlightPathMovementGenerator.h.

Constructor & Destructor Documentation

◆ FlightPathMovementGenerator()

Member Function Documentation

◆ DoDeactivate()

void FlightPathMovementGenerator::DoDeactivate ( Player *  )

◆ DoEventIfAny()

◆ DoFinalize()

◆ DoInitialize()

◆ DoReset()

◆ DoUpdate()

◆ GetDebugInfo()

◆ GetMovementGeneratorType()

MovementGeneratorType FlightPathMovementGenerator::GetMovementGeneratorType ( ) const
overridevirtual

Implements MovementGenerator.

Definition at line 46 of file FlightPathMovementGenerator.cpp.

References FLIGHT_MOTION_TYPE.

◆ GetPath()

TaxiPathNodeList const & FlightPathMovementGenerator::GetPath ( )
inline

◆ GetPathAtMapEnd()

uint32 FlightPathMovementGenerator::GetPathAtMapEnd ( ) const

◆ GetPathId()

uint32 FlightPathMovementGenerator::GetPathId ( size_t  index) const

◆ GetResetPosition()

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

◆ HasArrived()

bool FlightPathMovementGenerator::HasArrived ( ) const
inline

◆ 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.

Number of nodes in path.

MapId of last node

Definition at line 268 of file FlightPathMovementGenerator.cpp.

References _endGridX, _endGridY, _endMapId, PathMovementBase< Player, TaxiPathNodeList >::_path, _preloadTargetNode, and ASSERT.

Referenced by DoInitialize().

◆ LoadPath()

◆ PreloadEndGrid()

void FlightPathMovementGenerator::PreloadEndGrid ( )

◆ SetCurrentNodeAfterTeleport()

void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport ( )

◆ SkipCurrentNode()

void FlightPathMovementGenerator::SkipCurrentNode ( )
inline

Member Data Documentation

◆ _endGridX

float FlightPathMovementGenerator::_endGridX
private

◆ _endGridY

float FlightPathMovementGenerator::_endGridY
private

X coord of last node location.

Definition at line 62 of file FlightPathMovementGenerator.h.

Referenced by FlightPathMovementGenerator(), GetDebugInfo(), InitEndGridInfo(), and PreloadEndGrid().

◆ _endMapId

uint32 FlightPathMovementGenerator::_endMapId
private

Y coord of last node location.

Definition at line 63 of file FlightPathMovementGenerator.h.

Referenced by FlightPathMovementGenerator(), GetDebugInfo(), InitEndGridInfo(), and PreloadEndGrid().

◆ _pointsForPathSwitch

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

Definition at line 71 of file FlightPathMovementGenerator.h.

Referenced by DoUpdate(), and LoadPath().

◆ _preloadTargetNode

uint32 FlightPathMovementGenerator::_preloadTargetNode
private

map Id of last node location

Definition at line 64 of file FlightPathMovementGenerator.h.

Referenced by DoUpdate(), FlightPathMovementGenerator(), GetDebugInfo(), InitEndGridInfo(), and PreloadEndGrid().


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