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

#include <BattlegroundMgr.h>

Collaboration diagram for BattlegroundMgr:

Classes

struct  ScheduledQueueUpdate

Public Member Functions

void AddBattleground (Battleground *bg)
void AddToBGFreeSlotQueue (BattlegroundTypeId bgTypeId, Battleground *bg)
void BuildBattlegroundListPacket (WorldPacket *data, uint64 guid, Player *player, BattlegroundTypeId bgTypeId)
void BuildBattlegroundStatusPacket (WorldPacket *data, Battleground *bg, Player *player, uint8 queueSlot, uint8 statusId, uint32 time1, uint32 time2, uint8 arenaType)
void BuildPlayerJoinedBattlegroundPacket (WorldPacket *data, uint64 guid)
void BuildPlayerLeftBattlegroundPacket (WorldPacket *data, uint64 guid)
void BuildPlaySoundPacket (WorldPacket *data, uint32 soundId)
void BuildPvpLogDataPacket (WorldPacket *data, Battleground *bg)
void BuildStatusFailedPacket (WorldPacket *data, Battleground *bg, Player *pPlayer, uint8 QueueSlot, GroupJoinBattlegroundResult result)
void BuildUpdateWorldStatePacket (WorldPacket *data, uint32 field, uint32 value)
void CreateInitialBattlegrounds ()
BattlegroundCreateNewBattleground (BattlegroundTypeId bgTypeId, PvPDifficultyEntry const *bracketEntry, uint8 arenaType, bool isRated)
void DeleteAllBattlegrounds ()
BattlegroundGetBattleground (uint32 InstanceID, BattlegroundTypeId bgTypeId)
BattlegroundQueueGetBattlegroundQueue (BattlegroundQueueTypeId bgQueueTypeId)
BattlegroundGetBattlegroundTemplate (BattlegroundTypeId bgTypeId)
BattlegroundGetBattlegroundThroughClientInstance (uint32 instanceId, BattlegroundTypeId bgTypeId)
BattlegroundTypeId GetBattleMasterBG (uint32 entry) const
BGFreeSlotQueueContainerGetBGFreeSlotQueueStore (BattlegroundTypeId bgTypeId)
uint32 GetMaxRatingDifference () const
uint32 GetPrematureFinishTime () const
uint32 GetRatingDiscardTimer () const
bool isArenaTesting () const
bool isTesting () const
void LoadBattleMastersEntry ()
void RemoveBattleground (BattlegroundTypeId bgTypeId, uint32 instanceId)
void RemoveFromBGFreeSlotQueue (BattlegroundTypeId bgTypeId, uint32 instanceId)
void ScheduleQueueUpdate (uint32 arenaMatchmakerRating, uint8 arenaType, BattlegroundQueueTypeId bgQueueTypeId, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id)
void SendAreaSpiritHealerQueryOpcode (Player *player, Battleground *bg, uint64 guid)
void SendToBattleground (Player *player, uint32 InstanceID, BattlegroundTypeId bgTypeId)
void SetHolidayWeekends (uint32 mask)
void ToggleArenaTesting ()
void ToggleTesting ()
void Update (uint32 diff)

Static Public Member Functions

static uint8 BGArenaType (BattlegroundQueueTypeId bgQueueTypeId)
static BattlegroundQueueTypeId BGQueueTypeId (BattlegroundTypeId bgTypeId, uint8 arenaType)
static BattlegroundTypeId BGTemplateId (BattlegroundQueueTypeId bgQueueTypeId)
static HolidayIds BGTypeToWeekendHolidayId (BattlegroundTypeId bgTypeId)
static bool IsBGWeekend (BattlegroundTypeId bgTypeId)
static BattlegroundTypeId WeekendHolidayIdToBGType (HolidayIds holiday)

Private Types

typedef std::map< BattlegroundTypeId, BattlegroundDataBattlegroundDataContainer
typedef std::map< BattlegroundTypeId, uint8BattlegroundSelectionWeightMap

Private Member Functions

 BattlegroundMgr ()
bool CreateBattleground (CreateBattlegroundData &data)
uint32 CreateClientVisibleInstanceId (BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id)
BattlegroundTypeId GetRandomBG (BattlegroundTypeId id)
 ~BattlegroundMgr ()

Static Private Member Functions

static bool IsArenaType (BattlegroundTypeId bgTypeId)

Private Attributes

BattlegroundDataContainer bgDataStore
BattlegroundSelectionWeightMap m_ArenaSelectionWeights
bool m_ArenaTesting
BattlegroundQueue m_BattlegroundQueues [MAX_BATTLEGROUND_QUEUE_TYPES]
BattlegroundSelectionWeightMap m_BGSelectionWeights
uint32 m_NextRatedArenaUpdate
std::vector< ScheduledQueueUpdatem_QueueUpdateScheduler
bool m_Testing
BattleMastersMap mBattleMastersMap

Friends

class Skyfire::Singleton< BattlegroundMgr, Skyfire::NullMutex >

Detailed Description

Definition at line 51 of file BattlegroundMgr.h.

Member Typedef Documentation

◆ BattlegroundDataContainer

◆ BattlegroundSelectionWeightMap

Definition at line 147 of file BattlegroundMgr.h.

Constructor & Destructor Documentation

◆ BattlegroundMgr()

BattlegroundMgr::BattlegroundMgr ( )
private

Definition at line 44 of file BattlegroundMgr.cpp.

References m_ArenaTesting, m_NextRatedArenaUpdate, m_Testing, and sWorld.

◆ ~BattlegroundMgr()

BattlegroundMgr::~BattlegroundMgr ( )
private

Definition at line 49 of file BattlegroundMgr.cpp.

References DeleteAllBattlegrounds().

Member Function Documentation

◆ AddBattleground()

void BattlegroundMgr::AddBattleground ( Battleground * bg)

◆ AddToBGFreeSlotQueue()

void BattlegroundMgr::AddToBGFreeSlotQueue ( BattlegroundTypeId bgTypeId,
Battleground * bg )

Definition at line 1488 of file BattlegroundMgr.cpp.

References bgDataStore.

◆ BGArenaType()

◆ BGQueueTypeId()

◆ BGTemplateId()

◆ BGTypeToWeekendHolidayId()

◆ BuildBattlegroundListPacket()

◆ BuildBattlegroundStatusPacket()

◆ BuildPlayerJoinedBattlegroundPacket()

void BattlegroundMgr::BuildPlayerJoinedBattlegroundPacket ( WorldPacket * data,
uint64 guid )

◆ BuildPlayerLeftBattlegroundPacket()

void BattlegroundMgr::BuildPlayerLeftBattlegroundPacket ( WorldPacket * data,
uint64 guid )

◆ BuildPlaySoundPacket()

void BattlegroundMgr::BuildPlaySoundPacket ( WorldPacket * data,
uint32 soundId )

◆ BuildPvpLogDataPacket()

◆ BuildStatusFailedPacket()

◆ BuildUpdateWorldStatePacket()

void BattlegroundMgr::BuildUpdateWorldStatePacket ( WorldPacket * data,
uint32 field,
uint32 value )

◆ CreateBattleground()

bool BattlegroundMgr::CreateBattleground ( CreateBattlegroundData & data)
private

Definition at line 897 of file BattlegroundMgr.cpp.

References AddBattleground(), ALLIANCE, BATTLEGROUND_AA, BATTLEGROUND_AB, BATTLEGROUND_AV, BATTLEGROUND_BE, BATTLEGROUND_BFG, BATTLEGROUND_DS, BATTLEGROUND_EY, BATTLEGROUND_IC, BATTLEGROUND_NA, BATTLEGROUND_RB, BATTLEGROUND_RL, BATTLEGROUND_RV, BATTLEGROUND_SA, BATTLEGROUND_TP, BATTLEGROUND_TV, BATTLEGROUND_VOP, BATTLEGROUND_WS, CreateBattlegroundData::BattlegroundName, CreateBattlegroundData::bgTypeId, HIGHGUID_BATTLEGROUND, HORDE, CreateBattlegroundData::IsArena, CreateBattlegroundData::LevelMax, CreateBattlegroundData::LevelMin, MAKE_NEW_GUID(), CreateBattlegroundData::MapID, CreateBattlegroundData::MaxPlayersPerTeam, CreateBattlegroundData::MinPlayersPerTeam, CreateBattlegroundData::scriptId, Battleground::SetArenaorBGType(), Battleground::SetGuid(), Battleground::SetInstanceID(), Battleground::SetLevelRange(), Battleground::SetMapId(), Battleground::SetMaxPlayers(), Battleground::SetMaxPlayersPerTeam(), Battleground::SetMinPlayers(), Battleground::SetMinPlayersPerTeam(), Battleground::SetName(), Battleground::SetRandom(), Battleground::SetScriptId(), Battleground::SetStartMaxDist(), Battleground::SetTeamStartLoc(), Battleground::SetTypeID(), CreateBattlegroundData::StartMaxDist, CreateBattlegroundData::Team1StartLocO, CreateBattlegroundData::Team1StartLocX, CreateBattlegroundData::Team1StartLocY, CreateBattlegroundData::Team1StartLocZ, CreateBattlegroundData::Team2StartLocO, CreateBattlegroundData::Team2StartLocX, CreateBattlegroundData::Team2StartLocY, and CreateBattlegroundData::Team2StartLocZ.

Referenced by CreateInitialBattlegrounds().

◆ CreateClientVisibleInstanceId()

uint32 BattlegroundMgr::CreateClientVisibleInstanceId ( BattlegroundTypeId bgTypeId,
BattlegroundBracketId bracket_id )
private

Definition at line 750 of file BattlegroundMgr.cpp.

References bgDataStore, and IsArenaType().

Referenced by CreateNewBattleground().

◆ CreateInitialBattlegrounds()

◆ CreateNewBattleground()

◆ DeleteAllBattlegrounds()

void BattlegroundMgr::DeleteAllBattlegrounds ( )

◆ GetBattleground()

Battleground * BattlegroundMgr::GetBattleground ( uint32 InstanceID,
BattlegroundTypeId bgTypeId )

◆ GetBattlegroundQueue()

BattlegroundQueue & BattlegroundMgr::GetBattlegroundQueue ( BattlegroundQueueTypeId bgQueueTypeId)
inline

Definition at line 91 of file BattlegroundMgr.h.

References GetBattlegroundQueue(), and m_BattlegroundQueues.

Referenced by GetBattlegroundQueue().

◆ GetBattlegroundTemplate()

Battleground * BattlegroundMgr::GetBattlegroundTemplate ( BattlegroundTypeId bgTypeId)

◆ GetBattlegroundThroughClientInstance()

Battleground * BattlegroundMgr::GetBattlegroundThroughClientInstance ( uint32 instanceId,
BattlegroundTypeId bgTypeId )

◆ GetBattleMasterBG()

BattlegroundTypeId BattlegroundMgr::GetBattleMasterBG ( uint32 entry) const
inline

Definition at line 114 of file BattlegroundMgr.h.

References BATTLEGROUND_WS, and mBattleMastersMap.

◆ GetBGFreeSlotQueueStore()

BGFreeSlotQueueContainer & BattlegroundMgr::GetBGFreeSlotQueueStore ( BattlegroundTypeId bgTypeId)

Definition at line 1483 of file BattlegroundMgr.cpp.

References bgDataStore.

◆ GetMaxRatingDifference()

uint32 BattlegroundMgr::GetMaxRatingDifference ( ) const

Definition at line 1336 of file BattlegroundMgr.cpp.

References CONFIG_ARENA_MAX_RATING_DIFFERENCE, and sWorld.

◆ GetPrematureFinishTime()

uint32 BattlegroundMgr::GetPrematureFinishTime ( ) const

Definition at line 1350 of file BattlegroundMgr.cpp.

References CONFIG_BATTLEGROUND_PREMATURE_FINISH_TIMER, and sWorld.

◆ GetRandomBG()

◆ GetRatingDiscardTimer()

uint32 BattlegroundMgr::GetRatingDiscardTimer ( ) const

Definition at line 1345 of file BattlegroundMgr.cpp.

References CONFIG_ARENA_RATING_DISCARD_TIMER, and sWorld.

◆ isArenaTesting()

bool BattlegroundMgr::isArenaTesting ( ) const
inline

Definition at line 100 of file BattlegroundMgr.h.

References m_ArenaTesting.

◆ IsArenaType()

bool BattlegroundMgr::IsArenaType ( BattlegroundTypeId bgTypeId)
staticprivate

◆ IsBGWeekend()

bool BattlegroundMgr::IsBGWeekend ( BattlegroundTypeId bgTypeId)
static

◆ isTesting()

bool BattlegroundMgr::isTesting ( ) const
inline

Definition at line 101 of file BattlegroundMgr.h.

References m_Testing.

◆ LoadBattleMastersEntry()

void BattlegroundMgr::LoadBattleMastersEntry ( )

◆ RemoveBattleground()

void BattlegroundMgr::RemoveBattleground ( BattlegroundTypeId bgTypeId,
uint32 instanceId )

Definition at line 1510 of file BattlegroundMgr.cpp.

References bgDataStore.

◆ RemoveFromBGFreeSlotQueue()

void BattlegroundMgr::RemoveFromBGFreeSlotQueue ( BattlegroundTypeId bgTypeId,
uint32 instanceId )

Definition at line 1493 of file BattlegroundMgr.cpp.

References bgDataStore.

◆ ScheduleQueueUpdate()

void BattlegroundMgr::ScheduleQueueUpdate ( uint32 arenaMatchmakerRating,
uint8 arenaType,
BattlegroundQueueTypeId bgQueueTypeId,
BattlegroundTypeId bgTypeId,
BattlegroundBracketId bracket_id )

Definition at line 1327 of file BattlegroundMgr.cpp.

References m_QueueUpdateScheduler.

◆ SendAreaSpiritHealerQueryOpcode()

◆ SendToBattleground()

void BattlegroundMgr::SendToBattleground ( Player * player,
uint32 InstanceID,
BattlegroundTypeId bgTypeId )

◆ SetHolidayWeekends()

void BattlegroundMgr::SetHolidayWeekends ( uint32 mask)

Definition at line 1316 of file BattlegroundMgr.cpp.

References GetBattlegroundTemplate(), and MAX_BATTLEGROUND_TYPE_ID.

◆ ToggleArenaTesting()

void BattlegroundMgr::ToggleArenaTesting ( )

◆ ToggleTesting()

void BattlegroundMgr::ToggleTesting ( )

Definition at line 1304 of file BattlegroundMgr.cpp.

References LANG_DEBUG_BG_OFF, LANG_DEBUG_BG_ON, m_Testing, and sWorld.

◆ Update()

◆ WeekendHolidayIdToBGType()

◆ Skyfire::Singleton< BattlegroundMgr, Skyfire::NullMutex >

Definition at line 48 of file BattlegroundMgr.h.

Member Data Documentation

◆ bgDataStore

◆ m_ArenaSelectionWeights

BattlegroundSelectionWeightMap BattlegroundMgr::m_ArenaSelectionWeights
private

Definition at line 148 of file BattlegroundMgr.h.

Referenced by CreateInitialBattlegrounds(), and GetRandomBG().

◆ m_ArenaTesting

bool BattlegroundMgr::m_ArenaTesting
private

Definition at line 152 of file BattlegroundMgr.h.

Referenced by BattlegroundMgr(), isArenaTesting(), and ToggleArenaTesting().

◆ m_BattlegroundQueues

BattlegroundQueue BattlegroundMgr::m_BattlegroundQueues[MAX_BATTLEGROUND_QUEUE_TYPES]
private

Definition at line 131 of file BattlegroundMgr.h.

Referenced by GetBattlegroundQueue(), and Update().

◆ m_BGSelectionWeights

BattlegroundSelectionWeightMap BattlegroundMgr::m_BGSelectionWeights
private

Definition at line 149 of file BattlegroundMgr.h.

Referenced by CreateInitialBattlegrounds(), and GetRandomBG().

◆ m_NextRatedArenaUpdate

uint32 BattlegroundMgr::m_NextRatedArenaUpdate
private

Definition at line 151 of file BattlegroundMgr.h.

Referenced by BattlegroundMgr(), and Update().

◆ m_QueueUpdateScheduler

std::vector<ScheduledQueueUpdate> BattlegroundMgr::m_QueueUpdateScheduler
private

Definition at line 150 of file BattlegroundMgr.h.

Referenced by ScheduleQueueUpdate(), and Update().

◆ m_Testing

bool BattlegroundMgr::m_Testing
private

Definition at line 153 of file BattlegroundMgr.h.

Referenced by BattlegroundMgr(), isTesting(), and ToggleTesting().

◆ mBattleMastersMap

BattleMastersMap BattlegroundMgr::mBattleMastersMap
private

Definition at line 154 of file BattlegroundMgr.h.

Referenced by GetBattleMasterBG(), and LoadBattleMastersEntry().


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