TrinityCore
Loading...
Searching...
No Matches
GameObjectType::ControlZone Class Reference
+ Inheritance diagram for GameObjectType::ControlZone:

Public Member Functions

 ControlZone (GameObject &owner)
 
void Update (uint32 diff) override
 
TeamId GetControllingTeam () const
 
GuidUnorderedSet const * GetInsidePlayers () const
 
void ActivateObject (GameObjectActions action, int32, WorldObject *, uint32, int32) override
 
void SetValue (float value)
 
void HandleHeartbeat ()
 
void SearchTargets (std::vector< Player * > &targetList)
 
float CalculatePointsPerSecond (std::vector< Player * > const &targetList) const
 
float CalculateTimeNeeded (int32 hordePlayers, int32 alliancePlayers) const
 
void HandleUnitEnterExit (std::vector< Player * > const &newTargetList)
 
float GetMaxHordeValue () const
 
float GetMinAllianceValue () const
 
void TriggerEvent (uint32 eventId) const
 
uint32 GetStartingValue () const
 
- Public Member Functions inherited from GameObjectTypeBase
 GameObjectTypeBase (GameObject &owner)
 
virtual ~GameObjectTypeBase ()=default
 
virtual void OnStateChanged (GOState oldState, GOState newState)
 
virtual void OnRelocated ()
 
virtual bool IsNeverVisibleFor (WorldObject const *seer, bool allowServersideObjects) const
 

Private Attributes

Milliseconds _heartbeatRate
 
TimeTracker _heartbeatTracker
 
GuidUnorderedSet _insidePlayers
 
TeamId _previousTeamId
 
float _value
 
bool _contestedTriggered
 

Additional Inherited Members

- Protected Attributes inherited from GameObjectTypeBase
GameObject & _owner
 

Detailed Description

Definition at line 586 of file GameObject.cpp.

Constructor & Destructor Documentation

◆ ControlZone()

Member Function Documentation

◆ ActivateObject()

void GameObjectType::ControlZone::ActivateObject ( GameObjectActions  action,
int32  ,
WorldObject *  ,
uint32  ,
int32   
)
inlineoverridevirtual

◆ CalculatePointsPerSecond()

float GameObjectType::ControlZone::CalculatePointsPerSecond ( std::vector< Player * > const &  targetList) const
inline

Definition at line 710 of file GameObject.cpp.

References CalculateTimeNeeded(), and TEAM_HORDE.

Referenced by HandleHeartbeat().

◆ CalculateTimeNeeded()

◆ GetControllingTeam()

TeamId GameObjectType::ControlZone::GetControllingTeam ( ) const
inline

◆ GetInsidePlayers()

GuidUnorderedSet const * GameObjectType::ControlZone::GetInsidePlayers ( ) const
inline

Definition at line 627 of file GameObject.cpp.

References _insidePlayers.

◆ GetMaxHordeValue()

float GameObjectType::ControlZone::GetMaxHordeValue ( ) const
inline

◆ GetMinAllianceValue()

float GameObjectType::ControlZone::GetMinAllianceValue ( ) const
inline

◆ GetStartingValue()

uint32 GameObjectType::ControlZone::GetStartingValue ( ) const
inline

◆ HandleHeartbeat()

◆ HandleUnitEnterExit()

◆ SearchTargets()

void GameObjectType::ControlZone::SearchTargets ( std::vector< Player * > &  targetList)
inline

◆ SetValue()

void GameObjectType::ControlZone::SetValue ( float  value)
inline

Definition at line 645 of file GameObject.cpp.

References _value.

Referenced by HandleHeartbeat().

◆ TriggerEvent()

void GameObjectType::ControlZone::TriggerEvent ( uint32  eventId) const
inline

◆ Update()

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

Member Data Documentation

◆ _contestedTriggered

bool GameObjectType::ControlZone::_contestedTriggered
private

Definition at line 824 of file GameObject.cpp.

Referenced by ControlZone(), and HandleHeartbeat().

◆ _heartbeatRate

Milliseconds GameObjectType::ControlZone::_heartbeatRate
private

Definition at line 819 of file GameObject.cpp.

Referenced by ControlZone(), HandleHeartbeat(), and Update().

◆ _heartbeatTracker

TimeTracker GameObjectType::ControlZone::_heartbeatTracker
private

Definition at line 820 of file GameObject.cpp.

Referenced by ControlZone(), and Update().

◆ _insidePlayers

GuidUnorderedSet GameObjectType::ControlZone::_insidePlayers
private

Definition at line 821 of file GameObject.cpp.

Referenced by ActivateObject(), GetInsidePlayers(), and HandleUnitEnterExit().

◆ _previousTeamId

TeamId GameObjectType::ControlZone::_previousTeamId
private

Definition at line 822 of file GameObject.cpp.

Referenced by ControlZone().

◆ _value

float GameObjectType::ControlZone::_value
private

Definition at line 823 of file GameObject.cpp.

Referenced by GetControllingTeam(), HandleHeartbeat(), HandleUnitEnterExit(), and SetValue().


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