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

#include <Battleground.h>

+ Inheritance diagram for Battleground:

Public Types

typedef std::map< ObjectGuid, BattlegroundPlayer > BattlegroundPlayerMap
 
typedef std::map< ObjectGuid, BattlegroundScore * > BattlegroundScoreMap
 

Public Member Functions

 Battleground ()
 
virtual ~Battleground ()
 
void Update (uint32 diff)
 
virtual bool SetupBattleground ()
 
virtual void Reset ()
 
virtual void StartingEventCloseDoors ()
 
virtual void StartingEventOpenDoors ()
 
virtual void ResetBGSubclass ()
 
virtual void DestroyGate (Player *, GameObject *)
 
virtual bool IsAllNodesControlledByTeam (uint32) const
 
void StartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
 
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=nullptr, uint32=0)
 
std::string const & GetName () const
 
BattlegroundTypeId GetTypeID (bool GetRandom=false) const
 
BattlegroundBracketId GetBracketId () const
 
uint32 GetInstanceID () const
 
BattlegroundStatus GetStatus () const
 
uint32 GetClientInstanceID () const
 
uint32 GetElapsedTime () const
 
uint32 GetRemainingTime () const
 
uint32 GetLastResurrectTime () const
 
uint32 GetMaxPlayers () const
 
uint32 GetMinPlayers () const
 
uint32 GetMinLevel () const
 
uint32 GetMaxLevel () const
 
uint32 GetMaxPlayersPerTeam () const
 
uint32 GetMinPlayersPerTeam () const
 
int32 GetStartDelayTime () const
 
uint8 GetArenaType () const
 
PvPTeamId GetWinner () const
 
uint32 GetScriptId () const
 
uint32 GetBonusHonorFromKill (uint32 kills) const
 
bool IsRandom () const
 
void SetName (std::string const &name)
 
void SetTypeID (BattlegroundTypeId TypeID)
 
void SetRandomTypeID (BattlegroundTypeId TypeID)
 
void SetBracket (PvPDifficultyEntry const *bracketEntry)
 
void SetInstanceID (uint32 InstanceID)
 
void SetStatus (BattlegroundStatus Status)
 
void SetClientInstanceID (uint32 InstanceID)
 
void SetElapsedTime (uint32 Time)
 
void SetRemainingTime (uint32 Time)
 
void SetLastResurrectTime (uint32 Time)
 
void SetMaxPlayers (uint32 MaxPlayers)
 
void SetMinPlayers (uint32 MinPlayers)
 
void SetLevelRange (uint32 min, uint32 max)
 
void SetRated (bool state)
 
void SetArenaType (uint8 type)
 
void SetArenaorBGType (bool _isArena)
 
void SetWinner (PvPTeamId winnerTeamId)
 
void SetScriptId (uint32 scriptId)
 
void ModifyStartDelayTime (int diff)
 
void SetStartDelayTime (int Time)
 
void SetMaxPlayersPerTeam (uint32 MaxPlayers)
 
void SetMinPlayersPerTeam (uint32 MinPlayers)
 
void AddToBGFreeSlotQueue ()
 
void RemoveFromBGFreeSlotQueue ()
 
void RemoveFromBGFreeSlotQueueOnShutdown ()
 
void DecreaseInvitedCount (uint32 team)
 
void IncreaseInvitedCount (uint32 team)
 
void SetRandom (bool isRandom)
 
uint32 GetInvitedCount (uint32 team) const
 
bool HasFreeSlots () const
 
uint32 GetFreeSlotsForTeam (uint32 Team) const
 
bool isArena () const
 
bool isBattleground () const
 
bool isRated () const
 
BattlegroundPlayerMap const & GetPlayers () const
 
uint32 GetPlayersSize () const
 
uint32 GetPlayerScoresSize () const
 
uint32 GetReviveQueueSize () const
 
void AddPlayerToResurrectQueue (ObjectGuid npc_guid, ObjectGuid player_guid)
 
void RemovePlayerFromResurrectQueue (ObjectGuid player_guid)
 
void RelocateDeadPlayers (ObjectGuid guideGuid)
 Relocate all players in ReviveQueue to the closest graveyard.
 
void StartBattleground ()
 
GameObject * GetBGObject (uint32 type, bool logError=true)
 
Creature * GetBGCreature (uint32 type, bool logError=true)
 
void SetMapId (uint32 MapID)
 
uint32 GetMapId () const
 
void SetBgMap (BattlegroundMap *map)
 
BattlegroundMap * GetBgMap () const
 
BattlegroundMap * FindBgMap () const
 
void SetTeamStartPosition (TeamId teamId, Position const &pos)
 
Position const * GetTeamStartPosition (TeamId teamId) const
 
void SetStartMaxDist (float startMaxDist)
 
float GetStartMaxDist () const
 
virtual void FillInitialWorldStates (WorldPackets::WorldState::InitWorldStates &)
 
void SendPacketToTeam (uint32 TeamID, WorldPacket const *packet, Player *sender=nullptr, bool self=true) const
 
void SendPacketToAll (WorldPacket const *packet) const
 
void SendChatMessage (Creature *source, uint8 textId, WorldObject *target=nullptr)
 
void SendBroadcastText (uint32 id, ChatMsg msgType, WorldObject const *target=nullptr)
 
template<class Do >
void BroadcastWorker (Do &_do)
 
void PlaySoundToTeam (uint32 soundID, uint32 teamID)
 
void PlaySoundToAll (uint32 soundID)
 
void CastSpellOnTeam (uint32 SpellID, uint32 TeamID)
 
void RemoveAuraOnTeam (uint32 SpellID, uint32 TeamID)
 
void RewardHonorToTeam (uint32 Honor, uint32 TeamID)
 
void RewardReputationToTeam (uint32 faction_id, uint32 Reputation, uint32 TeamID)
 
void UpdateWorldState (uint32 variable, uint32 value)
 
virtual void EndBattleground (uint32 winner)
 
void BlockMovement (Player *player)
 
void SendMessageToAll (uint32 entry, ChatMsg type, Player const *source=nullptr)
 
void PSendMessageToAll (uint32 entry, ChatMsg type, Player const *source,...)
 
Group * GetBgRaid (uint32 TeamID) const
 
void SetBgRaid (uint32 TeamID, Group *bg_raid)
 
void BuildPvPLogDataPacket (WorldPackets::Battleground::PVPMatchStatistics &pvpLogData)
 
virtual bool UpdatePlayerScore (Player *player, uint32 type, uint32 value, bool doAddHonor=true)
 
uint32 GetPlayersCountByTeam (uint32 Team) const
 
uint32 GetAlivePlayersCountByTeam (uint32 Team) const
 
void UpdatePlayersCountByTeam (uint32 Team, bool remove)
 
virtual void CheckWinConditions ()
 
void SetArenaTeamIdForTeam (uint32 Team, uint32 ArenaTeamId)
 
uint32 GetArenaTeamIdForTeam (uint32 Team) const
 
uint32 GetArenaTeamIdByIndex (uint32 index) const
 
void SetArenaMatchmakerRating (uint32 Team, uint32 MMR)
 
uint32 GetArenaMatchmakerRating (uint32 Team) const
 
virtual void HandleAreaTrigger (Player *, uint32)
 
virtual void HandleKillPlayer (Player *player, Player *killer)
 
virtual void HandleKillUnit (Creature *, Player *)
 
virtual void EventPlayerDroppedFlag (Player *)
 
virtual void EventPlayerClickedOnFlag (Player *, GameObject *)
 
void EventPlayerLoggedIn (Player *player)
 
void EventPlayerLoggedOut (Player *player)
 
virtual void ProcessEvent (WorldObject *, uint32, WorldObject *=nullptr)
 
virtual void DoAction (uint32, ObjectGuid)
 
virtual void HandlePlayerResurrect (Player *)
 
virtual WorldSafeLocsEntry const * GetClosestGraveyard (Player *player)
 
virtual void AddPlayer (Player *player)
 
void AddOrSetPlayerToCorrectBgGroup (Player *player, uint32 team)
 
virtual void RemovePlayerAtLeave (ObjectGuid guid, bool Transport, bool SendPacket)
 
void HandleTriggerBuff (ObjectGuid go_guid)
 
void SetHoliday (bool is_holiday)
 
void SpawnBGObject (uint32 type, uint32 respawntime)
 
virtual bool AddObject (uint32 type, uint32 entry, float x, float y, float z, float o, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime=0, GOState goState=GO_STATE_READY)
 
bool AddObject (uint32 type, uint32 entry, Position const &pos, float rotation0, float rotation1, float rotation2, float rotation3, uint32 respawnTime=0, GOState goState=GO_STATE_READY)
 
virtual Creature * AddCreature (uint32 entry, uint32 type, float x, float y, float z, float o, TeamId teamId=TEAM_NEUTRAL, uint32 respawntime=0, Transport *transport=nullptr)
 
Creature * AddCreature (uint32 entry, uint32 type, Position const &pos, TeamId teamId=TEAM_NEUTRAL, uint32 respawntime=0, Transport *transport=nullptr)
 
bool DelCreature (uint32 type)
 
bool DelObject (uint32 type)
 
bool RemoveObjectFromWorld (uint32 type)
 
virtual bool AddSpiritGuide (uint32 type, float x, float y, float z, float o, TeamId teamId=TEAM_NEUTRAL)
 
bool AddSpiritGuide (uint32 type, Position const &pos, TeamId teamId=TEAM_NEUTRAL)
 
int32 GetObjectType (ObjectGuid guid)
 
void DoorOpen (uint32 type)
 
void DoorClose (uint32 type)
 
virtual bool HandlePlayerUnderMap (Player *)
 
uint32 GetPlayerTeam (ObjectGuid guid) const
 
uint32 GetOtherTeam (uint32 teamId) const
 
bool IsPlayerInBattleground (ObjectGuid guid) const
 
bool ToBeDeleted () const
 
void SetDeleteThis ()
 
void RewardXPAtKill (Player *killer, Player *victim)
 
bool CanAwardArenaPoints () const
 
virtual ObjectGuid GetFlagPickerGUID (int32=-1) const
 
virtual void SetDroppedFlagGUID (ObjectGuid, int32=-1)
 
virtual void HandleQuestComplete (uint32, Player *)
 
virtual bool CanActivateGO (int32, uint32) const
 
virtual bool IsSpellAllowed (uint32, Player const *) const
 
uint32 GetTeamScore (uint32 TeamID) const
 
virtual uint32 GetPrematureWinner ()
 
uint8 GetUniqueBracketId () const
 
BattlegroundPlayer const * GetBattlegroundPlayerData (ObjectGuid const &playerGuid) const
 
Trinity::unique_weak_ptr< Battleground > GetWeakPtr () const
 
void SetWeakPtr (Trinity::unique_weak_ptr< Battleground > weakRef)
 

Static Public Member Functions

static TeamId GetTeamIndexByTeamId (uint32 Team)
 

Public Attributes

GuidVector BgObjects
 
GuidVector BgCreatures
 

Protected Member Functions

void EndNow ()
 
void PlayerAddedToBGCheckIfBGIsRunning (Player *player)
 
Player * _GetPlayer (ObjectGuid guid, bool offlineRemove, char const *context) const
 
Player * _GetPlayer (BattlegroundPlayerMap::iterator itr, char const *context)
 
Player * _GetPlayer (BattlegroundPlayerMap::const_iterator itr, char const *context) const
 
Player * _GetPlayerForTeam (uint32 teamId, BattlegroundPlayerMap::const_iterator itr, char const *context) const
 
void _ProcessOfflineQueue ()
 
void _ProcessResurrect (uint32 diff)
 
void _ProcessProgress (uint32 diff)
 
void _ProcessLeave (uint32 diff)
 
void _ProcessJoin (uint32 diff)
 
void _CheckSafePositions (uint32 diff)
 
virtual void RemovePlayer (Player *, ObjectGuid, uint32)
 

Protected Attributes

BattlegroundScoreMap PlayerScores
 
BattlegroundPlayerMap m_Players
 
std::map< ObjectGuid, GuidVector > m_ReviveQueue
 
uint8 m_Events
 
BattlegroundStartTimeIntervals StartDelayTimes [BG_STARTING_EVENT_COUNT]
 
uint32 StartMessageIds [BG_STARTING_EVENT_COUNT]
 
bool m_BuffChange
 
bool m_IsRandom
 
BGHonorMode m_HonorMode
 
int32 m_TeamScores [PVP_TEAMS_COUNT]
 
ArenaTeamScore _arenaTeamScores [PVP_TEAMS_COUNT]
 

Private Member Functions

virtual bool PreUpdateImpl (uint32)
 Pre-update hook.
 
virtual void PostUpdateImpl (uint32)
 Post-update hook.
 

Private Attributes

BattlegroundTypeId m_TypeID
 
BattlegroundTypeId m_RandomTypeID
 
uint32 m_InstanceID
 
BattlegroundStatus m_Status
 
uint32 m_ClientInstanceID
 
uint32 m_StartTime
 
uint32 m_ResetStatTimer
 
uint32 m_ValidStartPositionTimer
 
int32 m_EndTime
 
uint32 m_LastResurrectTime
 
BattlegroundBracketId m_BracketId
 
uint8 m_ArenaType
 
bool m_InBGFreeSlotQueue
 
bool m_SetDeleteThis
 
bool m_IsArena
 
PvPTeamId _winnerTeamId
 
int32 m_StartDelayTime
 
bool m_IsRated
 
bool m_PrematureCountDown
 
uint32 m_PrematureCountDownTimer
 
std::string m_Name
 
GuidVector m_ResurrectQueue
 
std::deque< ObjectGuid > m_OfflineQueue
 
uint32 m_InvitedAlliance
 
uint32 m_InvitedHorde
 
Group * m_BgRaids [PVP_TEAMS_COUNT]
 
uint32 m_PlayersCount [PVP_TEAMS_COUNT]
 
uint32 m_ArenaTeamIds [PVP_TEAMS_COUNT]
 
uint32 m_ArenaTeamMMR [PVP_TEAMS_COUNT]
 
uint32 m_LevelMin
 
uint32 m_LevelMax
 
uint32 m_MaxPlayersPerTeam
 
uint32 m_MaxPlayers
 
uint32 m_MinPlayersPerTeam
 
uint32 m_MinPlayers
 
uint32 m_MapId
 
BattlegroundMap * m_Map
 
Position StartPosition [PVP_TEAMS_COUNT]
 
float m_StartMaxDist
 
uint32 ScriptId
 
Trinity::unique_weak_ptr< Battleground > m_weakRef
 

Detailed Description

Definition at line 248 of file Battleground.h.

Member Typedef Documentation

◆ BattlegroundPlayerMap

◆ BattlegroundScoreMap

Definition at line 346 of file Battleground.h.

Constructor & Destructor Documentation

◆ Battleground()

◆ ~Battleground()

Member Function Documentation

◆ _CheckSafePositions()

◆ _GetPlayer() [1/3]

Player * Battleground::_GetPlayer ( BattlegroundPlayerMap::const_iterator  itr,
char const *  context 
) const
inlineprotected

Definition at line 523 of file Battleground.h.

References _GetPlayer().

Referenced by _GetPlayer().

◆ _GetPlayer() [2/3]

Player * Battleground::_GetPlayer ( BattlegroundPlayerMap::iterator  itr,
char const *  context 
)
inlineprotected

Definition at line 522 of file Battleground.h.

References _GetPlayer().

Referenced by _GetPlayer().

◆ _GetPlayer() [3/3]

Player * Battleground::_GetPlayer ( ObjectGuid  guid,
bool  offlineRemove,
char const *  context 
) const
protected

◆ _GetPlayerForTeam()

Player * Battleground::_GetPlayerForTeam ( uint32  teamId,
BattlegroundPlayerMap::const_iterator  itr,
char const *  context 
) const
protected

◆ _ProcessJoin()

◆ _ProcessLeave()

void Battleground::_ProcessLeave ( uint32  diff)
inlineprotected

Definition at line 515 of file Battleground.cpp.

References GetRemainingTime(), m_Players, RemovePlayerAtLeave(), and SetRemainingTime().

Referenced by Update().

◆ _ProcessOfflineQueue()

◆ _ProcessProgress()

◆ _ProcessResurrect()

◆ AddCreature() [1/2]

◆ AddCreature() [2/2]

Creature * Battleground::AddCreature ( uint32  entry,
uint32  type,
Position const &  pos,
TeamId  teamId = TEAM_NEUTRAL,
uint32  respawntime = 0,
Transport *  transport = nullptr 
)

◆ AddObject() [1/2]

◆ AddObject() [2/2]

bool Battleground::AddObject ( uint32  type,
uint32  entry,
Position const &  pos,
float  rotation0,
float  rotation1,
float  rotation2,
float  rotation3,
uint32  respawnTime = 0,
GOState  goState = GO_STATE_READY 
)

◆ AddOrSetPlayerToCorrectBgGroup()

◆ AddPlayer()

◆ AddPlayerToResurrectQueue()

void Battleground::AddPlayerToResurrectQueue ( ObjectGuid  npc_guid,
ObjectGuid  player_guid 
)

◆ AddSpiritGuide() [1/2]

◆ AddSpiritGuide() [2/2]

bool Battleground::AddSpiritGuide ( uint32  type,
Position const &  pos,
TeamId  teamId = TEAM_NEUTRAL 
)

◆ AddToBGFreeSlotQueue()

void Battleground::AddToBGFreeSlotQueue ( )

◆ BlockMovement()

void Battleground::BlockMovement ( Player *  player)

Definition at line 828 of file Battleground.cpp.

References Player::SetClientControl().

Referenced by EndBattleground(), and PlayerAddedToBGCheckIfBGIsRunning().

◆ BroadcastWorker()

template<class Do >
void Battleground::BroadcastWorker ( Do &  _do)

Definition at line 64 of file Battleground.cpp.

References _GetPlayer(), and m_Players.

Referenced by PSendMessageToAll(), SendBroadcastText(), and SendMessageToAll().

◆ BuildPvPLogDataPacket()

◆ CanActivateGO()

virtual bool Battleground::CanActivateGO ( int32  ,
uint32   
) const
inlinevirtual

Reimplemented in BattlegroundAV.

Definition at line 495 of file Battleground.h.

◆ CanAwardArenaPoints()

bool Battleground::CanAwardArenaPoints ( ) const
inline

Definition at line 490 of file Battleground.h.

References BG_AWARD_ARENA_POINTS_MIN_LEVEL.

Referenced by EndBattleground().

◆ CastSpellOnTeam()

◆ CheckAchievementCriteriaMeet()

bool Battleground::CheckAchievementCriteriaMeet ( uint32  criteriaId,
Player const *  ,
Unit const *  = nullptr,
uint32  = 0 
)
virtual

◆ CheckWinConditions()

virtual void Battleground::CheckWinConditions ( )
inlinevirtual

Reimplemented in Arena.

Definition at line 420 of file Battleground.h.

Referenced by _ProcessJoin().

◆ DecreaseInvitedCount()

void Battleground::DecreaseInvitedCount ( uint32  team)
inline

Definition at line 330 of file Battleground.h.

References ALLIANCE.

Referenced by RemovePlayerAtLeave().

◆ DelCreature()

◆ DelObject()

◆ DestroyGate()

virtual void Battleground::DestroyGate ( Player *  ,
GameObject *   
)
inlinevirtual

Reimplemented in BattlegroundIC, and BattlegroundSA.

Definition at line 265 of file Battleground.h.

◆ DoAction()

virtual void Battleground::DoAction ( uint32  ,
ObjectGuid   
)
inlinevirtual

Definition at line 444 of file Battleground.h.

◆ DoorClose()

◆ DoorOpen()

◆ EndBattleground()

void Battleground::EndBattleground ( uint32  winner)
virtual

Reimplemented in Arena, BattlegroundAB, BattlegroundAV, BattlegroundEY, BattlegroundSA, and BattlegroundWS.

Definition at line 676 of file Battleground.cpp.

References _GetPlayer(), ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, ALLIANCE, BG_TEXT_ALLIANCE_WINS, BG_TEXT_HORDE_WINS, BattlegroundMgr::BGQueueTypeId(), BlockMovement(), BattlegroundMgr::BuildBattlegroundStatusActive(), BuildPvPLogDataPacket(), CanAwardArenaPoints(), CHAR_INS_PVPSTATS_BATTLEGROUND, CHAR_INS_PVPSTATS_PLAYER, CHAR_SEL_PVPSTATS_MAXID, CharacterDatabase, CHAT_MSG_BG_SYSTEM_NEUTRAL, Unit::CombatStop(), Unit::CombatStopWithPets(), CONFIG_BATTLEGROUND_STORE_STATISTICS_ENABLE, CONFIG_BG_REWARD_LOSER_HONOR_FIRST, CONFIG_BG_REWARD_LOSER_HONOR_LAST, CONFIG_BG_REWARD_WINNER_ARENA_FIRST, CONFIG_BG_REWARD_WINNER_ARENA_LAST, CONFIG_BG_REWARD_WINNER_HONOR_FIRST, CONFIG_BG_REWARD_WINNER_HONOR_LAST, GetArenaType(), Player::GetBattlegroundQueueIndex(), GetBonusHonorFromKill(), GetBracketId(), ObjectGuid::GetCounter(), Object::GetGUID(), WorldLocation::GetMapId(), Player::GetRandomWinner(), WorldPackets::Packet::GetRawPacket(), GetTypeID(), Field::GetUInt64(), GetUniqueBracketId(), GetWinner(), Unit::HasAuraType(), HORDE, Unit::IsAlive(), isBattleground(), BattlegroundMgr::IsBGWeekend(), IsRandom(), m_Players, Player::ModifyArenaPoints(), PlayerScores, PlaySoundToAll(), PVP_TEAM_ALLIANCE, PVP_TEAM_HORDE, PVP_TEAM_NEUTRAL, Unit::RemoveAura(), Unit::RemoveAurasByType(), RemoveFromBGFreeSlotQueue(), Player::ResetAllPowers(), Player::ResurrectPlayer(), SCORE_BONUS_HONOR, SendBroadcastText(), Player::SendDirectMessage(), PreparedStatementBase::setBool(), Player::SetRandomWinner(), SetRemainingTime(), SetStatus(), PreparedStatementBase::setUInt32(), PreparedStatementBase::setUInt64(), PreparedStatementBase::setUInt8(), SetWinner(), SOUND_ALLIANCE_WINS, SOUND_HORDE_WINS, Player::SpawnCorpseBones(), SPELL_AURA_MOD_SHAPESHIFT, SPELL_AURA_SPIRIT_OF_REDEMPTION, SPELL_HONORABLE_DEFENDER_25Y, SPELL_HONORABLE_DEFENDER_60Y, STATUS_WAIT_LEAVE, sWorld, TIME_AUTOCLOSE_BATTLEGROUND, Player::UpdateAchievementCriteria(), UpdatePlayerScore(), WorldPackets::Battleground::PVPMatchStatistics::Write(), and WorldPackets::Battleground::BattlefieldStatusActive::Write().

Referenced by _ProcessProgress(), Arena::EndBattleground(), BattlegroundAB::EndBattleground(), BattlegroundAV::EndBattleground(), BattlegroundEY::EndBattleground(), BattlegroundSA::EndBattleground(), BattlegroundWS::EndBattleground(), BattlegroundIC::EventPlayerClickedOnFlag(), EventPlayerLoggedOut(), bg_commandscript::HandleBgStopCommand(), BattlegroundIC::HandleKillPlayer(), BattlegroundIC::HandleKillUnit(), and Update().

◆ EndNow()

void Battleground::EndNow ( )
protected

◆ EventPlayerClickedOnFlag()

virtual void Battleground::EventPlayerClickedOnFlag ( Player *  ,
GameObject *   
)
inlinevirtual

Reimplemented in BattlegroundWS, BattlegroundIC, BattlegroundSA, BattlegroundAB, BattlegroundAV, and BattlegroundEY.

Definition at line 438 of file Battleground.h.

Referenced by GameObject::Use().

◆ EventPlayerDroppedFlag()

virtual void Battleground::EventPlayerDroppedFlag ( Player *  )
inlinevirtual

Reimplemented in BattlegroundWS, and BattlegroundEY.

Definition at line 437 of file Battleground.h.

◆ EventPlayerLoggedIn()

void Battleground::EventPlayerLoggedIn ( Player *  player)

◆ EventPlayerLoggedOut()

◆ FillInitialWorldStates()

virtual void Battleground::FillInitialWorldStates ( WorldPackets::WorldState::InitWorldStates &  )
inlinevirtual

◆ FindBgMap()

BattlegroundMap * Battleground::FindBgMap ( ) const
inline

◆ GetAlivePlayersCountByTeam()

◆ GetArenaMatchmakerRating()

uint32 Battleground::GetArenaMatchmakerRating ( uint32  Team) const
inline

Definition at line 427 of file Battleground.h.

Referenced by Arena::EndBattleground(), and Arena::RemovePlayerAtLeave().

◆ GetArenaTeamIdByIndex()

uint32 Battleground::GetArenaTeamIdByIndex ( uint32  index) const
inline

Definition at line 425 of file Battleground.h.

Referenced by Arena::EndBattleground().

◆ GetArenaTeamIdForTeam()

uint32 Battleground::GetArenaTeamIdForTeam ( uint32  Team) const
inline

Definition at line 424 of file Battleground.h.

Referenced by Arena::EndBattleground(), and Arena::RemovePlayerAtLeave().

◆ GetArenaType()

◆ GetBattlegroundPlayerData()

BattlegroundPlayer const * Battleground::GetBattlegroundPlayerData ( ObjectGuid const &  playerGuid) const
inline

Definition at line 504 of file Battleground.h.

Referenced by WorldSession::HandleRequestBattlefieldStatusOpcode().

◆ GetBGCreature()

◆ GetBgMap()

◆ GetBGObject()

◆ GetBgRaid()

Group * Battleground::GetBgRaid ( uint32  TeamID) const
inline

◆ GetBonusHonorFromKill()

◆ GetBracketId()

◆ GetClientInstanceID()

uint32 Battleground::GetClientInstanceID ( ) const
inline

◆ GetClosestGraveyard()

◆ GetElapsedTime()

uint32 Battleground::GetElapsedTime ( ) const
inline

◆ GetFlagPickerGUID()

virtual ObjectGuid Battleground::GetFlagPickerGUID ( int32  = -1) const
inlinevirtual

Reimplemented in BattlegroundWS, and BattlegroundEY.

Definition at line 492 of file Battleground.h.

References ObjectGuid::Empty.

Referenced by WorldSession::HandleBattlegroundPlayerPositionsOpcode().

◆ GetFreeSlotsForTeam()

◆ GetInstanceID()

◆ GetInvitedCount()

uint32 Battleground::GetInvitedCount ( uint32  team) const
inline

Definition at line 334 of file Battleground.h.

References ALLIANCE.

Referenced by GetFreeSlotsForTeam(), and Update().

◆ GetLastResurrectTime()

uint32 Battleground::GetLastResurrectTime ( ) const
inline

Definition at line 282 of file Battleground.h.

Referenced by BattlegroundMgr::SendAreaSpiritHealerQueryOpcode().

◆ GetMapId()

◆ GetMaxLevel()

◆ GetMaxPlayers()

uint32 Battleground::GetMaxPlayers ( ) const
inline

Definition at line 283 of file Battleground.h.

Referenced by HasFreeSlots().

◆ GetMaxPlayersPerTeam()

uint32 Battleground::GetMaxPlayersPerTeam ( ) const
inline

◆ GetMinLevel()

uint32 Battleground::GetMinLevel ( ) const
inline

◆ GetMinPlayers()

uint32 Battleground::GetMinPlayers ( ) const
inline

Definition at line 284 of file Battleground.h.

◆ GetMinPlayersPerTeam()

uint32 Battleground::GetMinPlayersPerTeam ( ) const
inline

◆ GetName()

std::string const & Battleground::GetName ( ) const
inline

Definition at line 274 of file Battleground.h.

Referenced by _ProcessJoin().

◆ GetObjectType()

int32 Battleground::GetObjectType ( ObjectGuid  guid)

◆ GetOtherTeam()

uint32 Battleground::GetOtherTeam ( uint32  teamId) const

Definition at line 1724 of file Battleground.cpp.

References ALLIANCE, and HORDE.

Referenced by Arena::EndBattleground(), EventPlayerLoggedOut(), and Arena::RemovePlayerAtLeave().

◆ GetPlayers()

◆ GetPlayerScoresSize()

uint32 Battleground::GetPlayerScoresSize ( ) const
inline

Definition at line 347 of file Battleground.h.

◆ GetPlayersCountByTeam()

uint32 Battleground::GetPlayersCountByTeam ( uint32  Team) const
inline

◆ GetPlayersSize()

uint32 Battleground::GetPlayersSize ( ) const
inline

Definition at line 344 of file Battleground.h.

Referenced by HasFreeSlots(), and Update().

◆ GetPlayerTeam()

uint32 Battleground::GetPlayerTeam ( ObjectGuid  guid) const

Definition at line 1716 of file Battleground.cpp.

References m_Players.

Referenced by EventPlayerLoggedOut(), and RemovePlayerAtLeave().

◆ GetPrematureWinner()

◆ GetRemainingTime()

uint32 Battleground::GetRemainingTime ( ) const
inline

◆ GetReviveQueueSize()

uint32 Battleground::GetReviveQueueSize ( ) const
inline

Definition at line 349 of file Battleground.h.

Referenced by _ProcessResurrect().

◆ GetScriptId()

uint32 Battleground::GetScriptId ( ) const
inline

Definition at line 295 of file Battleground.h.

◆ GetStartDelayTime()

int32 Battleground::GetStartDelayTime ( ) const
inline

Definition at line 292 of file Battleground.h.

Referenced by _ProcessJoin().

◆ GetStartMaxDist()

float Battleground::GetStartMaxDist ( ) const
inline

Definition at line 375 of file Battleground.h.

Referenced by _CheckSafePositions().

◆ GetStatus()

BattlegroundStatus Battleground::GetStatus ( ) const
inline

Definition at line 278 of file Battleground.h.

Referenced by _ProcessOfflineQueue(), AddPlayer(), BattlegroundQueue::BattlegroundQueueUpdate(), BuildPvPLogDataPacket(), SpellInfo::CheckLocation(), BattlegroundAV::EventPlayerAssaultsPoint(), BattlegroundWS::EventPlayerCapturedFlag(), BattlegroundEY::EventPlayerCapturedFlag(), BattlegroundWS::EventPlayerClickedOnFlag(), BattlegroundIC::EventPlayerClickedOnFlag(), BattlegroundAB::EventPlayerClickedOnFlag(), BattlegroundAV::EventPlayerClickedOnFlag(), BattlegroundEY::EventPlayerClickedOnFlag(), BattlegroundAV::EventPlayerDefendsPoint(), BattlegroundWS::EventPlayerDroppedFlag(), BattlegroundEY::EventPlayerDroppedFlag(), EventPlayerLoggedOut(), BattlegroundEY::EventTeamCapturedPoint(), BattlegroundEY::EventTeamLostPoint(), BGQueueRemoveEvent::Execute(), BattlegroundAV::FillInitialWorldStates(), BattlegroundWS::FillInitialWorldStates(), BattlegroundWS::GetClosestGraveyard(), GetFreeSlotsForTeam(), BattlegroundAV::HandleAreaTrigger(), BattlegroundIC::HandleAreaTrigger(), BattlegroundWS::HandleAreaTrigger(), BattlegroundAB::HandleAreaTrigger(), BattlegroundBE::HandleAreaTrigger(), BattlegroundDS::HandleAreaTrigger(), BattlegroundEY::HandleAreaTrigger(), BattlegroundNA::HandleAreaTrigger(), BattlegroundRL::HandleAreaTrigger(), BattlegroundRV::HandleAreaTrigger(), BattlegroundSA::HandleAreaTrigger(), WorldSession::HandleBattleFieldPortOpcode(), Arena::HandleKillPlayer(), BattlegroundAV::HandleKillPlayer(), BattlegroundEY::HandleKillPlayer(), BattlegroundIC::HandleKillPlayer(), BattlegroundWS::HandleKillPlayer(), BattlegroundAV::HandleKillUnit(), BattlegroundIC::HandleKillUnit(), BattlegroundAV::HandleQuestComplete(), Player::LeaveBattleground(), Player::LoadFromDB(), PlayerAddedToBGCheckIfBGIsRunning(), BattlegroundAB::PostUpdateImpl(), BattlegroundAV::PostUpdateImpl(), BattlegroundBE::PostUpdateImpl(), BattlegroundDS::PostUpdateImpl(), BattlegroundEY::PostUpdateImpl(), BattlegroundIC::PostUpdateImpl(), BattlegroundNA::PostUpdateImpl(), BattlegroundRL::PostUpdateImpl(), BattlegroundRV::PostUpdateImpl(), BattlegroundSA::PostUpdateImpl(), BattlegroundWS::PostUpdateImpl(), Arena::RemovePlayer(), RemovePlayerAtLeave(), Arena::RemovePlayerAtLeave(), Player::ReportedAfkBy(), BattlegroundWS::RespawnFlagAfterDrop(), and Update().

◆ GetTeamIndexByTeamId()

◆ GetTeamScore()

◆ GetTeamStartPosition()

Position const * Battleground::GetTeamStartPosition ( TeamId  teamId) const

Definition at line 571 of file Battleground.cpp.

References ASSERT, StartPosition, and TEAM_NEUTRAL.

Referenced by _CheckSafePositions().

◆ GetTypeID()

◆ GetUniqueBracketId()

uint8 Battleground::GetUniqueBracketId ( ) const

Definition at line 1840 of file Battleground.cpp.

References GetMinLevel().

Referenced by EndBattleground().

◆ GetWeakPtr()

Trinity::unique_weak_ptr< Battleground > Battleground::GetWeakPtr ( ) const
inline

Definition at line 513 of file Battleground.h.

◆ GetWinner()

PvPTeamId Battleground::GetWinner ( ) const
inline

Definition at line 294 of file Battleground.h.

Referenced by BuildPvPLogDataPacket(), and EndBattleground().

◆ HandleAreaTrigger()

◆ HandleKillPlayer()

◆ HandleKillUnit()

virtual void Battleground::HandleKillUnit ( Creature *  ,
Player *   
)
inlinevirtual

Reimplemented in BattlegroundSA, BattlegroundAV, and BattlegroundIC.

Definition at line 434 of file Battleground.h.

◆ HandlePlayerResurrect()

virtual void Battleground::HandlePlayerResurrect ( Player *  )
inlinevirtual

Reimplemented in BattlegroundIC.

Definition at line 446 of file Battleground.h.

◆ HandlePlayerUnderMap()

virtual bool Battleground::HandlePlayerUnderMap ( Player *  )
inlinevirtual

Definition at line 479 of file Battleground.h.

Referenced by WorldSession::HandleMovementOpcode().

◆ HandleQuestComplete()

virtual void Battleground::HandleQuestComplete ( uint32  ,
Player *   
)
inlinevirtual

Reimplemented in BattlegroundAV.

Definition at line 494 of file Battleground.h.

◆ HandleTriggerBuff()

◆ HasFreeSlots()

bool Battleground::HasFreeSlots ( ) const

Definition at line 1209 of file Battleground.cpp.

References GetMaxPlayers(), and GetPlayersSize().

Referenced by BattlegroundQueue::BattlegroundQueueUpdate().

◆ IncreaseInvitedCount()

void Battleground::IncreaseInvitedCount ( uint32  team)
inline

Definition at line 331 of file Battleground.h.

References ALLIANCE.

Referenced by BattlegroundQueue::InviteGroupToBG().

◆ IsAllNodesControlledByTeam()

virtual bool Battleground::IsAllNodesControlledByTeam ( uint32  ) const
inlinevirtual

Reimplemented in BattlegroundAB, BattlegroundEY, and BattlegroundIC.

Definition at line 268 of file Battleground.h.

◆ isArena()

◆ isBattleground()

◆ IsPlayerInBattleground()

◆ IsRandom()

bool Battleground::IsRandom ( ) const
inline

◆ isRated()

◆ IsSpellAllowed()

virtual bool Battleground::IsSpellAllowed ( uint32  ,
Player const *   
) const
inlinevirtual

Reimplemented in BattlegroundIC, and BattlegroundSA.

Definition at line 496 of file Battleground.h.

◆ ModifyStartDelayTime()

void Battleground::ModifyStartDelayTime ( int  diff)
inline

Definition at line 320 of file Battleground.h.

Referenced by _ProcessJoin().

◆ PlayerAddedToBGCheckIfBGIsRunning()

◆ PlaySoundToAll()

◆ PlaySoundToTeam()

void Battleground::PlaySoundToTeam ( uint32  soundID,
uint32  teamID 
)

◆ PostUpdateImpl()

virtual void Battleground::PostUpdateImpl ( uint32  )
inlineprivatevirtual

Post-update hook.

Will be called after battleground update has passed. May be used to implement custom update effects in subclasses.

Parameters
diffa time difference between two worldserver update loops in milliseconds.
See also
Update(), PreUpdateImpl().

Reimplemented in BattlegroundAB, BattlegroundAV, BattlegroundBE, BattlegroundDS, BattlegroundEY, BattlegroundIC, BattlegroundNA, BattlegroundRL, BattlegroundRV, BattlegroundSA, and BattlegroundWS.

Definition at line 609 of file Battleground.h.

Referenced by Update().

◆ PreUpdateImpl()

virtual bool Battleground::PreUpdateImpl ( uint32  )
inlineprivatevirtual

Pre-update hook.

Will be called before battleground update is started. Depending on the result of this call actual update body may be skipped.

Parameters
diffa time difference between two worldserver update loops in milliseconds.
Returns
true if update must be performed, false otherwise.
See also
Update(), PostUpdateImpl().

Definition at line 596 of file Battleground.h.

Referenced by Update().

◆ ProcessEvent()

virtual void Battleground::ProcessEvent ( WorldObject *  ,
uint32  ,
WorldObject *  = nullptr 
)
inlinevirtual

Reimplemented in BattlegroundSA.

Definition at line 441 of file Battleground.h.

◆ PSendMessageToAll()

void Battleground::PSendMessageToAll ( uint32  entry,
ChatMsg  type,
Player const *  source,
  ... 
)

Definition at line 1612 of file Battleground.cpp.

References BroadcastWorker().

Referenced by _ProcessProgress().

◆ RelocateDeadPlayers()

◆ RemoveAuraOnTeam()

void Battleground::RemoveAuraOnTeam ( uint32  SpellID,
uint32  TeamID 
)

Definition at line 635 of file Battleground.cpp.

References _GetPlayerForTeam(), and m_Players.

Referenced by BattlegroundIC::HandleCapturedNodes().

◆ RemoveFromBGFreeSlotQueue()

void Battleground::RemoveFromBGFreeSlotQueue ( )

◆ RemoveFromBGFreeSlotQueueOnShutdown()

void Battleground::RemoveFromBGFreeSlotQueueOnShutdown ( )
inline

Definition at line 328 of file Battleground.h.

◆ RemoveObjectFromWorld()

bool Battleground::RemoveObjectFromWorld ( uint32  type)

Definition at line 1558 of file Battleground.cpp.

References BgObjects, GetBgMap(), m_InstanceID, m_MapId, and TC_LOG_INFO.

Referenced by BattlegroundIC::PostUpdateImpl().

◆ RemovePlayer()

virtual void Battleground::RemovePlayer ( Player *  ,
ObjectGuid  ,
uint32   
)
inlineprotectedvirtual

◆ RemovePlayerAtLeave()

void Battleground::RemovePlayerAtLeave ( ObjectGuid  guid,
bool  Transport,
bool  SendPacket 
)
virtual

Reimplemented in Arena.

Definition at line 834 of file Battleground.cpp.

References ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, AddToBGFreeSlotQueue(), BATTLEGROUND_AA, BATTLEGROUND_TYPE_NONE, BattlegroundQueueTypeId::BattlemasterListId, BattlegroundMgr::BGQueueTypeId(), BattlegroundMgr::BuildBattlegroundStatusNone(), Player::ClearAfkReports(), DecreaseInvitedCount(), ObjectAccessor::FindPlayer(), GetArenaType(), Player::GetBattlegroundQueueIndex(), GetBgRaid(), GetBracketId(), GetMapId(), WorldObject::GetName(), GetPlayerTeam(), GetStatus(), GetTypeID(), WorldPackets::Battleground::BattlegroundPlayerLeft::Guid, Unit::HasAuraType(), Unit::IsAlive(), isArena(), isBattleground(), m_Players, Player::OfflineResurrect(), PET_SAVE_NOT_IN_SLOT, PlayerScores, Unit::RemoveAurasByType(), Player::RemoveBattlegroundQueueId(), Player::RemovePet(), RemovePlayer(), RemovePlayerFromResurrectQueue(), Player::ResetAchievementCriteria(), Player::ResummonPetTemporaryUnSummonedIfAny(), Player::ResurrectPlayer(), sBattlegroundMgr, Player::SendDirectMessage(), SendPacketToTeam(), Player::SetBattlegroundId(), SetBgRaid(), Player::SetBGTeam(), Player::SpawnCorpseBones(), SPELL_AURA_MOD_SHAPESHIFT, SPELL_AURA_MOUNTED, SPELL_AURA_SPIRIT_OF_REDEMPTION, STATUS_WAIT_LEAVE, TC_LOG_DEBUG, Player::TeleportToBGEntryPoint(), UpdatePlayersCountByTeam(), WorldPackets::Battleground::BattlefieldStatusNone::Write(), and WorldPackets::Battleground::BattlegroundPlayerLeft::Write().

Referenced by _ProcessLeave(), _ProcessOfflineQueue(), Player::LeaveBattleground(), Player::LoadFromDB(), and Arena::RemovePlayerAtLeave().

◆ RemovePlayerFromResurrectQueue()

void Battleground::RemovePlayerFromResurrectQueue ( ObjectGuid  player_guid)

◆ Reset()

◆ ResetBGSubclass()

virtual void Battleground::ResetBGSubclass ( )
inlinevirtual

Reimplemented in BattlegroundAV.

Definition at line 263 of file Battleground.h.

Referenced by Reset().

◆ RewardHonorToTeam()

◆ RewardReputationToTeam()

◆ RewardXPAtKill()

void Battleground::RewardXPAtKill ( Player *  killer,
Player *  victim 
)

Definition at line 1813 of file Battleground.cpp.

References CONFIG_BG_XP_FOR_KILL, Player::RewardPlayerAndGroupAtKill(), and sWorld.

Referenced by HandleKillPlayer().

◆ SendBroadcastText()

◆ SendChatMessage()

void Battleground::SendChatMessage ( Creature *  source,
uint8  textId,
WorldObject *  target = nullptr 
)

◆ SendMessageToAll()

void Battleground::SendMessageToAll ( uint32  entry,
ChatMsg  type,
Player const *  source = nullptr 
)

Definition at line 1602 of file Battleground.cpp.

References BroadcastWorker().

◆ SendPacketToAll()

void Battleground::SendPacketToAll ( WorldPacket const *  packet) const

Definition at line 577 of file Battleground.cpp.

References _GetPlayer(), and m_Players.

Referenced by PlaySoundToAll(), and UpdateWorldState().

◆ SendPacketToTeam()

void Battleground::SendPacketToTeam ( uint32  TeamID,
WorldPacket const *  packet,
Player *  sender = nullptr,
bool  self = true 
) const

Definition at line 584 of file Battleground.cpp.

References _GetPlayerForTeam(), and m_Players.

Referenced by AddPlayer(), and RemovePlayerAtLeave().

◆ SetArenaMatchmakerRating()

void Battleground::SetArenaMatchmakerRating ( uint32  Team,
uint32  MMR 
)
inline

◆ SetArenaorBGType()

void Battleground::SetArenaorBGType ( bool  _isArena)
inline

Definition at line 316 of file Battleground.h.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetArenaTeamIdForTeam()

void Battleground::SetArenaTeamIdForTeam ( uint32  Team,
uint32  ArenaTeamId 
)
inline

Definition at line 423 of file Battleground.h.

Referenced by BattlegroundQueue::InviteGroupToBG().

◆ SetArenaType()

void Battleground::SetArenaType ( uint8  type)
inline

Definition at line 315 of file Battleground.h.

Referenced by BattlegroundMgr::CreateNewBattleground().

◆ SetBgMap()

void Battleground::SetBgMap ( BattlegroundMap *  map)
inline

◆ SetBgRaid()

void Battleground::SetBgRaid ( uint32  TeamID,
Group *  bg_raid 
)

◆ SetBracket()

◆ SetClientInstanceID()

void Battleground::SetClientInstanceID ( uint32  InstanceID)
inline

Definition at line 307 of file Battleground.h.

Referenced by BattlegroundMgr::CreateNewBattleground().

◆ SetDeleteThis()

void Battleground::SetDeleteThis ( )
inline

Definition at line 487 of file Battleground.h.

◆ SetDroppedFlagGUID()

virtual void Battleground::SetDroppedFlagGUID ( ObjectGuid  ,
int32  = -1 
)
inlinevirtual

Reimplemented in BattlegroundWS, and BattlegroundEY.

Definition at line 493 of file Battleground.h.

◆ SetElapsedTime()

void Battleground::SetElapsedTime ( uint32  Time)
inline

Definition at line 308 of file Battleground.h.

References Time.

Referenced by Reset(), StartBattleground(), and Update().

◆ SetHoliday()

void Battleground::SetHoliday ( bool  is_holiday)

Definition at line 1770 of file Battleground.cpp.

References BG_HOLIDAY, BG_NORMAL, and m_HonorMode.

◆ SetInstanceID()

void Battleground::SetInstanceID ( uint32  InstanceID)
inline

◆ SetLastResurrectTime()

void Battleground::SetLastResurrectTime ( uint32  Time)
inline

Definition at line 310 of file Battleground.h.

References Time.

Referenced by Reset(), and StartBattleground().

◆ SetLevelRange()

void Battleground::SetLevelRange ( uint32  min,
uint32  max 
)
inline

Definition at line 313 of file Battleground.h.

Referenced by BattlegroundMgr::CreateBattleground(), and SetBracket().

◆ SetMapId()

void Battleground::SetMapId ( uint32  MapID)
inline

Definition at line 363 of file Battleground.h.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetMaxPlayers()

void Battleground::SetMaxPlayers ( uint32  MaxPlayers)
inline

◆ SetMaxPlayersPerTeam()

void Battleground::SetMaxPlayersPerTeam ( uint32  MaxPlayers)
inline

◆ SetMinPlayers()

void Battleground::SetMinPlayers ( uint32  MinPlayers)
inline

Definition at line 312 of file Battleground.h.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetMinPlayersPerTeam()

void Battleground::SetMinPlayersPerTeam ( uint32  MinPlayers)
inline

Definition at line 324 of file Battleground.h.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetName()

void Battleground::SetName ( std::string const &  name)
inline

Definition at line 300 of file Battleground.h.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetRandom()

void Battleground::SetRandom ( bool  isRandom)
inline

◆ SetRandomTypeID()

void Battleground::SetRandomTypeID ( BattlegroundTypeId  TypeID)
inline

Definition at line 302 of file Battleground.h.

Referenced by BattlegroundMgr::CreateNewBattleground().

◆ SetRated()

void Battleground::SetRated ( bool  state)
inline

◆ SetRemainingTime()

void Battleground::SetRemainingTime ( uint32  Time)
inline

Definition at line 309 of file Battleground.h.

References Time.

Referenced by _ProcessLeave(), EndBattleground(), EndNow(), and Reset().

◆ SetScriptId()

void Battleground::SetScriptId ( uint32  scriptId)
inline

Definition at line 318 of file Battleground.h.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetStartDelayTime()

void Battleground::SetStartDelayTime ( int  Time)
inline

Definition at line 321 of file Battleground.h.

References Time.

Referenced by _ProcessJoin(), and bg_commandscript::HandleBgStartCommand().

◆ SetStartMaxDist()

void Battleground::SetStartMaxDist ( float  startMaxDist)
inline

Definition at line 374 of file Battleground.h.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetStatus()

◆ SetTeamStartPosition()

void Battleground::SetTeamStartPosition ( TeamId  teamId,
Position const &  pos 
)

Definition at line 565 of file Battleground.cpp.

References ASSERT, StartPosition, and TEAM_NEUTRAL.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetTypeID()

void Battleground::SetTypeID ( BattlegroundTypeId  TypeID)
inline

◆ SetupBattleground()

virtual bool Battleground::SetupBattleground ( )
inlinevirtual

◆ SetWeakPtr()

void Battleground::SetWeakPtr ( Trinity::unique_weak_ptr< Battleground >  weakRef)
inline

Definition at line 514 of file Battleground.h.

Referenced by BattlegroundMgr::AddBattleground().

◆ SetWinner()

void Battleground::SetWinner ( PvPTeamId  winnerTeamId)
inline

Definition at line 317 of file Battleground.h.

Referenced by EndBattleground(), and Reset().

◆ SpawnBGObject()

void Battleground::SpawnBGObject ( uint32  type,
uint32  respawntime 
)

Definition at line 1435 of file Battleground.cpp.

References BgObjects, FindBgMap(), GO_FLAG_NODESPAWN, GO_JUST_DEACTIVATED, GO_READY, and WorldObject::SendObjectDeSpawnAnim().

Referenced by BattlegroundAB::_CreateBanner(), BattlegroundAB::_DelBanner(), BattlegroundAV::EventPlayerAssaultsPoint(), BattlegroundWS::EventPlayerCapturedFlag(), BattlegroundEY::EventPlayerCapturedFlag(), BattlegroundWS::EventPlayerClickedOnFlag(), BattlegroundEY::EventPlayerClickedOnFlag(), BattlegroundAV::EventPlayerDefendsPoint(), BattlegroundAV::EventPlayerDestroyedPoint(), BattlegroundEY::EventTeamCapturedPoint(), BattlegroundEY::EventTeamLostPoint(), BattlegroundAV::HandleKillUnit(), HandleTriggerBuff(), BattlegroundSA::ResetObjs(), BattlegroundEY::RespawnFlag(), BattlegroundWS::RespawnFlag(), BattlegroundWS::RespawnFlagAfterDrop(), BattlegroundAV::SetupBattleground(), BattlegroundAB::StartingEventCloseDoors(), BattlegroundBE::StartingEventCloseDoors(), BattlegroundDS::StartingEventCloseDoors(), BattlegroundEY::StartingEventCloseDoors(), BattlegroundNA::StartingEventCloseDoors(), BattlegroundRL::StartingEventCloseDoors(), BattlegroundWS::StartingEventCloseDoors(), BattlegroundAB::StartingEventOpenDoors(), BattlegroundAV::StartingEventOpenDoors(), BattlegroundBE::StartingEventOpenDoors(), BattlegroundDS::StartingEventOpenDoors(), BattlegroundEY::StartingEventOpenDoors(), BattlegroundNA::StartingEventOpenDoors(), BattlegroundRL::StartingEventOpenDoors(), BattlegroundRV::StartingEventOpenDoors(), and BattlegroundWS::StartingEventOpenDoors().

◆ StartBattleground()

◆ StartingEventCloseDoors()

virtual void Battleground::StartingEventCloseDoors ( )
inlinevirtual

◆ StartingEventOpenDoors()

virtual void Battleground::StartingEventOpenDoors ( )
inlinevirtual

◆ StartTimedAchievement()

◆ ToBeDeleted()

bool Battleground::ToBeDeleted ( ) const
inline

Definition at line 486 of file Battleground.h.

Referenced by BattlegroundMgr::Update().

◆ Update()

◆ UpdatePlayerScore()

◆ UpdatePlayersCountByTeam()

void Battleground::UpdatePlayersCountByTeam ( uint32  Team,
bool  remove 
)
inline

Definition at line 412 of file Battleground.h.

Referenced by AddPlayer(), and RemovePlayerAtLeave().

◆ UpdateWorldState()

Member Data Documentation

◆ _arenaTeamScores

ArenaTeamScore Battleground::_arenaTeamScores[PVP_TEAMS_COUNT]
protected

Definition at line 555 of file Battleground.h.

Referenced by BuildPvPLogDataPacket(), Arena::EndBattleground(), and Reset().

◆ _winnerTeamId

PvPTeamId Battleground::_winnerTeamId
private

Definition at line 574 of file Battleground.h.

Referenced by Battleground().

◆ BgCreatures

◆ BgObjects

◆ m_ArenaTeamIds

uint32 Battleground::m_ArenaTeamIds[PVP_TEAMS_COUNT]
private

Definition at line 628 of file Battleground.h.

Referenced by Battleground(), and StartBattleground().

◆ m_ArenaTeamMMR

uint32 Battleground::m_ArenaTeamMMR[PVP_TEAMS_COUNT]
private

Definition at line 630 of file Battleground.h.

Referenced by Battleground().

◆ m_ArenaType

uint8 Battleground::m_ArenaType
private

Definition at line 570 of file Battleground.h.

Referenced by Battleground(), and StartBattleground().

◆ m_BgRaids

Group* Battleground::m_BgRaids[PVP_TEAMS_COUNT]
private

Definition at line 622 of file Battleground.h.

Referenced by Battleground(), SetBgRaid(), and ~Battleground().

◆ m_BracketId

BattlegroundBracketId Battleground::m_BracketId
private

Definition at line 569 of file Battleground.h.

Referenced by Battleground(), and SetBracket().

◆ m_BuffChange

bool Battleground::m_BuffChange
protected

◆ m_ClientInstanceID

uint32 Battleground::m_ClientInstanceID
private

Definition at line 563 of file Battleground.h.

Referenced by Battleground().

◆ m_EndTime

int32 Battleground::m_EndTime
private

Definition at line 567 of file Battleground.h.

Referenced by Battleground().

◆ m_Events

uint8 Battleground::m_Events
protected

Definition at line 544 of file Battleground.h.

Referenced by _ProcessJoin(), Battleground(), and Reset().

◆ m_HonorMode

BGHonorMode Battleground::m_HonorMode
protected

◆ m_InBGFreeSlotQueue

bool Battleground::m_InBGFreeSlotQueue
private

◆ m_InstanceID

◆ m_InvitedAlliance

uint32 Battleground::m_InvitedAlliance
private

Definition at line 618 of file Battleground.h.

Referenced by Battleground(), and Reset().

◆ m_InvitedHorde

uint32 Battleground::m_InvitedHorde
private

Definition at line 619 of file Battleground.h.

Referenced by Battleground(), and Reset().

◆ m_IsArena

bool Battleground::m_IsArena
private

Definition at line 573 of file Battleground.h.

Referenced by Battleground().

◆ m_IsRandom

bool Battleground::m_IsRandom
protected

Definition at line 550 of file Battleground.h.

Referenced by Battleground().

◆ m_IsRated

bool Battleground::m_IsRated
private

Definition at line 576 of file Battleground.h.

Referenced by Battleground(), and StartBattleground().

◆ m_LastResurrectTime

uint32 Battleground::m_LastResurrectTime
private

Definition at line 568 of file Battleground.h.

Referenced by _ProcessResurrect(), and Battleground().

◆ m_LevelMax

uint32 Battleground::m_LevelMax
private

Definition at line 634 of file Battleground.h.

Referenced by Battleground().

◆ m_LevelMin

uint32 Battleground::m_LevelMin
private

Definition at line 633 of file Battleground.h.

Referenced by Battleground().

◆ m_Map

BattlegroundMap* Battleground::m_Map
private

Definition at line 642 of file Battleground.h.

Referenced by Battleground(), and ~Battleground().

◆ m_MapId

◆ m_MaxPlayers

uint32 Battleground::m_MaxPlayers
private

Definition at line 636 of file Battleground.h.

Referenced by Battleground().

◆ m_MaxPlayersPerTeam

uint32 Battleground::m_MaxPlayersPerTeam
private

Definition at line 635 of file Battleground.h.

Referenced by Battleground().

◆ m_MinPlayers

uint32 Battleground::m_MinPlayers
private

Definition at line 638 of file Battleground.h.

Referenced by Battleground().

◆ m_MinPlayersPerTeam

uint32 Battleground::m_MinPlayersPerTeam
private

Definition at line 637 of file Battleground.h.

Referenced by Battleground().

◆ m_Name

std::string Battleground::m_Name
private

Definition at line 579 of file Battleground.h.

◆ m_OfflineQueue

std::deque<ObjectGuid> Battleground::m_OfflineQueue
private

Definition at line 613 of file Battleground.h.

Referenced by _ProcessOfflineQueue(), EventPlayerLoggedIn(), and EventPlayerLoggedOut().

◆ m_Players

◆ m_PlayersCount

uint32 Battleground::m_PlayersCount[PVP_TEAMS_COUNT]
private

Definition at line 625 of file Battleground.h.

Referenced by Battleground().

◆ m_PrematureCountDown

bool Battleground::m_PrematureCountDown
private

Definition at line 577 of file Battleground.h.

Referenced by _ProcessProgress(), Battleground(), and Update().

◆ m_PrematureCountDownTimer

uint32 Battleground::m_PrematureCountDownTimer
private

Definition at line 578 of file Battleground.h.

Referenced by _ProcessProgress(), and Battleground().

◆ m_RandomTypeID

BattlegroundTypeId Battleground::m_RandomTypeID
private

Definition at line 560 of file Battleground.h.

Referenced by Battleground().

◆ m_ResetStatTimer

uint32 Battleground::m_ResetStatTimer
private

Definition at line 565 of file Battleground.h.

Referenced by _ProcessJoin(), Battleground(), and Update().

◆ m_ResurrectQueue

GuidVector Battleground::m_ResurrectQueue
private

Definition at line 612 of file Battleground.h.

Referenced by _ProcessResurrect().

◆ m_ReviveQueue

std::map<ObjectGuid, GuidVector> Battleground::m_ReviveQueue
protected

◆ m_SetDeleteThis

bool Battleground::m_SetDeleteThis
private

Definition at line 572 of file Battleground.h.

Referenced by Battleground(), and Update().

◆ m_StartDelayTime

int32 Battleground::m_StartDelayTime
private

Definition at line 575 of file Battleground.h.

Referenced by Battleground().

◆ m_StartMaxDist

float Battleground::m_StartMaxDist
private

Definition at line 644 of file Battleground.h.

Referenced by Battleground().

◆ m_StartTime

uint32 Battleground::m_StartTime
private

Definition at line 564 of file Battleground.h.

Referenced by Battleground().

◆ m_Status

BattlegroundStatus Battleground::m_Status
private

Definition at line 562 of file Battleground.h.

Referenced by Battleground().

◆ m_TeamScores

◆ m_TypeID

BattlegroundTypeId Battleground::m_TypeID
private

◆ m_ValidStartPositionTimer

uint32 Battleground::m_ValidStartPositionTimer
private

Definition at line 566 of file Battleground.h.

Referenced by _CheckSafePositions(), and Battleground().

◆ m_weakRef

Trinity::unique_weak_ptr<Battleground> Battleground::m_weakRef
private

Definition at line 647 of file Battleground.h.

◆ PlayerScores

◆ ScriptId

uint32 Battleground::ScriptId
private

Definition at line 645 of file Battleground.h.

Referenced by Battleground().

◆ StartDelayTimes

BattlegroundStartTimeIntervals Battleground::StartDelayTimes[BG_STARTING_EVENT_COUNT]
protected

Definition at line 545 of file Battleground.h.

Referenced by _ProcessJoin(), Arena::Arena(), and Battleground().

◆ StartMessageIds

◆ StartPosition

Position Battleground::StartPosition[PVP_TEAMS_COUNT]
private

Definition at line 643 of file Battleground.h.

Referenced by GetTeamStartPosition(), and SetTeamStartPosition().


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