TrinityCore
BattlegroundScript Class Reference

#include <BattlegroundScript.h>

+ Inheritance diagram for BattlegroundScript:

Public Member Functions

 BattlegroundScript (BattlegroundMap *map)
 
 ~BattlegroundScript () override=default
 
virtual void OnInit ()
 
virtual void OnUpdate (uint32 diff)
 
virtual void OnPrepareStage1 ()
 
virtual void OnPrepareStage2 ()
 
virtual void OnPrepareStage3 ()
 
virtual void OnStart ()
 
virtual void OnEnd (Team winner)
 
virtual void OnPlayerJoined (Player *player, bool inBattleground)
 
virtual void OnPlayerLeft (Player *player)
 
virtual void OnPlayerKilled (Player *victim, Player *killer)
 
virtual void OnUnitKilled (Creature *victim, Unit *killer)
 
virtual Team GetPrematureWinner ()
 
void TriggerGameEvent (uint32 gameEventId, WorldObject *source=nullptr, WorldObject *target=nullptr) override
 
- Public Member Functions inherited from ZoneScript
 ZoneScript ()
 
 ZoneScript (ZoneScript const &right)
 
 ZoneScript (ZoneScript &&right) noexcept
 
ZoneScriptoperator= (ZoneScript const &right)
 
ZoneScriptoperator= (ZoneScript &&right) noexcept
 
virtual ~ZoneScript ()
 
virtual uint32 GetCreatureEntry (ObjectGuid::LowType, CreatureData const *data)
 
virtual uint32 GetGameObjectEntry (ObjectGuid::LowType, uint32 entry)
 
virtual void OnCreatureCreate (Creature *)
 
virtual void OnCreatureRemove (Creature *)
 
virtual void OnGameObjectCreate (GameObject *)
 
virtual void OnGameObjectRemove (GameObject *)
 
virtual void OnAreaTriggerCreate (AreaTrigger *areaTrigger)
 
virtual void OnAreaTriggerRemove (AreaTrigger *areaTrigger)
 
virtual void OnUnitDeath (Unit *unit)
 
virtual void OnCreatureGroupDepleted (CreatureGroup const *creatureGroup)
 
virtual ObjectGuid GetGuidData (uint32) const
 
virtual void SetGuidData (uint32, ObjectGuid)
 
virtual uint64 GetData64 (uint32) const
 
virtual void SetData64 (uint32, uint64)
 
virtual uint32 GetData (uint32) const
 
virtual void SetData (uint32, uint32)
 
virtual void TriggerGameEvent (uint32 gameEventId, WorldObject *source=nullptr, WorldObject *target=nullptr)
 
virtual void ProcessEvent (WorldObject *obj, uint32 eventId, WorldObject *invoker)
 
virtual void DoAction (uint32 actionId, WorldObject *source=nullptr, WorldObject *target=nullptr)
 
virtual void OnFlagStateChange (GameObject *flagInBase, FlagState oldValue, FlagState newValue, Player *player)
 
virtual bool CanCaptureFlag (AreaTrigger *areaTrigger, Player *player)
 
virtual void OnCaptureFlag (AreaTrigger *areaTrigger, Player *player)
 
virtual void OnFlagTaken (GameObject *flag, Player *player)
 
virtual void OnFlagDropped (ObjectGuid const &flagGuid, Player *player)
 

Protected Member Functions

void UpdateWorldState (int32 worldStateId, int32 value, bool hidden=false) const
 

Protected Attributes

BattlegroundMapbattlegroundMap
 
Battlegroundbattleground
 

Detailed Description

Definition at line 32 of file BattlegroundScript.h.

Constructor & Destructor Documentation

◆ BattlegroundScript()

BattlegroundScript::BattlegroundScript ( BattlegroundMap map)
explicit

Definition at line 30 of file BattlegroundScript.cpp.

+ Here is the call graph for this function:

◆ ~BattlegroundScript()

BattlegroundScript::~BattlegroundScript ( )
overridedefault

Member Function Documentation

◆ GetPrematureWinner()

Team BattlegroundScript::GetPrematureWinner ( )
virtual

Reimplemented in battleground_alterac_valley, battleground_arathi_basin, battleground_eye_of_the_storm, battleground_twin_peaks, and battleground_warsong_gulch.

Definition at line 45 of file BattlegroundScript.cpp.

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

◆ OnEnd()

virtual void BattlegroundScript::OnEnd ( Team  winner)
inlinevirtual

Reimplemented in battleground_alterac_valley, battleground_arathi_basin, battleground_eye_of_the_storm, battleground_strand_of_the_ancients, and battleground_warsong_gulch.

Definition at line 44 of file BattlegroundScript.h.

+ Here is the caller graph for this function:

◆ OnInit()

virtual void BattlegroundScript::OnInit ( )
inlinevirtual

Reimplemented in battleground_arathi_basin, arena_blades_edge, arena_dalaran_sewers, battleground_eye_of_the_storm, battleground_isle_of_conquest, arena_nagrand, arena_ring_of_valor, arena_ruins_of_lordaeron, battleground_silvershard_mines, battleground_strand_of_the_ancients, and battleground_temple_of_kotmogu.

Definition at line 38 of file BattlegroundScript.h.

+ Here is the caller graph for this function:

◆ OnPlayerJoined()

virtual void BattlegroundScript::OnPlayerJoined ( Player player,
bool  inBattleground 
)
inlinevirtual

Reimplemented in battleground_strand_of_the_ancients.

Definition at line 45 of file BattlegroundScript.h.

+ Here is the caller graph for this function:

◆ OnPlayerKilled()

virtual void BattlegroundScript::OnPlayerKilled ( Player victim,
Player killer 
)
inlinevirtual

Reimplemented in battleground_isle_of_conquest, and battleground_alterac_valley.

Definition at line 47 of file BattlegroundScript.h.

+ Here is the caller graph for this function:

◆ OnPlayerLeft()

virtual void BattlegroundScript::OnPlayerLeft ( Player player)
inlinevirtual

Reimplemented in battleground_alterac_valley.

Definition at line 46 of file BattlegroundScript.h.

+ Here is the caller graph for this function:

◆ OnPrepareStage1()

virtual void BattlegroundScript::OnPrepareStage1 ( )
inlinevirtual

Definition at line 40 of file BattlegroundScript.h.

+ Here is the caller graph for this function:

◆ OnPrepareStage2()

virtual void BattlegroundScript::OnPrepareStage2 ( )
inlinevirtual

Reimplemented in battleground_seething_shore, and battleground_silvershard_mines.

Definition at line 41 of file BattlegroundScript.h.

+ Here is the caller graph for this function:

◆ OnPrepareStage3()

virtual void BattlegroundScript::OnPrepareStage3 ( )
inlinevirtual

Reimplemented in battleground_seething_shore, and battleground_temple_of_kotmogu.

Definition at line 42 of file BattlegroundScript.h.

+ Here is the caller graph for this function:

◆ OnStart()

virtual void BattlegroundScript::OnStart ( )
inlinevirtual

◆ OnUnitKilled()

virtual void BattlegroundScript::OnUnitKilled ( Creature victim,
Unit killer 
)
inlinevirtual

Reimplemented in battleground_isle_of_conquest, battleground_alterac_valley, and battleground_strand_of_the_ancients.

Definition at line 48 of file BattlegroundScript.h.

+ Here is the caller graph for this function:

◆ OnUpdate()

virtual void BattlegroundScript::OnUpdate ( uint32  diff)
inlinevirtual

◆ TriggerGameEvent()

void BattlegroundScript::TriggerGameEvent ( uint32  gameEventId,
WorldObject source = nullptr,
WorldObject target = nullptr 
)
overridevirtual

Reimplemented from ZoneScript.

Definition at line 56 of file BattlegroundScript.cpp.

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

◆ UpdateWorldState()

void BattlegroundScript::UpdateWorldState ( int32  worldStateId,
int32  value,
bool  hidden = false 
) const
protected

Definition at line 65 of file BattlegroundScript.cpp.

+ Here is the caller graph for this function:

Member Data Documentation

◆ battleground

Battleground* BattlegroundScript::battleground
protected

Definition at line 57 of file BattlegroundScript.h.

◆ battlegroundMap

BattlegroundMap* BattlegroundScript::battlegroundMap
protected

Definition at line 56 of file BattlegroundScript.h.


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