Project SkyFire Core
SkyFire 5.4.8 server core API documentation
Loading...
Searching...
No Matches
Battleground Class Reference

#include <Battleground.h>

Inheritance diagram for Battleground:
Collaboration diagram for Battleground:

Public Types

typedef std::map< uint64, BattlegroundPlayerBattlegroundPlayerMap
typedef std::map< uint64, BattlegroundScore * > BattlegroundScoreMap
typedef std::vector< uint64BGCreatures
typedef std::vector< uint64BGObjects

Public Member Functions

CreatureAddCreature (uint32 entry, uint32 type, uint32 teamval, float x, float y, float z, float o, uint32 respawntime=0)
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)
void AddOrSetPlayerToCorrectBgGroup (Player *player, uint32 team)
virtual void AddPlayer (Player *player)
void AddPlayerToResurrectQueue (uint64 npc_guid, uint64 player_guid)
bool AddSpiritGuide (uint32 type, float x, float y, float z, float o, uint32 team)
void AddToBGFreeSlotQueue ()
 Battleground ()
void BlockMovement (Player *player)
template<class Do>
void BroadcastWorker (Do &_do)
virtual bool CanActivateGO (int32, uint32) const
bool CanAwardArenaPoints () const
void CastSpellOnTeam (uint32 SpellID, uint32 TeamID)
virtual bool CheckAchievementCriteriaMeet (uint32, Player const *, Unit const *=NULL, uint32=0)
void CheckArenaAfterTimerConditions ()
void CheckArenaWinConditions ()
void DecreaseInvitedCount (uint32 team)
bool DelCreature (uint32 type)
bool DelObject (uint32 type)
virtual void DestroyGate (Player *, GameObject *)
virtual void DoAction (uint32, uint64)
void DoorClose (uint32 type)
void DoorOpen (uint32 type)
void EndBattleground (uint32 winner)
virtual void EventPlayerClickedOnFlag (Player *, GameObject *)
virtual void EventPlayerDamagedGO (Player *, GameObject *, uint32)
virtual void EventPlayerDroppedFlag (Player *)
void EventPlayerLoggedIn (Player *player)
void EventPlayerLoggedOut (Player *player)
virtual void EventPlayerUsedGO (Player *, GameObject *)
virtual void FillInitialWorldStates (WorldStateBuilder &)
BattlegroundMapFindBgMap () const
uint32 GetAlivePlayersCountByTeam (uint32 TeamTeam) const
uint32 GetArenaMatchmakerRating (uint32 TeamTeam) const
uint32 GetArenaMatchmakerRatingByIndex (uint32 index) const
uint32 GetArenaTeamIdByIndex (uint32 index) const
uint32 GetArenaTeamIdForTeam (uint32 TeamTeam) const
int32 GetArenaTeamRatingChangeByIndex (uint32 index) const
int32 GetArenaTeamRatingChangeForTeam (uint32 TeamTeam) const
uint8 GetArenaType () const
CreatureGetBGCreature (uint32 type)
BattlegroundMapGetBgMap () const
GameObjectGetBGObject (uint32 type)
GroupGetBgRaid (uint32 TeamID) const
uint32 GetBonusHonorFromKill (uint32 kills) const
BattlegroundBracketId GetBracketId () const
uint32 GetClientInstanceID () const
virtual WorldSafeLocsEntry const * GetClosestGraveYard (Player *player)
uint32 GetElapsedTime () const
virtual uint64 GetFlagPickerGUID (int32=-1) const
uint32 GetFreeSlotsForTeam (uint32 TeamTeam) const
uint64 GetGUID () const
uint32 GetInstanceID () const
uint32 GetInvitedCount (uint32 team) const
uint32 GetLastResurrectTime () const
uint32 GetMapId () const
uint32 GetMaxLevel () const
uint32 GetMaxPlayers () const
uint32 GetMaxPlayersPerTeam () const
uint32 GetMinLevel () const
uint32 GetMinPlayers () const
uint32 GetMinPlayersPerTeam () const
char const * GetName () const
int32 GetObjectType (uint64 guid)
uint32 GetOtherTeam (uint32 teamId) const
uint32 GetPlayerActiveSpec (uint64 guid) const
BattlegroundPlayerMap const & GetPlayers () const
BattlegroundScoreMap::const_iterator GetPlayerScoresBegin () const
BattlegroundScoreMap::const_iterator GetPlayerScoresEnd () const
uint32 GetPlayerScoresSize () const
uint32 GetPlayersCountByTeam (uint32 TeamTeam) const
uint32 GetPlayersSize () const
uint32 GetPlayerTeam (uint64 guid) const
virtual uint32 GetPrematureWinner ()
uint32 GetRemainingTime () const
uint32 GetReviveQueueSize () const
uint32 GetScriptId () const
const char * GetSkyFireString (int32 entry)
int32 GetStartDelayTime () const
float GetStartMaxDist () const
BattlegroundStatus GetStatus () const
uint32 GetTeamScore (uint32 TeamID) const
void GetTeamStartLoc (uint32 TeamID, float &X, float &Y, float &Z, float &O) const
BattlegroundTypeId GetTypeID (bool GetRandom=false) const
uint8 GetWinner () const
virtual void HandleAreaTrigger (Player *, uint32)
virtual void HandleKillPlayer (Player *player, Player *killer)
virtual void HandleKillUnit (Creature *, Player *)
virtual void HandlePlayerResurrect (Player *)
virtual bool HandlePlayerUnderMap (Player *)
virtual void HandleQuestComplete (uint32, Player *)
void HandleTriggerBuff (uint64 go_guid)
bool HasFreeSlots () const
void IncreaseInvitedCount (uint32 team)
virtual bool IsAllNodesControlledByTeam (uint32) const
bool isArena () const
bool isBattleground () const
bool IsPlayerInBattleground (uint64 guid) const
bool IsRandom () const
bool isRated () const
virtual bool IsSpellAllowed (uint32, Player const *) const
void ModifyStartDelayTime (int diff)
void PlaySoundToAll (uint32 SoundID)
void PlaySoundToTeam (uint32 SoundID, uint32 TeamID)
void PSendMessageToAll (int32 entry, ChatMsg type, Player const *source,...)
void RelocateDeadPlayers (uint64 queueIndex)
 Relocate all players in ReviveQueue to the closest graveyard.
void RemoveAuraOnTeam (uint32 SpellID, uint32 TeamID)
void RemoveFromBGFreeSlotQueue ()
virtual void RemovePlayerAtLeave (uint64 guid, bool Transport, bool SendPacket)
void RemovePlayerFromResurrectQueue (uint64 player_guid)
virtual void Reset ()
virtual void ResetBGSubclass ()
void RewardHonorToTeam (uint32 Honor, uint32 TeamID)
void RewardReputationToTeam (uint32 faction_id, uint32 Reputation, uint32 TeamID)
void RewardXPAtKill (Player *killer, Player *victim)
void SendMessage2ToAll (int32 entry, ChatMsg type, Player const *source, int32 strId1=0, int32 strId2=0)
void SendMessageToAll (int32 entry, ChatMsg type, Player const *source=NULL)
void SendPacketToAll (WorldPacket *packet)
void SendPacketToTeam (uint32 TeamID, WorldPacket *packet, Player *sender=NULL, bool self=true)
void SendWarningToAll (int32 entry,...)
void SetArenaMatchmakerRating (uint32 TeamTeam, uint32 MMR)
void SetArenaorBGType (bool _isArena)
void SetArenaTeamIdForTeam (uint32 TeamTeam, uint32 ArenaTeamId)
void SetArenaTeamRatingChangeForTeam (uint32 TeamTeam, int32 RatingChange)
void SetArenaType (uint8 type)
void SetBgMap (BattlegroundMap *map)
void SetBgRaid (uint32 TeamID, Group *bg_raid)
void SetBracket (PvPDifficultyEntry const *bracketEntry)
void SetClientInstanceID (uint32 InstanceID)
void SetDeleteThis ()
virtual void SetDroppedFlagGUID (uint64, int32=-1)
void SetElapsedTime (uint32 Time)
void SetGuid (uint64 newGuid)
void SetHoliday (bool is_holiday)
void SetInstanceID (uint32 InstanceID)
void SetLastResurrectTime (uint32 Time)
void SetLevelRange (uint32 min, uint32 max)
void SetMapId (uint32 MapID)
void SetMaxPlayers (uint32 MaxPlayers)
void SetMaxPlayersPerTeam (uint32 MaxPlayers)
void SetMinPlayers (uint32 MinPlayers)
void SetMinPlayersPerTeam (uint32 MinPlayers)
void SetName (char const *Name)
void SetRandom (bool isRandom)
void SetRandomTypeID (BattlegroundTypeId TypeIDTypeID)
void SetRated (bool state)
void SetRemainingTime (uint32 Time)
void SetScriptId (uint32 scriptId)
void SetStartDelayTime (int Time)
void SetStartMaxDist (float startMaxDist)
void SetStatus (BattlegroundStatus Status)
void SetTeamStartLoc (uint32 TeamID, float X, float Y, float Z, float O)
void SetTypeID (BattlegroundTypeId TypeIDTypeID)
virtual bool SetupBattleground ()
void SetWinner (uint8 winner)
void SpawnBGObject (uint32 type, uint32 respawntime)
void StartBattleground ()
virtual void StartingEventCloseDoors ()
virtual void StartingEventOpenDoors ()
void StartTimedAchievement (AchievementCriteriaTimedTypes type, uint32 entry)
bool ToBeDeleted () const
void Update (uint32 diff)
void UpdateArenaWorldState ()
virtual void UpdatePlayerScore (Player *player, uint32 type, uint32 value, bool doAddHonor=true)
void UpdatePlayersCountByTeam (uint32 TeamTeam, bool remove)
void UpdateWorldState (uint32 Field, uint32 Value)
void UpdateWorldStateForPlayer (uint32 Field, uint32 Value, Player *player)
void YellToAll (Creature *creature, const char *text, Language language)
virtual ~Battleground ()

Static Public Member Functions

static TeamId GetTeamIndexByTeamId (uint32 TeamTeam)

Public Attributes

BGCreatures BgCreatures
BGObjects BgObjects

Protected Member Functions

void _CheckSafePositions (uint32 diff)
Player_GetPlayer (BattlegroundPlayerMap::const_iterator itr, const char *context) const
Player_GetPlayer (BattlegroundPlayerMap::iterator itr, const char *context)
Player_GetPlayer (uint64 guid, bool offlineRemove, const char *context) const
Player_GetPlayerForTeam (uint32 teamId, BattlegroundPlayerMap::const_iterator itr, const char *context) const
void _ProcessJoin (uint32 diff)
void _ProcessLeave (uint32 diff)
void _ProcessOfflineQueue ()
void _ProcessProgress (uint32 diff)
void _ProcessRessurect (uint32 diff)
void EndNow ()
void PlayerAddedToBGCheckIfBGIsRunning (Player *player)
virtual void RemovePlayer (Player *, uint64, uint32)

Protected Attributes

bool m_BuffChange
uint8 m_Events
BGHonorMode m_HonorMode
bool m_IsRandom
BattlegroundPlayerMap m_Players
std::map< uint64, std::vector< uint64 > > m_ReviveQueue
int32 m_TeamScores [BG_TEAMS_COUNT]
BattlegroundScoreMap PlayerScores
BattlegroundStartTimeIntervals StartDelayTimes [BG_STARTING_EVENT_COUNT]
uint32 StartMessageIds [BG_STARTING_EVENT_COUNT]

Private Member Functions

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

Private Attributes

uint32 m_ArenaTeamIds [BG_TEAMS_COUNT]
uint32 m_ArenaTeamMMR [BG_TEAMS_COUNT]
int32 m_ArenaTeamRatingChanges [BG_TEAMS_COUNT]
uint8 m_ArenaType
Groupm_BgRaids [BG_TEAMS_COUNT]
BattlegroundBracketId m_BracketId
uint32 m_ClientInstanceID
uint32 m_CountdownTimer
int32 m_EndTime
uint64 m_Guid
bool m_InBGFreeSlotQueue
uint32 m_InstanceID
uint32 m_InvitedAlliance
uint32 m_InvitedHorde
bool m_IsArena
bool m_IsRated
uint32 m_LastResurrectTime
uint32 m_LevelMax
uint32 m_LevelMin
BattlegroundMapm_Map
uint32 m_MapId
uint32 m_MaxPlayers
uint32 m_MaxPlayersPerTeam
uint32 m_MinPlayers
uint32 m_MinPlayersPerTeam
char const * m_Name
std::deque< uint64m_OfflineQueue
uint32 m_PlayersCount [BG_TEAMS_COUNT]
bool m_PrematureCountDown
uint32 m_PrematureCountDownTimer
BattlegroundTypeId m_RandomTypeID
uint32 m_ResetStatTimer
std::vector< uint64m_ResurrectQueue
bool m_SetDeleteThis
int32 m_StartDelayTime
float m_StartMaxDist
uint32 m_StartTime
BattlegroundStatus m_Status
float m_TeamStartLocO [BG_TEAMS_COUNT]
float m_TeamStartLocX [BG_TEAMS_COUNT]
float m_TeamStartLocY [BG_TEAMS_COUNT]
float m_TeamStartLocZ [BG_TEAMS_COUNT]
BattlegroundTypeId m_TypeID
uint32 m_ValidStartPositionTimer
uint8 m_Winner
uint32 ScriptId

Detailed Description

Definition at line 274 of file Battleground.h.

Member Typedef Documentation

◆ BattlegroundPlayerMap

Definition at line 369 of file Battleground.h.

◆ BattlegroundScoreMap

Definition at line 373 of file Battleground.h.

◆ BGCreatures

typedef std::vector<uint64> Battleground::BGCreatures

Definition at line 507 of file Battleground.h.

◆ BGObjects

typedef std::vector<uint64> Battleground::BGObjects
Todo
make this protected:

Definition at line 506 of file Battleground.h.

Constructor & Destructor Documentation

◆ Battleground()

◆ ~Battleground()

Battleground::~Battleground ( )
virtual

Member Function Documentation

◆ _CheckSafePositions()

void Battleground::_CheckSafePositions ( uint32 diff)
inlineprotected

◆ _GetPlayer() [1/3]

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

Definition at line 597 of file Battleground.cpp.

References _GetPlayer().

◆ _GetPlayer() [2/3]

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

Definition at line 592 of file Battleground.cpp.

References _GetPlayer().

◆ _GetPlayer() [3/3]

Player * Battleground::_GetPlayer ( uint64 guid,
bool offlineRemove,
const char * context ) const
inlineprotected

◆ _GetPlayerForTeam()

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

◆ _ProcessJoin()

void Battleground::_ProcessJoin ( uint32 diff)
inlineprotected

◆ _ProcessLeave()

void Battleground::_ProcessLeave ( uint32 diff)
inlineprotected

Definition at line 557 of file Battleground.cpp.

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

Referenced by Update().

◆ _ProcessOfflineQueue()

void Battleground::_ProcessOfflineQueue ( )
inlineprotected

Definition at line 284 of file Battleground.cpp.

References m_OfflineQueue, m_Players, RemovePlayerAtLeave(), and sWorld.

Referenced by Update().

◆ _ProcessProgress()

◆ _ProcessRessurect()

◆ AddCreature()

◆ AddObject()

◆ AddOrSetPlayerToCorrectBgGroup()

◆ AddPlayer()

void Battleground::AddPlayer ( Player * player)
virtual

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

Definition at line 1139 of file Battleground.cpp.

References ACHIEVEMENT_CRITERIA_CONDITION_BG_MAP, ACHIEVEMENT_CRITERIA_TYPE_BE_SPELL_TARGET, ACHIEVEMENT_CRITERIA_TYPE_BG_OBJECTIVE_CAPTURE, ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL, ACHIEVEMENT_CRITERIA_TYPE_DAMAGE_DONE, ACHIEVEMENT_CRITERIA_TYPE_GET_KILLING_BLOWS, ACHIEVEMENT_CRITERIA_TYPE_HEALING_DONE, ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL, ACHIEVEMENT_CRITERIA_TYPE_HONORABLE_KILL_AT_AREA, ACHIEVEMENT_CRITERIA_TYPE_KILL_CREATURE, ACHIEVEMENT_CRITERIA_TYPE_SPECIAL_PVP_KILL, ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, BattlegroundPlayer::ActiveSpec, AddOrSetPlayerToCorrectBgGroup(), ALLIANCE, ARENA_COUNTDOWN_MAX, BATTLEGROUND_COUNTDOWN_MAX, Unit::CastSpell(), Player::DestroyConjuredItems(), Player::GetActiveSpec(), GetArenaType(), Player::GetBattlegroundQueueIndex(), Player::GetBattlegroundQueueJoinTime(), Player::GetBattlePetMgr(), Player::GetBGTeam(), GetElapsedTime(), Object::GetGUID(), GetMapId(), Player::GetSession(), GetStatus(), Player::GetTalentSpecialization(), Player::GetTeam(), Object::HasFlag(), HORDE, isArena(), m_Players, m_TypeID, BattlegroundPlayer::OfflineRemoveTime, PLAYER_FIELD_PLAYER_FLAGS, PLAYER_FLAGS_AFK, PlayerAddedToBGCheckIfBGIsRunning(), Player::RemoveArenaEnchantments(), Unit::RemoveAurasByType(), Player::ResetAchievementCriteria(), Player::ResetAllPowers(), sBattlegroundMgr, WorldSession::SendPacket(), SendPacketToTeam(), SMSG_START_TIMER, SPELL_ALLIANCE_GOLD_FLAG, SPELL_ALLIANCE_GREEN_FLAG, SPELL_ARENA_PREPARATION, SPELL_AURA_MOUNTED, SPELL_HORDE_GOLD_FLAG, SPELL_HORDE_GREEN_FLAG, SPELL_PREPARATION, STATUS_IN_PROGRESS, STATUS_WAIT_JOIN, BattlegroundPlayer::Team, TEMP_ENCHANTMENT_SLOT, Player::ToggleAFK(), BattlePetMgr::UnSummonCurrentBattlePet(), Player::UnsummonPetTemporaryIfAny(), and UpdatePlayersCountByTeam().

Referenced by BattlegroundAB::AddPlayer(), BattlegroundAV::AddPlayer(), BattlegroundBE::AddPlayer(), BattlegroundBFG::AddPlayer(), BattlegroundDS::AddPlayer(), BattlegroundEY::AddPlayer(), BattlegroundIC::AddPlayer(), BattlegroundNA::AddPlayer(), BattlegroundRL::AddPlayer(), BattlegroundRV::AddPlayer(), BattlegroundSA::AddPlayer(), BattlegroundTP::AddPlayer(), BattlegroundTV::AddPlayer(), BattlegroundVOP::AddPlayer(), and BattlegroundWS::AddPlayer().

◆ AddPlayerToResurrectQueue()

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

◆ AddSpiritGuide()

◆ AddToBGFreeSlotQueue()

void Battleground::AddToBGFreeSlotQueue ( )

◆ BlockMovement()

void Battleground::BlockMovement ( Player * player)

Definition at line 957 of file Battleground.cpp.

References Player::SetClientControl().

Referenced by EndBattleground(), and PlayerAddedToBGCheckIfBGIsRunning().

◆ BroadcastWorker()

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

◆ CanActivateGO()

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

Reimplemented in BattlegroundAV.

Definition at line 540 of file Battleground.h.

◆ CanAwardArenaPoints()

bool Battleground::CanAwardArenaPoints ( ) const
inline

Definition at line 535 of file Battleground.h.

References BG_AWARD_ARENA_POINTS_MIN_LEVEL, and m_LevelMin.

◆ CastSpellOnTeam()

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

◆ CheckAchievementCriteriaMeet()

◆ CheckArenaAfterTimerConditions()

void Battleground::CheckArenaAfterTimerConditions ( )

Definition at line 1939 of file Battleground.cpp.

References EndBattleground(), and WINNER_NONE.

Referenced by Update().

◆ CheckArenaWinConditions()

◆ DecreaseInvitedCount()

void Battleground::DecreaseInvitedCount ( uint32 team)
inline

Definition at line 357 of file Battleground.h.

References ALLIANCE, m_InvitedAlliance, and m_InvitedHorde.

Referenced by RemovePlayerAtLeave().

◆ DelCreature()

◆ DelObject()

◆ DestroyGate()

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

Reimplemented in BattlegroundIC, and BattlegroundSA.

Definition at line 291 of file Battleground.h.

◆ DoAction()

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

Reimplemented in BattlegroundIC.

Definition at line 488 of file Battleground.h.

◆ DoorClose()

◆ DoorOpen()

◆ EndBattleground()

void Battleground::EndBattleground ( uint32 winner)

Definition at line 716 of file Battleground.cpp.

References _GetPlayer(), ACHIEVEMENT_CRITERIA_CONDITION_NO_LOSE, ACHIEVEMENT_CRITERIA_TYPE_COMPLETE_BATTLEGROUND, ACHIEVEMENT_CRITERIA_TYPE_WIN_ARENA, ACHIEVEMENT_CRITERIA_TYPE_WIN_BG, ACHIEVEMENT_CRITERIA_TYPE_WIN_RATED_ARENA, ALLIANCE, ARENA_TIMELIMIT_POINTS_LOSS, ARENA_TYPE_5v5, BattlegroundMgr::BGQueueTypeId(), BlockMovement(), Unit::CastSpell(), CHAT_MSG_BG_SYSTEM_NEUTRAL, Unit::CombatStop(), Unit::CombatStopWithPets(), CONFIG_ARENA_LOG_EXTENDED_INFO, CONFIG_BG_REWARD_LOSER_HONOR_FIRST, CONFIG_BG_REWARD_LOSER_HONOR_LAST, CONFIG_BG_REWARD_WINNER_CONQUEST_FIRST, CONFIG_BG_REWARD_WINNER_CONQUEST_LAST, CONFIG_BG_REWARD_WINNER_HONOR_FIRST, CONFIG_BG_REWARD_WINNER_HONOR_LAST, CONFIG_CURRENCY_CONQUEST_POINTS_ARENA_REWARD, CURRENCY_TYPE_CONQUEST_META_ARENA, HostileRefManager::deleteReferences(), ObjectAccessor::FindPlayer(), ArenaTeam::FinishGame(), GetAlivePlayersCountByTeam(), GetArenaMatchmakerRating(), Player::GetArenaPersonalRating(), GetArenaTeamIdForTeam(), GetArenaType(), Player::GetBattlegroundQueueIndex(), Player::GetBattlegroundQueueJoinTime(), GetBgMap(), GetBonusHonorFromKill(), GetElapsedTime(), Unit::getHostileRefManager(), ArenaTeam::GetId(), GetMapId(), GetOtherTeam(), GetPlayerScoresBegin(), GetPlayerScoresEnd(), Player::GetRandomWinner(), ArenaTeam::GetRating(), ArenaTeam::GetSlot(), Player::GetTeam(), GetTypeID(), Unit::HasAuraType(), HORDE, Unit::IsAlive(), isArena(), isBattleground(), BattlegroundMgr::IsBGWeekend(), IsRandom(), isRated(), LANG_ARENA_GOLD_WINS, LANG_ARENA_GREEN_WINS, LANG_BG_A_WINS, LANG_BG_H_WINS, ArenaTeam::LostAgainst(), m_ArenaTeamIds, m_ArenaType, m_Players, ArenaTeam::MemberLost(), ArenaTeam::MemberWon(), Player::ModifyCurrency(), ArenaTeam::NotifyStatsChanged(), ArenaTeam::OfflineMemberLost(), PlaySoundToAll(), Unit::RemoveAura(), Unit::RemoveAurasByType(), RemoveFromBGFreeSlotQueue(), Player::ResetAchievementCriteria(), Player::ResetAllPowers(), Player::ResurrectPlayer(), sArenaTeamMgr, sBattlegroundMgr, SCORE_BONUS_HONOR, Player::SendDirectMessage(), SendMessageToAll(), SetArenaMatchmakerRating(), SetArenaTeamRatingChangeForTeam(), Player::SetRandomWinner(), SetRemainingTime(), SetStatus(), SetWinner(), SF_LOG_DEBUG, sGuildMgr, 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, SPELL_THE_LAST_STANDING, STATUS_IN_PROGRESS, STATUS_WAIT_LEAVE, sWorld, TEAM_ALLIANCE, TEAM_HORDE, TIME_AUTOCLOSE_BATTLEGROUND, UI64FMTD, Player::UpdateAchievementCriteria(), UpdatePlayerScore(), WINNER_ALLIANCE, WINNER_HORDE, WINNER_NONE, and ArenaTeam::WonAgainst().

Referenced by _ProcessProgress(), CheckArenaAfterTimerConditions(), CheckArenaWinConditions(), BattlegroundAB::EndBattleground(), BattlegroundAV::EndBattleground(), BattlegroundBFG::EndBattleground(), BattlegroundEY::EndBattleground(), BattlegroundIC::EndBattleground(), BattlegroundSA::EndBattleground(), BattlegroundTP::EndBattleground(), BattlegroundVOP::EndBattleground(), BattlegroundWS::EndBattleground(), BattlegroundIC::EventPlayerClickedOnFlag(), and EventPlayerLoggedOut().

◆ EndNow()

void Battleground::EndNow ( )
protected

◆ EventPlayerClickedOnFlag()

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

◆ EventPlayerDamagedGO()

virtual void Battleground::EventPlayerDamagedGO ( Player * ,
GameObject * ,
uint32  )
inlinevirtual

Reimplemented in BattlegroundIC, and BattlegroundSA.

Definition at line 484 of file Battleground.h.

◆ EventPlayerDroppedFlag()

virtual void Battleground::EventPlayerDroppedFlag ( Player * )
inlinevirtual

Reimplemented in BattlegroundEY, BattlegroundTP, and BattlegroundWS.

Definition at line 480 of file Battleground.h.

◆ EventPlayerLoggedIn()

void Battleground::EventPlayerLoggedIn ( Player * player)

◆ EventPlayerLoggedOut()

◆ EventPlayerUsedGO()

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

Reimplemented in BattlegroundSA.

Definition at line 485 of file Battleground.h.

◆ FillInitialWorldStates()

◆ FindBgMap()

BattlegroundMap * Battleground::FindBgMap ( ) const
inline

Definition at line 398 of file Battleground.h.

References m_Map.

Referenced by _ProcessJoin(), AddCreature(), AddObject(), and SpawnBGObject().

◆ GetAlivePlayersCountByTeam()

◆ GetArenaMatchmakerRating()

uint32 Battleground::GetArenaMatchmakerRating ( uint32 Team) const
inline

Definition at line 466 of file Battleground.h.

References GetTeamIndexByTeamId(), and m_ArenaTeamMMR.

Referenced by EndBattleground(), and RemovePlayerAtLeave().

◆ GetArenaMatchmakerRatingByIndex()

uint32 Battleground::GetArenaMatchmakerRatingByIndex ( uint32 index) const
inline

Definition at line 467 of file Battleground.h.

References m_ArenaTeamMMR.

◆ GetArenaTeamIdByIndex()

uint32 Battleground::GetArenaTeamIdByIndex ( uint32 index) const
inline

Definition at line 461 of file Battleground.h.

References m_ArenaTeamIds.

◆ GetArenaTeamIdForTeam()

uint32 Battleground::GetArenaTeamIdForTeam ( uint32 Team) const
inline

Definition at line 460 of file Battleground.h.

References GetTeamIndexByTeamId(), and m_ArenaTeamIds.

Referenced by EndBattleground(), and RemovePlayerAtLeave().

◆ GetArenaTeamRatingChangeByIndex()

int32 Battleground::GetArenaTeamRatingChangeByIndex ( uint32 index) const
inline

Definition at line 464 of file Battleground.h.

References m_ArenaTeamRatingChanges.

◆ GetArenaTeamRatingChangeForTeam()

int32 Battleground::GetArenaTeamRatingChangeForTeam ( uint32 Team) const
inline

Definition at line 463 of file Battleground.h.

References GetTeamIndexByTeamId(), and m_ArenaTeamRatingChanges.

◆ GetArenaType()

◆ GetBGCreature()

◆ GetBgMap()

◆ GetBGObject()

◆ GetBgRaid()

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

Definition at line 442 of file Battleground.h.

References ALLIANCE, m_BgRaids, TEAM_ALLIANCE, and TEAM_HORDE.

Referenced by AddOrSetPlayerToCorrectBgGroup(), and RemovePlayerAtLeave().

◆ GetBonusHonorFromKill()

◆ GetBracketId()

◆ GetClientInstanceID()

uint32 Battleground::GetClientInstanceID ( ) const
inline

◆ GetClosestGraveYard()

◆ GetElapsedTime()

◆ GetFlagPickerGUID()

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

◆ GetFreeSlotsForTeam()

◆ GetGUID()

uint64 Battleground::GetGUID ( ) const
inline

◆ GetInstanceID()

◆ GetInvitedCount()

uint32 Battleground::GetInvitedCount ( uint32 team) const
inline

Definition at line 361 of file Battleground.h.

References ALLIANCE, m_InvitedAlliance, and m_InvitedHorde.

Referenced by GetFreeSlotsForTeam(), RemovePlayerAtLeave(), and Update().

◆ GetLastResurrectTime()

uint32 Battleground::GetLastResurrectTime ( ) const
inline

Definition at line 309 of file Battleground.h.

References m_LastResurrectTime.

Referenced by BattlegroundMgr::SendAreaSpiritHealerQueryOpcode().

◆ GetMapId()

◆ GetMaxLevel()

◆ GetMaxPlayers()

uint32 Battleground::GetMaxPlayers ( ) const
inline

Definition at line 310 of file Battleground.h.

References m_MaxPlayers.

Referenced by HasFreeSlots().

◆ GetMaxPlayersPerTeam()

uint32 Battleground::GetMaxPlayersPerTeam ( ) const
inline

◆ GetMinLevel()

uint32 Battleground::GetMinLevel ( ) const
inline

◆ GetMinPlayers()

uint32 Battleground::GetMinPlayers ( ) const
inline

Definition at line 311 of file Battleground.h.

References m_MinPlayers.

◆ GetMinPlayersPerTeam()

uint32 Battleground::GetMinPlayersPerTeam ( ) const
inline

◆ GetName()

char const * Battleground::GetName ( ) const
inline

Definition at line 300 of file Battleground.h.

References m_Name.

Referenced by _ProcessJoin().

◆ GetObjectType()

int32 Battleground::GetObjectType ( uint64 guid)

◆ GetOtherTeam()

uint32 Battleground::GetOtherTeam ( uint32 teamId) const

Definition at line 1877 of file Battleground.cpp.

References ALLIANCE, and HORDE.

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

◆ GetPlayerActiveSpec()

uint32 Battleground::GetPlayerActiveSpec ( uint64 guid) const

Definition at line 1869 of file Battleground.cpp.

References m_Players.

Referenced by BattlegroundMgr::BuildPvpLogDataPacket().

◆ GetPlayers()

◆ GetPlayerScoresBegin()

BattlegroundScoreMap::const_iterator Battleground::GetPlayerScoresBegin ( ) const
inline

Definition at line 374 of file Battleground.h.

References PlayerScores.

Referenced by BattlegroundMgr::BuildPvpLogDataPacket(), and EndBattleground().

◆ GetPlayerScoresEnd()

BattlegroundScoreMap::const_iterator Battleground::GetPlayerScoresEnd ( ) const
inline

Definition at line 375 of file Battleground.h.

References PlayerScores.

Referenced by BattlegroundMgr::BuildPvpLogDataPacket(), and EndBattleground().

◆ GetPlayerScoresSize()

uint32 Battleground::GetPlayerScoresSize ( ) const
inline

Definition at line 376 of file Battleground.h.

References PlayerScores.

Referenced by BattlegroundMgr::BuildPvpLogDataPacket().

◆ GetPlayersCountByTeam()

uint32 Battleground::GetPlayersCountByTeam ( uint32 Team) const
inline

◆ GetPlayersSize()

uint32 Battleground::GetPlayersSize ( ) const
inline

Definition at line 371 of file Battleground.h.

References m_Players.

Referenced by BattlegroundSA::EndBattleground(), HasFreeSlots(), RemovePlayerAtLeave(), and Update().

◆ GetPlayerTeam()

uint32 Battleground::GetPlayerTeam ( uint64 guid) const

Definition at line 1861 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 378 of file Battleground.h.

References m_ReviveQueue.

Referenced by _ProcessRessurect().

◆ GetScriptId()

uint32 Battleground::GetScriptId ( ) const
inline

Definition at line 322 of file Battleground.h.

References ScriptId.

◆ GetSkyFireString()

◆ GetStartDelayTime()

int32 Battleground::GetStartDelayTime ( ) const
inline

Definition at line 319 of file Battleground.h.

References m_StartDelayTime.

Referenced by _ProcessJoin().

◆ GetStartMaxDist()

float Battleground::GetStartMaxDist ( ) const
inline

Definition at line 411 of file Battleground.h.

References m_StartMaxDist.

Referenced by _CheckSafePositions().

◆ GetStatus()

BattlegroundStatus Battleground::GetStatus ( ) const
inline

Definition at line 305 of file Battleground.h.

References m_Status.

Referenced by AddPlayer(), BattlegroundQueue::BattlegroundQueueUpdate(), BattlegroundMgr::BuildPvpLogDataPacket(), SpellInfo::CheckLocation(), BattlegroundAV::EventPlayerAssaultsPoint(), BattlegroundEY::EventPlayerCapturedFlag(), BattlegroundTP::EventPlayerCapturedFlag(), BattlegroundWS::EventPlayerCapturedFlag(), BattlegroundAB::EventPlayerClickedOnFlag(), BattlegroundAV::EventPlayerClickedOnFlag(), BattlegroundBFG::EventPlayerClickedOnFlag(), BattlegroundEY::EventPlayerClickedOnFlag(), BattlegroundIC::EventPlayerClickedOnFlag(), BattlegroundTP::EventPlayerClickedOnFlag(), BattlegroundVOP::EventPlayerClickedOnFlag(), BattlegroundWS::EventPlayerClickedOnFlag(), BattlegroundAV::EventPlayerDefendsPoint(), BattlegroundEY::EventPlayerDroppedFlag(), BattlegroundTP::EventPlayerDroppedFlag(), BattlegroundWS::EventPlayerDroppedFlag(), EventPlayerLoggedOut(), BattlegroundEY::EventTeamCapturedPoint(), BattlegroundEY::EventTeamLostPoint(), BGQueueRemoveEvent::Execute(), BattlegroundAV::FillInitialWorldStates(), BattlegroundTP::FillInitialWorldStates(), BattlegroundWS::FillInitialWorldStates(), BattlegroundTP::GetClosestGraveYard(), BattlegroundWS::GetClosestGraveYard(), GetFreeSlotsForTeam(), BattlegroundAB::HandleAreaTrigger(), BattlegroundAV::HandleAreaTrigger(), BattlegroundBE::HandleAreaTrigger(), BattlegroundBFG::HandleAreaTrigger(), BattlegroundDS::HandleAreaTrigger(), BattlegroundEY::HandleAreaTrigger(), BattlegroundIC::HandleAreaTrigger(), BattlegroundNA::HandleAreaTrigger(), BattlegroundRL::HandleAreaTrigger(), BattlegroundRV::HandleAreaTrigger(), BattlegroundSA::HandleAreaTrigger(), BattlegroundTP::HandleAreaTrigger(), BattlegroundTV::HandleAreaTrigger(), BattlegroundWS::HandleAreaTrigger(), BattlegroundAV::HandleKillPlayer(), BattlegroundBE::HandleKillPlayer(), BattlegroundDS::HandleKillPlayer(), BattlegroundEY::HandleKillPlayer(), BattlegroundIC::HandleKillPlayer(), BattlegroundNA::HandleKillPlayer(), BattlegroundRL::HandleKillPlayer(), BattlegroundRV::HandleKillPlayer(), BattlegroundTP::HandleKillPlayer(), BattlegroundTV::HandleKillPlayer(), BattlegroundVOP::HandleKillPlayer(), BattlegroundWS::HandleKillPlayer(), BattlegroundAV::HandleKillUnit(), BattlegroundIC::HandleKillUnit(), BattlegroundAV::HandleQuestComplete(), Player::LoadFromDB(), PlayerAddedToBGCheckIfBGIsRunning(), BattlegroundAB::PostUpdateImpl(), BattlegroundAV::PostUpdateImpl(), BattlegroundBFG::PostUpdateImpl(), BattlegroundDS::PostUpdateImpl(), BattlegroundEY::PostUpdateImpl(), BattlegroundIC::PostUpdateImpl(), BattlegroundRV::PostUpdateImpl(), BattlegroundSA::PostUpdateImpl(), BattlegroundTP::PostUpdateImpl(), BattlegroundVOP::PostUpdateImpl(), BattlegroundWS::PostUpdateImpl(), BattlegroundBE::RemovePlayer(), BattlegroundDS::RemovePlayer(), BattlegroundNA::RemovePlayer(), BattlegroundRL::RemovePlayer(), BattlegroundRV::RemovePlayer(), BattlegroundTV::RemovePlayer(), RemovePlayerAtLeave(), Player::ReportedAfkBy(), BattlegroundTP::RespawnFlagAfterDrop(), BattlegroundWS::RespawnFlagAfterDrop(), BattlegroundSA::ShouldDelayStartForDebug(), and Update().

◆ GetTeamIndexByTeamId()

TeamId Battleground::GetTeamIndexByTeamId ( uint32 Team)
inlinestatic

Definition at line 447 of file Battleground.h.

References ALLIANCE, TEAM_ALLIANCE, and TEAM_HORDE.

Referenced by BattlegroundAB::_NodeOccupied(), BattlegroundBFG::_NodeOccupied(), BattlegroundTP::AddPoint(), BattlegroundWS::AddPoint(), BattlegroundEY::AddPoints(), BattlegroundAB::CheckAchievementCriteriaMeet(), BattlegroundBFG::CheckAchievementCriteriaMeet(), BattlegroundSA::CheckAchievementCriteriaMeet(), BattlegroundEY::CheckSomeoneLeftPoint(), BattlegroundAV::EventPlayerAssaultsPoint(), BattlegroundTP::EventPlayerCapturedFlag(), BattlegroundWS::EventPlayerCapturedFlag(), BattlegroundAB::EventPlayerClickedOnFlag(), BattlegroundBFG::EventPlayerClickedOnFlag(), BattlegroundAV::EventPlayerDefendsPoint(), BattlegroundAV::EventPlayerDestroyedPoint(), BattlegroundTP::EventPlayerDroppedFlag(), BattlegroundWS::EventPlayerDroppedFlag(), GetArenaMatchmakerRating(), GetArenaTeamIdForTeam(), GetArenaTeamRatingChangeForTeam(), BattlegroundAB::GetClosestGraveYard(), BattlegroundAV::GetClosestGraveYard(), BattlegroundBFG::GetClosestGraveYard(), BattlegroundIC::GetClosestGraveYard(), BattlegroundTP::GetDroppedFlagGUID(), BattlegroundWS::GetDroppedFlagGUID(), BattlegroundTP::GetFlagState(), BattlegroundWS::GetFlagState(), GetPlayersCountByTeam(), BattlegroundAV::GetPrematureWinner(), GetTeamStartLoc(), BattlegroundAV::HandleQuestComplete(), BattlegroundAV::PopulateNode(), BattlegroundEY::RemovePoint(), BattlegroundTP::RemovePoint(), BattlegroundWS::RemovePoint(), BattlegroundTP::RespawnFlagAfterDrop(), BattlegroundWS::RespawnFlagAfterDrop(), SetArenaMatchmakerRating(), SetArenaTeamIdForTeam(), SetArenaTeamRatingChangeForTeam(), BattlegroundEY::SetTeamPoint(), BattlegroundTP::SetTeamPoint(), BattlegroundWS::SetTeamPoint(), SetTeamStartLoc(), UpdatePlayersCountByTeam(), and BattlegroundAV::UpdateScore().

◆ GetTeamScore()

◆ GetTeamStartLoc()

void Battleground::GetTeamStartLoc ( uint32 TeamID,
float & X,
float & Y,
float & Z,
float & O ) const
inline

◆ GetTypeID()

◆ GetWinner()

uint8 Battleground::GetWinner ( ) const
inline

Definition at line 321 of file Battleground.h.

References m_Winner.

Referenced by BattlegroundMgr::BuildPvpLogDataPacket().

◆ HandleAreaTrigger()

◆ HandleKillPlayer()

◆ HandleKillUnit()

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

Reimplemented in BattlegroundAV, BattlegroundIC, and BattlegroundSA.

Definition at line 1937 of file Battleground.cpp.

◆ HandlePlayerResurrect()

virtual void Battleground::HandlePlayerResurrect ( Player * )
inlinevirtual

Reimplemented in BattlegroundIC.

Definition at line 490 of file Battleground.h.

◆ HandlePlayerUnderMap()

virtual bool Battleground::HandlePlayerUnderMap ( Player * )
inlinevirtual

Definition at line 523 of file Battleground.h.

Referenced by WorldSession::HandleMovementOpcodes().

◆ HandleQuestComplete()

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

Reimplemented in BattlegroundAV.

Definition at line 539 of file Battleground.h.

◆ HandleTriggerBuff()

◆ HasFreeSlots()

bool Battleground::HasFreeSlots ( ) const

Definition at line 1383 of file Battleground.cpp.

References GetMaxPlayers(), and GetPlayersSize().

Referenced by BattlegroundQueue::BattlegroundQueueUpdate().

◆ IncreaseInvitedCount()

void Battleground::IncreaseInvitedCount ( uint32 team)
inline

Definition at line 358 of file Battleground.h.

References ALLIANCE, m_InvitedAlliance, and m_InvitedHorde.

Referenced by BattlegroundQueue::InviteGroupToBG().

◆ IsAllNodesControlledByTeam()

virtual bool Battleground::IsAllNodesControlledByTeam ( uint32 ) const
inlinevirtual

Reimplemented in BattlegroundAB, BattlegroundBFG, BattlegroundEY, and BattlegroundIC.

Definition at line 294 of file Battleground.h.

◆ isArena()

◆ isBattleground()

bool Battleground::isBattleground ( ) const
inline

◆ IsPlayerInBattleground()

bool Battleground::IsPlayerInBattleground ( uint64 guid) const

◆ IsRandom()

bool Battleground::IsRandom ( ) const
inline

Definition at line 324 of file Battleground.h.

References m_IsRandom.

Referenced by Player::CanJoinToBattleground(), and EndBattleground().

◆ isRated()

bool Battleground::isRated ( ) const
inline

◆ IsSpellAllowed()

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

Reimplemented in BattlegroundIC.

Definition at line 541 of file Battleground.h.

◆ ModifyStartDelayTime()

void Battleground::ModifyStartDelayTime ( int diff)
inline

Definition at line 348 of file Battleground.h.

References m_StartDelayTime.

Referenced by _ProcessJoin().

◆ PlayerAddedToBGCheckIfBGIsRunning()

◆ PlaySoundToAll()

◆ PlaySoundToTeam()

void Battleground::PlaySoundToTeam ( uint32 SoundID,
uint32 TeamID )

Definition at line 651 of file Battleground.cpp.

References _GetPlayerForTeam(), m_Players, and sBattlegroundMgr.

◆ 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, BattlegroundBFG, BattlegroundDS, BattlegroundEY, BattlegroundIC, BattlegroundRV, BattlegroundSA, BattlegroundTP, BattlegroundVOP, and BattlegroundWS.

Definition at line 640 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 626 of file Battleground.h.

Referenced by Update().

◆ PSendMessageToAll()

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

Definition at line 1722 of file Battleground.cpp.

References BroadcastWorker().

Referenced by _ProcessProgress(), and BattlegroundEY::EventPlayerClickedOnFlag().

◆ RelocateDeadPlayers()

◆ RemoveAuraOnTeam()

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

Definition at line 669 of file Battleground.cpp.

References _GetPlayerForTeam(), and m_Players.

Referenced by BattlegroundIC::HandleCapturedNodes().

◆ RemoveFromBGFreeSlotQueue()

void Battleground::RemoveFromBGFreeSlotQueue ( )

◆ RemovePlayer()

◆ RemovePlayerAtLeave()

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

Definition at line 962 of file Battleground.cpp.

References AddToBGFreeSlotQueue(), ALLIANCE, BATTLEGROUND_AA, BATTLEGROUND_TYPE_NONE, BattlegroundMgr::BGQueueTypeId(), Player::ClearAfkReports(), DecreaseInvitedCount(), ObjectAccessor::FindPlayer(), GetArenaMatchmakerRating(), GetArenaTeamIdForTeam(), GetArenaType(), Player::GetBattlegroundQueueIndex(), Player::GetBattlegroundQueueJoinTime(), GetBgRaid(), GetBracketId(), GetInvitedCount(), WorldObject::GetName(), GetOtherTeam(), GetPlayersSize(), GetPlayerTeam(), GetStatus(), Player::GetTeam(), GetTypeID(), Unit::HasAuraType(), HORDE, Unit::IsAlive(), isArena(), isBattleground(), isRated(), m_Players, m_SetDeleteThis, ArenaTeam::MemberLost(), ArenaTeam::OfflineMemberLost(), PET_SAVE_NOT_IN_SLOT, PlayerScores, Unit::RemoveAurasByType(), Player::RemoveBattlegroundQueueId(), Player::RemoveBattlegroundQueueJoinTime(), Player::RemovePet(), RemovePlayer(), RemovePlayerFromResurrectQueue(), Player::ResummonPetTemporaryUnSummonedIfAny(), Player::ResurrectPlayer(), sArenaTeamMgr, sBattlegroundMgr, Player::SendDirectMessage(), SendPacketToTeam(), Player::SetBattlegroundId(), SetBgRaid(), Player::SetBGTeam(), SF_LOG_DEBUG, Player::SpawnCorpseBones(), SPELL_AURA_MOD_SHAPESHIFT, SPELL_AURA_SPIRIT_OF_REDEMPTION, STATUS_IN_PROGRESS, STATUS_NONE, STATUS_WAIT_LEAVE, Player::TeleportToBGEntryPoint(), and UpdatePlayersCountByTeam().

Referenced by _ProcessLeave(), _ProcessOfflineQueue(), BattlegroundSA::EndBattleground(), and Player::LoadFromDB().

◆ RemovePlayerFromResurrectQueue()

void Battleground::RemovePlayerFromResurrectQueue ( uint64 player_guid)

◆ Reset()

◆ ResetBGSubclass()

virtual void Battleground::ResetBGSubclass ( )
inlinevirtual

Reimplemented in BattlegroundAV.

Definition at line 289 of file Battleground.h.

Referenced by Reset().

◆ RewardHonorToTeam()

◆ RewardReputationToTeam()

◆ RewardXPAtKill()

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

Definition at line 1986 of file Battleground.cpp.

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

Referenced by HandleKillPlayer().

◆ SendMessage2ToAll()

◆ SendMessageToAll()

◆ SendPacketToAll()

void Battleground::SendPacketToAll ( WorldPacket * packet)

Definition at line 625 of file Battleground.cpp.

References _GetPlayer(), and m_Players.

Referenced by PlaySoundToAll(), and UpdateWorldState().

◆ SendPacketToTeam()

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

Definition at line 632 of file Battleground.cpp.

References _GetPlayerForTeam(), and m_Players.

Referenced by AddPlayer(), and RemovePlayerAtLeave().

◆ SendWarningToAll()

◆ SetArenaMatchmakerRating()

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

◆ SetArenaorBGType()

void Battleground::SetArenaorBGType ( bool _isArena)
inline

Definition at line 344 of file Battleground.h.

References m_IsArena.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetArenaTeamIdForTeam()

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

Definition at line 459 of file Battleground.h.

References GetTeamIndexByTeamId(), and m_ArenaTeamIds.

◆ SetArenaTeamRatingChangeForTeam()

void Battleground::SetArenaTeamRatingChangeForTeam ( uint32 Team,
int32 RatingChange )
inline

Definition at line 462 of file Battleground.h.

References GetTeamIndexByTeamId(), and m_ArenaTeamRatingChanges.

Referenced by EndBattleground().

◆ SetArenaType()

void Battleground::SetArenaType ( uint8 type)
inline

Definition at line 343 of file Battleground.h.

References m_ArenaType.

Referenced by BattlegroundMgr::CreateNewBattleground().

◆ SetBgMap()

void Battleground::SetBgMap ( BattlegroundMap * map)
inline

Definition at line 396 of file Battleground.h.

References m_Map.

Referenced by MapInstanced::CreateBattleground().

◆ SetBgRaid()

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

◆ SetBracket()

◆ SetClientInstanceID()

void Battleground::SetClientInstanceID ( uint32 InstanceID)
inline

Definition at line 335 of file Battleground.h.

References m_ClientInstanceID.

Referenced by BattlegroundMgr::CreateNewBattleground().

◆ SetDeleteThis()

void Battleground::SetDeleteThis ( )
inline

Definition at line 532 of file Battleground.h.

References m_SetDeleteThis.

◆ SetDroppedFlagGUID()

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

Reimplemented in BattlegroundEY, BattlegroundTP, and BattlegroundWS.

Definition at line 538 of file Battleground.h.

◆ SetElapsedTime()

void Battleground::SetElapsedTime ( uint32 Time)
inline

Definition at line 336 of file Battleground.h.

References m_StartTime.

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

◆ SetGuid()

void Battleground::SetGuid ( uint64 newGuid)
inline

◆ SetHoliday()

void Battleground::SetHoliday ( bool is_holiday)

Definition at line 1922 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 338 of file Battleground.h.

References m_LastResurrectTime.

Referenced by Reset(), and StartBattleground().

◆ SetLevelRange()

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

Definition at line 341 of file Battleground.h.

References m_LevelMax, and m_LevelMin.

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

◆ SetMapId()

void Battleground::SetMapId ( uint32 MapID)
inline

Definition at line 392 of file Battleground.h.

References m_MapId.

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 340 of file Battleground.h.

References m_MinPlayers.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetMinPlayersPerTeam()

void Battleground::SetMinPlayersPerTeam ( uint32 MinPlayers)
inline

Definition at line 352 of file Battleground.h.

References m_MinPlayersPerTeam.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetName()

void Battleground::SetName ( char const * Name)
inline

Definition at line 328 of file Battleground.h.

References m_Name.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetRandom()

void Battleground::SetRandom ( bool isRandom)
inline

◆ SetRandomTypeID()

void Battleground::SetRandomTypeID ( BattlegroundTypeId TypeID)
inline

Definition at line 330 of file Battleground.h.

References m_RandomTypeID.

Referenced by BattlegroundMgr::CreateNewBattleground().

◆ SetRated()

void Battleground::SetRated ( bool state)
inline

Definition at line 342 of file Battleground.h.

References m_IsRated.

Referenced by BattlegroundMgr::CreateNewBattleground().

◆ SetRemainingTime()

void Battleground::SetRemainingTime ( uint32 Time)
inline

Definition at line 337 of file Battleground.h.

References m_EndTime.

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

◆ SetScriptId()

void Battleground::SetScriptId ( uint32 scriptId)
inline

Definition at line 346 of file Battleground.h.

References ScriptId.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetStartDelayTime()

void Battleground::SetStartDelayTime ( int Time)
inline

Definition at line 349 of file Battleground.h.

References m_StartDelayTime.

Referenced by _ProcessJoin().

◆ SetStartMaxDist()

void Battleground::SetStartMaxDist ( float startMaxDist)
inline

Definition at line 410 of file Battleground.h.

References m_StartMaxDist.

Referenced by BattlegroundMgr::CreateBattleground().

◆ SetStatus()

◆ SetTeamStartLoc()

void Battleground::SetTeamStartLoc ( uint32 TeamID,
float X,
float Y,
float Z,
float O )

◆ SetTypeID()

void Battleground::SetTypeID ( BattlegroundTypeId TypeID)
inline

◆ SetupBattleground()

◆ SetWinner()

void Battleground::SetWinner ( uint8 winner)
inline

Definition at line 345 of file Battleground.h.

References m_Winner.

Referenced by EndBattleground(), and Reset().

◆ ShouldDelayStartForDebug()

virtual bool Battleground::ShouldDelayStartForDebug ( ) const
inlineprivatevirtual

Reimplemented in BattlegroundSA.

Definition at line 627 of file Battleground.h.

Referenced by Update().

◆ SpawnBGObject()

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

Definition at line 1587 of file Battleground.cpp.

References BgObjects, FindBgMap(), GameObject::GetGameObject(), GO_JUST_DEACTIVATED, and GO_READY.

Referenced by BattlegroundAB::_CreateBanner(), BattlegroundBFG::_CreateBanner(), BattlegroundAB::_DelBanner(), BattlegroundBFG::_DelBanner(), BattlegroundAV::EventPlayerAssaultsPoint(), BattlegroundEY::EventPlayerCapturedFlag(), BattlegroundTP::EventPlayerCapturedFlag(), BattlegroundWS::EventPlayerCapturedFlag(), BattlegroundEY::EventPlayerClickedOnFlag(), BattlegroundTP::EventPlayerClickedOnFlag(), BattlegroundVOP::EventPlayerClickedOnFlag(), BattlegroundWS::EventPlayerClickedOnFlag(), BattlegroundAV::EventPlayerDefendsPoint(), BattlegroundAV::EventPlayerDestroyedPoint(), BattlegroundEY::EventTeamCapturedPoint(), BattlegroundEY::EventTeamLostPoint(), BattlegroundVOP::HandleKillPlayer(), BattlegroundAV::HandleKillUnit(), HandleTriggerBuff(), BattlegroundSA::ResetObjs(), BattlegroundEY::RespawnFlag(), BattlegroundTP::RespawnFlag(), BattlegroundWS::RespawnFlag(), BattlegroundTP::RespawnFlagAfterDrop(), BattlegroundWS::RespawnFlagAfterDrop(), BattlegroundAV::SetupBattleground(), BattlegroundAB::StartingEventCloseDoors(), BattlegroundBE::StartingEventCloseDoors(), BattlegroundBFG::StartingEventCloseDoors(), BattlegroundDS::StartingEventCloseDoors(), BattlegroundEY::StartingEventCloseDoors(), BattlegroundNA::StartingEventCloseDoors(), BattlegroundRL::StartingEventCloseDoors(), BattlegroundTP::StartingEventCloseDoors(), BattlegroundTV::StartingEventCloseDoors(), BattlegroundVOP::StartingEventCloseDoors(), BattlegroundWS::StartingEventCloseDoors(), BattlegroundAB::StartingEventOpenDoors(), BattlegroundAV::StartingEventOpenDoors(), BattlegroundBE::StartingEventOpenDoors(), BattlegroundBFG::StartingEventOpenDoors(), BattlegroundDS::StartingEventOpenDoors(), BattlegroundEY::StartingEventOpenDoors(), BattlegroundNA::StartingEventOpenDoors(), BattlegroundRL::StartingEventOpenDoors(), BattlegroundRV::StartingEventOpenDoors(), BattlegroundTP::StartingEventOpenDoors(), BattlegroundTV::StartingEventOpenDoors(), BattlegroundVOP::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 531 of file Battleground.h.

References m_SetDeleteThis.

Referenced by BattlegroundMgr::Update().

◆ Update()

◆ UpdateArenaWorldState()

◆ UpdatePlayerScore()

◆ UpdatePlayersCountByTeam()

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

Definition at line 450 of file Battleground.h.

References GetTeamIndexByTeamId(), and m_PlayersCount.

Referenced by AddPlayer(), and RemovePlayerAtLeave().

◆ UpdateWorldState()

void Battleground::UpdateWorldState ( uint32 Field,
uint32 Value )

Definition at line 702 of file Battleground.cpp.

References sBattlegroundMgr, and SendPacketToAll().

Referenced by BattlegroundAB::_SendNodeUpdate(), BattlegroundBFG::_SendNodeUpdate(), BattlegroundRV::AddPlayer(), BattlegroundSA::CaptureGraveyard(), BattlegroundIC::DestroyGate(), BattlegroundSA::DestroyGate(), BattlegroundSA::EndBattleground(), BattlegroundTP::EventPlayerCapturedFlag(), BattlegroundWS::EventPlayerCapturedFlag(), BattlegroundEY::EventPlayerClickedOnFlag(), BattlegroundTP::EventPlayerClickedOnFlag(), BattlegroundWS::EventPlayerClickedOnFlag(), BattlegroundSA::EventPlayerDamagedGO(), BattlegroundEY::EventPlayerDroppedFlag(), BattlegroundTP::EventPlayerDroppedFlag(), BattlegroundWS::EventPlayerDroppedFlag(), BattlegroundIC::HandleKillPlayer(), BattlegroundRV::HandleKillPlayer(), BattlegroundVOP::HandleKillPlayer(), BattlegroundAB::PostUpdateImpl(), BattlegroundBFG::PostUpdateImpl(), BattlegroundIC::PostUpdateImpl(), BattlegroundTP::PostUpdateImpl(), BattlegroundVOP::PostUpdateImpl(), BattlegroundWS::PostUpdateImpl(), BattlegroundRV::RemovePlayer(), BattlegroundSA::ResetObjs(), BattlegroundEY::RespawnFlag(), BattlegroundAV::SendMineWorldStates(), BattlegroundSA::SendTime(), BattlegroundTP::StartingEventCloseDoors(), BattlegroundWS::StartingEventCloseDoors(), BattlegroundAV::StartingEventOpenDoors(), BattlegroundSA::ToggleTimer(), UpdateArenaWorldState(), BattlegroundTP::UpdateFlagState(), BattlegroundWS::UpdateFlagState(), BattlegroundAV::UpdateNodeWorldState(), BattlegroundIC::UpdateNodeWorldState(), BattlegroundEY::UpdatePointsCount(), BattlegroundEY::UpdatePointsIcons(), BattlegroundAV::UpdateScore(), BattlegroundEY::UpdateTeamScore(), BattlegroundTP::UpdateTeamScore(), BattlegroundVOP::UpdateTeamScore(), and BattlegroundWS::UpdateTeamScore().

◆ UpdateWorldStateForPlayer()

void Battleground::UpdateWorldStateForPlayer ( uint32 Field,
uint32 Value,
Player * player )

◆ YellToAll()

Member Data Documentation

◆ BgCreatures

◆ BgObjects

◆ m_ArenaTeamIds

◆ m_ArenaTeamMMR

uint32 Battleground::m_ArenaTeamMMR[BG_TEAMS_COUNT]
private

◆ m_ArenaTeamRatingChanges

int32 Battleground::m_ArenaTeamRatingChanges[BG_TEAMS_COUNT]
private

◆ m_ArenaType

uint8 Battleground::m_ArenaType
private

◆ m_BgRaids

Group* Battleground::m_BgRaids[BG_TEAMS_COUNT]
private

Definition at line 653 of file Battleground.h.

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

◆ m_BracketId

BattlegroundBracketId Battleground::m_BracketId
private

Definition at line 598 of file Battleground.h.

Referenced by Battleground(), GetBracketId(), and SetBracket().

◆ m_BuffChange

◆ m_ClientInstanceID

uint32 Battleground::m_ClientInstanceID
private

Definition at line 591 of file Battleground.h.

Referenced by Battleground(), GetClientInstanceID(), and SetClientInstanceID().

◆ m_CountdownTimer

uint32 Battleground::m_CountdownTimer
private

Definition at line 593 of file Battleground.h.

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

◆ m_EndTime

int32 Battleground::m_EndTime
private

Definition at line 596 of file Battleground.h.

Referenced by _ProcessJoin(), Battleground(), GetRemainingTime(), and SetRemainingTime().

◆ m_Events

uint8 Battleground::m_Events
protected

Definition at line 574 of file Battleground.h.

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

◆ m_Guid

uint64 Battleground::m_Guid
private

Definition at line 609 of file Battleground.h.

Referenced by Battleground(), GetGUID(), and SetGuid().

◆ m_HonorMode

BGHonorMode Battleground::m_HonorMode
protected

◆ m_InBGFreeSlotQueue

bool Battleground::m_InBGFreeSlotQueue
private

◆ m_InstanceID

◆ m_InvitedAlliance

uint32 Battleground::m_InvitedAlliance
private

◆ m_InvitedHorde

uint32 Battleground::m_InvitedHorde
private

◆ m_IsArena

bool Battleground::m_IsArena
private

Definition at line 602 of file Battleground.h.

Referenced by Battleground(), isArena(), isBattleground(), and SetArenaorBGType().

◆ m_IsRandom

bool Battleground::m_IsRandom
protected

Definition at line 580 of file Battleground.h.

Referenced by Battleground(), IsRandom(), and SetRandom().

◆ m_IsRated

bool Battleground::m_IsRated
private

Definition at line 605 of file Battleground.h.

Referenced by Battleground(), isRated(), SetRated(), and StartBattleground().

◆ m_LastResurrectTime

uint32 Battleground::m_LastResurrectTime
private

◆ m_LevelMax

uint32 Battleground::m_LevelMax
private

Definition at line 666 of file Battleground.h.

Referenced by Battleground(), GetMaxLevel(), and SetLevelRange().

◆ m_LevelMin

uint32 Battleground::m_LevelMin
private

Definition at line 665 of file Battleground.h.

Referenced by Battleground(), CanAwardArenaPoints(), GetMinLevel(), and SetLevelRange().

◆ m_Map

BattlegroundMap* Battleground::m_Map
private

Definition at line 674 of file Battleground.h.

Referenced by Battleground(), FindBgMap(), GetBgMap(), SetBgMap(), and ~Battleground().

◆ m_MapId

◆ m_MaxPlayers

uint32 Battleground::m_MaxPlayers
private

Definition at line 668 of file Battleground.h.

Referenced by Battleground(), GetMaxPlayers(), and SetMaxPlayers().

◆ m_MaxPlayersPerTeam

uint32 Battleground::m_MaxPlayersPerTeam
private

Definition at line 667 of file Battleground.h.

Referenced by Battleground(), GetMaxPlayersPerTeam(), and SetMaxPlayersPerTeam().

◆ m_MinPlayers

uint32 Battleground::m_MinPlayers
private

Definition at line 670 of file Battleground.h.

Referenced by Battleground(), GetMinPlayers(), and SetMinPlayers().

◆ m_MinPlayersPerTeam

uint32 Battleground::m_MinPlayersPerTeam
private

Definition at line 669 of file Battleground.h.

Referenced by Battleground(), GetMinPlayersPerTeam(), and SetMinPlayersPerTeam().

◆ m_Name

char const* Battleground::m_Name
private

Definition at line 608 of file Battleground.h.

Referenced by Battleground(), GetName(), and SetName().

◆ m_OfflineQueue

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

Definition at line 644 of file Battleground.h.

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

◆ m_Players

◆ m_PlayersCount

uint32 Battleground::m_PlayersCount[BG_TEAMS_COUNT]
private

Definition at line 656 of file Battleground.h.

Referenced by Battleground(), GetPlayersCountByTeam(), and UpdatePlayersCountByTeam().

◆ m_PrematureCountDown

bool Battleground::m_PrematureCountDown
private

Definition at line 606 of file Battleground.h.

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

◆ m_PrematureCountDownTimer

uint32 Battleground::m_PrematureCountDownTimer
private

Definition at line 607 of file Battleground.h.

Referenced by _ProcessProgress(), and Battleground().

◆ m_RandomTypeID

BattlegroundTypeId Battleground::m_RandomTypeID
private

Definition at line 588 of file Battleground.h.

Referenced by Battleground(), GetTypeID(), and SetRandomTypeID().

◆ m_ResetStatTimer

uint32 Battleground::m_ResetStatTimer
private

Definition at line 594 of file Battleground.h.

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

◆ m_ResurrectQueue

std::vector<uint64> Battleground::m_ResurrectQueue
private

Definition at line 643 of file Battleground.h.

Referenced by _ProcessRessurect().

◆ m_ReviveQueue

std::map<uint64, std::vector<uint64> > Battleground::m_ReviveQueue
protected

◆ m_SetDeleteThis

bool Battleground::m_SetDeleteThis
private

Definition at line 601 of file Battleground.h.

Referenced by Battleground(), RemovePlayerAtLeave(), SetDeleteThis(), ToBeDeleted(), and Update().

◆ m_StartDelayTime

int32 Battleground::m_StartDelayTime
private

◆ m_StartMaxDist

float Battleground::m_StartMaxDist
private

Definition at line 679 of file Battleground.h.

Referenced by Battleground(), GetStartMaxDist(), and SetStartMaxDist().

◆ m_StartTime

uint32 Battleground::m_StartTime
private

Definition at line 592 of file Battleground.h.

Referenced by Battleground(), GetElapsedTime(), and SetElapsedTime().

◆ m_Status

BattlegroundStatus Battleground::m_Status
private

Definition at line 590 of file Battleground.h.

Referenced by Battleground(), GetStatus(), and SetStatus().

◆ m_TeamScores

◆ m_TeamStartLocO

float Battleground::m_TeamStartLocO[BG_TEAMS_COUNT]
private

Definition at line 678 of file Battleground.h.

Referenced by Battleground(), GetTeamStartLoc(), and SetTeamStartLoc().

◆ m_TeamStartLocX

float Battleground::m_TeamStartLocX[BG_TEAMS_COUNT]
private

Definition at line 675 of file Battleground.h.

Referenced by Battleground(), GetTeamStartLoc(), and SetTeamStartLoc().

◆ m_TeamStartLocY

float Battleground::m_TeamStartLocY[BG_TEAMS_COUNT]
private

Definition at line 676 of file Battleground.h.

Referenced by Battleground(), GetTeamStartLoc(), and SetTeamStartLoc().

◆ m_TeamStartLocZ

float Battleground::m_TeamStartLocZ[BG_TEAMS_COUNT]
private

Definition at line 677 of file Battleground.h.

Referenced by Battleground(), GetTeamStartLoc(), and SetTeamStartLoc().

◆ m_TypeID

◆ m_ValidStartPositionTimer

uint32 Battleground::m_ValidStartPositionTimer
private

Definition at line 595 of file Battleground.h.

Referenced by _CheckSafePositions(), and Battleground().

◆ m_Winner

uint8 Battleground::m_Winner
private

Definition at line 603 of file Battleground.h.

Referenced by Battleground(), GetWinner(), and SetWinner().

◆ PlayerScores

◆ ScriptId

uint32 Battleground::ScriptId
private

Definition at line 680 of file Battleground.h.

Referenced by Battleground(), GetScriptId(), and SetScriptId().

◆ StartDelayTimes

◆ StartMessageIds


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