TrinityCore
GameObjectType::Transport Class Reference
+ Inheritance diagram for GameObjectType::Transport:

Public Member Functions

 Transport (GameObject &owner)
 
void Update (uint32 diff) override
 
void OnStateChanged (GOState oldState, GOState newState) override
 
void OnRelocated () override
 
void UpdatePassengerPositions ()
 
uint32 GetTransportPeriod () const
 
std::vector< uint32 > const * GetPauseTimes () const
 
ObjectGuid GetTransportGUID () const override
 
float GetTransportOrientation () const override
 
void AddPassenger (WorldObject *passenger) override
 
TransportBaseRemovePassenger (WorldObject *passenger) override
 
void CalculatePassengerPosition (float &x, float &y, float &z, float *o) const override
 This method transforms supplied transport offsets into global coordinates. More...
 
void CalculatePassengerOffset (float &x, float &y, float &z, float *o) const override
 This method transforms supplied global coordinates into local offsets. More...
 
int32 GetMapIdForSpawning () const override
 
void SetAutoCycleBetweenStopFrames (bool on)
 
- Public Member Functions inherited from GameObjectTypeBase
 GameObjectTypeBase (GameObject &owner)
 
virtual ~GameObjectTypeBase ()=default
 
virtual void Update (uint32 diff)
 
virtual void OnStateChanged (GOState oldState, GOState newState)
 
virtual void OnRelocated ()
 
virtual bool IsNeverVisibleFor (WorldObject const *seer, bool allowServersideObjects) const
 
virtual void ActivateObject (GameObjectActions action, int32 param, WorldObject *spellCaster=nullptr, uint32 spellId=0, int32 effectIndex=-1)
 
- Public Member Functions inherited from TransportBase
virtual ObjectGuid GetTransportGUID () const =0
 
virtual void CalculatePassengerPosition (float &x, float &y, float &z, float *o=nullptr) const =0
 This method transforms supplied transport offsets into global coordinates. More...
 
virtual void CalculatePassengerOffset (float &x, float &y, float &z, float *o=nullptr) const =0
 This method transforms supplied global coordinates into local offsets. More...
 
virtual float GetTransportOrientation () const =0
 
virtual void AddPassenger (WorldObject *passenger)=0
 
virtual TransportBaseRemovePassenger (WorldObject *passenger)=0
 
void UpdatePassengerPosition (Map *map, WorldObject *passenger, float x, float y, float z, float o, bool setHomePosition)
 
virtual int32 GetMapIdForSpawning () const =0
 

Static Public Attributes

static constexpr Milliseconds PositionUpdateInterval = 50ms
 

Private Attributes

TransportAnimation const * _animationInfo
 
uint32 _pathProgress
 
uint32 _stateChangeTime
 
uint32 _stateChangeProgress
 
std::vector< uint32_stopFrames
 
bool _autoCycleBetweenStopFrames
 
TimeTracker _positionUpdateTimer
 
std::unordered_set< WorldObject * > _passengers
 

Additional Inherited Members

- Static Public Member Functions inherited from TransportBase
static void CalculatePassengerPosition (float &x, float &y, float &z, float *o, float transX, float transY, float transZ, float transO)
 
static void CalculatePassengerOffset (float &x, float &y, float &z, float *o, float transX, float transY, float transZ, float transO)
 
- Protected Member Functions inherited from TransportBase
 TransportBase ()
 
virtual ~TransportBase ()
 
- Protected Attributes inherited from GameObjectTypeBase
GameObject_owner
 

Detailed Description

Definition at line 129 of file GameObject.cpp.

Constructor & Destructor Documentation

◆ Transport()

GameObjectType::Transport::Transport ( GameObject owner)
inlineexplicit

Definition at line 134 of file GameObject.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddPassenger()

void GameObjectType::Transport::AddPassenger ( WorldObject passenger)
inlineoverridevirtual

Implements TransportBase.

Definition at line 440 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ CalculatePassengerOffset()

void GameObjectType::Transport::CalculatePassengerOffset ( float &  x,
float &  y,
float &  z,
float *  o 
) const
inlineoverridevirtual

This method transforms supplied global coordinates into local offsets.

Implements TransportBase.

Definition at line 473 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ CalculatePassengerPosition()

void GameObjectType::Transport::CalculatePassengerPosition ( float &  x,
float &  y,
float &  z,
float *  o 
) const
inlineoverridevirtual

This method transforms supplied transport offsets into global coordinates.

Implements TransportBase.

Definition at line 468 of file GameObject.cpp.

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

◆ GetMapIdForSpawning()

int32 GameObjectType::Transport::GetMapIdForSpawning ( ) const
inlineoverridevirtual

Implements TransportBase.

Definition at line 478 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ GetPauseTimes()

std::vector< uint32 > const * GameObjectType::Transport::GetPauseTimes ( ) const
inline

Definition at line 431 of file GameObject.cpp.

◆ GetTransportGUID()

ObjectGuid GameObjectType::Transport::GetTransportGUID ( ) const
inlineoverridevirtual

Implements TransportBase.

Definition at line 436 of file GameObject.cpp.

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

◆ GetTransportOrientation()

float GameObjectType::Transport::GetTransportOrientation ( ) const
inlineoverridevirtual

Implements TransportBase.

Definition at line 438 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ GetTransportPeriod()

uint32 GameObjectType::Transport::GetTransportPeriod ( ) const
inline

Definition at line 423 of file GameObject.cpp.

+ Here is the caller graph for this function:

◆ OnRelocated()

void GameObjectType::Transport::OnRelocated ( )
inlineoverridevirtual

Reimplemented from GameObjectTypeBase.

Definition at line 407 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ OnStateChanged()

void GameObjectType::Transport::OnStateChanged ( GOState  oldState,
GOState  newState 
)
inlineoverridevirtual

Reimplemented from GameObjectTypeBase.

Definition at line 348 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ RemovePassenger()

TransportBase * GameObjectType::Transport::RemovePassenger ( WorldObject passenger)
inlineoverridevirtual

Implements TransportBase.

Definition at line 453 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ SetAutoCycleBetweenStopFrames()

void GameObjectType::Transport::SetAutoCycleBetweenStopFrames ( bool  on)
inline

Definition at line 483 of file GameObject.cpp.

◆ Update()

void GameObjectType::Transport::Update ( uint32  diff)
inlineoverridevirtual

Reimplemented from GameObjectTypeBase.

Definition at line 183 of file GameObject.cpp.

+ Here is the call graph for this function:

◆ UpdatePassengerPositions()

void GameObjectType::Transport::UpdatePassengerPositions ( )
inline

Definition at line 412 of file GameObject.cpp.

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

Member Data Documentation

◆ _animationInfo

TransportAnimation const* GameObjectType::Transport::_animationInfo
private

Definition at line 489 of file GameObject.cpp.

◆ _autoCycleBetweenStopFrames

bool GameObjectType::Transport::_autoCycleBetweenStopFrames
private

Definition at line 494 of file GameObject.cpp.

◆ _passengers

std::unordered_set<WorldObject*> GameObjectType::Transport::_passengers
private

Definition at line 496 of file GameObject.cpp.

◆ _pathProgress

uint32 GameObjectType::Transport::_pathProgress
private

Definition at line 490 of file GameObject.cpp.

◆ _positionUpdateTimer

TimeTracker GameObjectType::Transport::_positionUpdateTimer
private

Definition at line 495 of file GameObject.cpp.

◆ _stateChangeProgress

uint32 GameObjectType::Transport::_stateChangeProgress
private

Definition at line 492 of file GameObject.cpp.

◆ _stateChangeTime

uint32 GameObjectType::Transport::_stateChangeTime
private

Definition at line 491 of file GameObject.cpp.

◆ _stopFrames

std::vector<uint32> GameObjectType::Transport::_stopFrames
private

Definition at line 493 of file GameObject.cpp.

◆ PositionUpdateInterval

constexpr Milliseconds GameObjectType::Transport::PositionUpdateInterval = 50ms
staticconstexpr

Definition at line 132 of file GameObject.cpp.


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