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

#include <BattlegroundScript.h>

+ Inheritance diagram for BattlegroundScript:

Public Member Functions

 BattlegroundScript (BattlegroundMap *map) noexcept
 
 ~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 () noexcept
 
 ZoneScript (ZoneScript const &right)
 
 ZoneScript (ZoneScript &&right) noexcept
 
ZoneScript & operator= (ZoneScript const &right)
 
ZoneScript & operator= (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 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

BattlegroundMap * battlegroundMap
 
Battleground * battleground
 

Detailed Description

Definition at line 32 of file BattlegroundScript.h.

Constructor & Destructor Documentation

◆ BattlegroundScript()

BattlegroundScript::BattlegroundScript ( BattlegroundMap *  map)
explicitnoexcept

◆ ~BattlegroundScript()

BattlegroundScript::~BattlegroundScript ( )
overridedefault

Member Function Documentation

◆ GetPrematureWinner()

◆ OnEnd()

◆ OnInit()

◆ OnPlayerJoined()

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

◆ OnPlayerKilled()

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

◆ OnPlayerLeft()

virtual void BattlegroundScript::OnPlayerLeft ( Player *  player)
inlinevirtual

Reimplemented in battleground_alterac_valley.

Definition at line 46 of file BattlegroundScript.h.

Referenced by battleground_alterac_valley::OnPlayerLeft().

◆ OnPrepareStage1()

virtual void BattlegroundScript::OnPrepareStage1 ( )
inlinevirtual

Reimplemented in arena_hook_point.

Definition at line 40 of file BattlegroundScript.h.

Referenced by Battleground::_ProcessJoin().

◆ OnPrepareStage2()

◆ OnPrepareStage3()

virtual void BattlegroundScript::OnPrepareStage3 ( )
inlinevirtual

◆ OnStart()

◆ OnUnitKilled()

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

◆ OnUpdate()

◆ TriggerGameEvent()

◆ UpdateWorldState()

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

Definition at line 65 of file BattlegroundScript.cpp.

References battlegroundMap, and WorldStateMgr::SetValue().

Referenced by battleground_strand_of_the_ancients::CaptureGraveyard(), battleground_temple_of_kotmogu::CheckWinner(), battleground_alterac_valley::DoAction(), battleground_eye_of_the_storm::EventTeamCapturedPoint(), battleground_eye_of_the_storm::EventTeamLostPoint(), battleground_seething_shore::HandleAssaultPoint(), battleground_battle_for_gilneas::HandleAssaultPoint(), battleground_battle_for_gilneas::HandleCapturePoint(), battleground_battle_for_gilneas::HandleDefendPoint(), battleground_eye_of_the_storm::OnCaptureFlag(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_temple_of_kotmogu::OnFlagDropped(), battleground_eye_of_the_storm::OnFlagStateChange(), battleground_deephaul_ravine::OnFlagStateChange(), battleground_temple_of_kotmogu::OnFlagTaken(), battleground_isle_of_conquest::OnGateDestroyed(), battleground_arathi_basin::OnInit(), battleground_eye_of_the_storm::OnInit(), battleground_silvershard_mines::OnMineCartCaptured(), battleground_isle_of_conquest::OnPlayerKilled(), battleground_alterac_valley::OnStart(), battleground_deephaul_ravine::OnStart(), battleground_twin_peaks::OnStart(), battleground_warsong_gulch::OnStart(), battleground_alterac_valley::OnUnitKilled(), battleground_strand_of_the_ancients::OnUnitKilled(), battleground_arathi_basin::OnUpdate(), battleground_battle_for_gilneas::OnUpdate(), battleground_isle_of_conquest::OnUpdate(), battleground_strand_of_the_ancients::OnUpdate(), battleground_arathi_basin::ProcessEvent(), battleground_strand_of_the_ancients::ProcessEvent(), battleground_strand_of_the_ancients::ResetObjs(), battleground_alterac_valley::SendMineWorldStates(), battleground_silvershard_mines::SendTeamScores(), battleground_strand_of_the_ancients::ToggleTimer(), battleground_silvershard_mines::UpdateCartWorldStates(), battleground_twin_peaks::UpdateFlagState(), battleground_warsong_gulch::UpdateFlagState(), battleground_alterac_valley::UpdateNodeWorldState(), battleground_isle_of_conquest::UpdateNodeWorldState(), battleground_eye_of_the_storm::UpdatePointsCount(), battleground_alterac_valley::UpdateScore(), battleground_eye_of_the_storm::UpdateTeamScore(), battleground_twin_peaks::UpdateTeamScore(), and battleground_warsong_gulch::UpdateTeamScore().

Member Data Documentation

◆ battleground

Battleground* BattlegroundScript::battleground
protected

Definition at line 57 of file BattlegroundScript.h.

Referenced by battleground_eye_of_the_storm::AddPoint(), battleground_arathi_basin::battleground_arathi_basin(), battleground_eye_of_the_storm::battleground_eye_of_the_storm(), battleground_deephaul_ravine::CanCaptureFlag(), battleground_eye_of_the_storm::CanCaptureFlag(), battleground_twin_peaks::CanCaptureFlag(), battleground_warsong_gulch::CanCaptureFlag(), battleground_silvershard_mines::CheckWinner(), battleground_temple_of_kotmogu::CheckWinner(), ArenaScript::CreateCreature(), ArenaScript::CreateObject(), battleground_alterac_valley::DoAction(), battleground_strand_of_the_ancients::EndRound(), battleground_alterac_valley::EventPlayerAssaultsPoint(), battleground_alterac_valley::EventPlayerDefendsPoint(), battleground_alterac_valley::EventPlayerDestroyedPoint(), battleground_eye_of_the_storm::EventTeamCapturedPoint(), battleground_eye_of_the_storm::EventTeamLostPoint(), GetPrematureWinner(), battleground_eye_of_the_storm::GetPrematureWinner(), battleground_twin_peaks::GetPrematureWinner(), battleground_warsong_gulch::GetPrematureWinner(), battleground_seething_shore::HandleAssaultPoint(), battleground_battle_for_gilneas::HandleAssaultPoint(), battleground_strand_of_the_ancients::HandleCaptureGraveyardAction(), battleground_isle_of_conquest::HandleCaptureNodeAction(), battleground_battle_for_gilneas::HandleCapturePoint(), battleground_battle_for_gilneas::HandleDefendPoint(), battleground_twin_peaks::HandleFlagRoomCapturePoint(), battleground_warsong_gulch::HandleFlagRoomCapturePoint(), battleground_silvershard_mines::HandleProgressEvent(), battleground_deephaul_ravine::OnCaptureFlag(), battleground_eye_of_the_storm::OnCaptureFlag(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_silvershard_mines::OnCreatureCreate(), battleground_alterac_valley::OnEnd(), battleground_arathi_basin::OnEnd(), battleground_eye_of_the_storm::OnEnd(), battleground_strand_of_the_ancients::OnEnd(), battleground_warsong_gulch::OnEnd(), battleground_eye_of_the_storm::OnFlagStateChange(), battleground_deephaul_ravine::OnFlagStateChange(), battleground_twin_peaks::OnFlagStateChange(), battleground_warsong_gulch::OnFlagStateChange(), battleground_temple_of_kotmogu::OnFlagTaken(), battleground_isle_of_conquest::OnGateDestroyed(), battleground_silvershard_mines::OnMineCartCaptured(), battleground_isle_of_conquest::OnPlayerAssaultNode(), battleground_silvershard_mines::OnPlayerCapturedMineCart(), battleground_isle_of_conquest::OnPlayerDefendNode(), battleground_isle_of_conquest::OnPlayerInteractWithBanner(), battleground_isle_of_conquest::OnPlayerKilled(), battleground_alterac_valley::OnPlayerKilled(), arena_dalaran_sewers::OnStart(), battleground_deephaul_ravine::OnStart(), battleground_silvershard_mines::OnStart(), battleground_silvershard_mines::OnTrackSwitched(), battleground_isle_of_conquest::OnUnitKilled(), battleground_alterac_valley::OnUnitKilled(), battleground_strand_of_the_ancients::OnUnitKilled(), battleground_alterac_valley::OnUpdate(), battleground_arathi_basin::OnUpdate(), battleground_battle_for_gilneas::OnUpdate(), arena_dalaran_sewers::OnUpdate(), battleground_eye_of_the_storm::OnUpdate(), battleground_isle_of_conquest::OnUpdate(), arena_ring_of_valor::OnUpdate(), battleground_strand_of_the_ancients::OnUpdate(), battleground_twin_peaks::OnUpdate(), battleground_warsong_gulch::OnUpdate(), battleground_arathi_basin::ProcessEvent(), battleground_strand_of_the_ancients::ProcessEvent(), battleground_strand_of_the_ancients::ResetObjs(), battleground_silvershard_mines::SendTeamScores(), battleground_seething_shore::SpawnAzeriteNodes(), battleground_strand_of_the_ancients::StartShips(), battleground_strand_of_the_ancients::TeleportPlayers(), battleground_strand_of_the_ancients::TeleportToEntrancePosition(), battleground_strand_of_the_ancients::TitanRelicActivated(), arena_ring_of_valor::TogglePillarCollision(), TriggerGameEvent(), battleground_alterac_valley::UpdateScore(), battleground_eye_of_the_storm::UpdateTeamScore(), battleground_twin_peaks::UpdateTeamScore(), and battleground_warsong_gulch::UpdateTeamScore().

◆ battlegroundMap

BattlegroundMap* BattlegroundScript::battlegroundMap
protected

Definition at line 56 of file BattlegroundScript.h.

Referenced by battleground_arathi_basin::_CalculateTeamNodes(), battleground_battle_for_gilneas::CalculateTeamNodes(), battleground_deephaul_ravine::CanCaptureFlag(), battleground_eye_of_the_storm::CanCaptureFlag(), battleground_temple_of_kotmogu::CheckWinner(), ArenaScript::CreateCreature(), ArenaScript::CreateObject(), battleground_eye_of_the_storm::DoForFlagKeepers(), battleground_twin_peaks::DoForFlagKeepers(), battleground_warsong_gulch::DoForFlagKeepers(), battleground_strand_of_the_ancients::EndRound(), battleground_alterac_valley::EventPlayerAssaultsPoint(), battleground_alterac_valley::EventPlayerDefendsPoint(), battleground_alterac_valley::EventPlayerDestroyedPoint(), battleground_alterac_valley::FindHerald(), battleground_strand_of_the_ancients::FindKanrethad(), battleground_eye_of_the_storm::GetControlledBaseCount(), battleground_twin_peaks::GetFlagCarrierGUID(), battleground_warsong_gulch::GetFlagCarrierGUID(), battleground_twin_peaks::GetFlagState(), battleground_warsong_gulch::GetFlagState(), battleground_seething_shore::HandleAssaultPoint(), battleground_isle_of_conquest::HandleCapturedNodes(), battleground_twin_peaks::HandleFlagRoomCapturePoint(), battleground_warsong_gulch::HandleFlagRoomCapturePoint(), arena_cage_of_carnage::HandleKill(), arena_enigma_crucible::HandleKill(), arena_hook_point::HandleKill(), arena_mugambala::HandleKill(), arena_nokhudon_proving_grounds::HandleKill(), arena_hook_point::HandleReactionCheer(), arena_cage_of_carnage::HandleReactionLowHealth(), arena_enigma_crucible::HandleReactionLowHealth(), arena_mugambala::HandleReactionLowHealth(), arena_nokhudon_proving_grounds::HandleReactionLowHealth(), arena_blades_edge_legion::HandleReactionTriggerLowHealth(), battleground_alterac_valley::IsCaptainAlive(), battleground_strand_of_the_ancients::IsGateDestroyed(), battleground_strand_of_the_ancients::MakeObjectsInteractable(), battleground_deephaul_ravine::OnCaptureFlag(), battleground_eye_of_the_storm::OnCaptureFlag(), battleground_twin_peaks::OnCaptureFlag(), battleground_warsong_gulch::OnCaptureFlag(), battleground_temple_of_kotmogu::OnFlagDropped(), battleground_temple_of_kotmogu::OnFlagTaken(), battleground_isle_of_conquest::OnGateDestroyed(), battleground_deephaul_ravine::OnInit(), battleground_isle_of_conquest::OnInit(), battleground_silvershard_mines::OnInit(), battleground_isle_of_conquest::OnPlayerAssaultNode(), battleground_isle_of_conquest::OnPlayerInteractWithBanner(), arena_hook_point::OnPrepareStage1(), arena_cage_of_carnage::OnPrepareStage2(), arena_enigma_crucible::OnPrepareStage2(), arena_mugambala::OnPrepareStage2(), arena_nokhudon_proving_grounds::OnPrepareStage2(), battleground_seething_shore::OnPrepareStage2(), battleground_temple_of_kotmogu::OnPrepareStage3(), battleground_alterac_valley::OnStart(), arena_ashamanes_fall::OnStart(), battleground_battle_for_gilneas::OnStart(), arena_black_rook_hold_arena::OnStart(), arena_blades_edge::OnStart(), arena_blades_edge_legion::OnStart(), arena_cage_of_carnage::OnStart(), arena_dalaran_sewers::OnStart(), battleground_deephaul_ravine::OnStart(), arena_empyrean_domain::OnStart(), arena_enigma_crucible::OnStart(), battleground_eye_of_the_storm::OnStart(), arena_hook_point::OnStart(), battleground_isle_of_conquest::OnStart(), arena_maldraxxus_coliseum::OnStart(), arena_mugambala::OnStart(), arena_nagrand::OnStart(), arena_nagrand_arena_legion::OnStart(), arena_nokhudon_proving_grounds::OnStart(), arena_ring_of_valor::OnStart(), arena_ruins_of_lordaeron::OnStart(), battleground_seething_shore::OnStart(), battleground_silvershard_mines::OnStart(), battleground_temple_of_kotmogu::OnStart(), arena_the_robodrome::OnStart(), arena_tigers_peak::OnStart(), arena_tol_viron_arena::OnStart(), battleground_twin_peaks::OnStart(), battleground_warsong_gulch::OnStart(), battleground_strand_of_the_ancients::OnUnitKilled(), battleground_alterac_valley::OnUpdate(), arena_dalaran_sewers::OnUpdate(), arena_ring_of_valor::OnUpdate(), battleground_arathi_basin::ProcessEvent(), battleground_strand_of_the_ancients::ProcessEvent(), battleground_strand_of_the_ancients::ResetObjs(), battleground_strand_of_the_ancients::SendTransportInit(), battleground_seething_shore::SpawnAzeriteNodes(), battleground_seething_shore::SpawnBuffs(), battleground_silvershard_mines::SpawnEasternMineCart(), battleground_temple_of_kotmogu::SpawnHealingBuff(), battleground_silvershard_mines::SpawnNorthernMineCart(), battleground_temple_of_kotmogu::SpawnOrb(), battleground_silvershard_mines::SpawnSouthernMineCart(), battleground_strand_of_the_ancients::StartShips(), battleground_strand_of_the_ancients::TeleportToEntrancePosition(), arena_ring_of_valor::TogglePillarCollision(), TriggerGameEvent(), and UpdateWorldState().


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