18#ifndef __BATTLEGROUNDMGR_H
19#define __BATTLEGROUNDMGR_H
26#include <unordered_map>
75 struct BattlefieldStatusHeader;
76 class BattlefieldStatusNone;
77 class BattlefieldStatusNeedConfirmation;
78 class BattlefieldStatusActive;
79 class BattlefieldStatusQueued;
80 class BattlefieldStatusFailed;
115 void RemoveFromBGFreeSlotQueue(
uint32 mapId,
uint32 instanceId);
118 void LoadBattlegroundTemplates();
119 void DeleteAllBattlegrounds();
127 uint32 GetPrematureFinishTime()
const;
129 void ToggleArenaTesting();
130 void ToggleTesting();
135 static bool IsRandomBattleground(
uint32 battlemasterListId);
142 uint32 GetMaxRatingDifference()
const;
143 uint32 GetRatingDiscardTimer()
const;
144 void LoadBattleMastersEntry();
145 void CheckBattleMasters();
148 BattleMastersMap::const_iterator itr = mBattleMastersMap.find(entry);
149 if (itr != mBattleMastersMap.end())
156 BattlegroundTemplateMap::const_iterator itr = _battlegroundTemplates.find(
id);
157 if (itr != _battlegroundTemplates.end())
162 void LoadBattlegroundScriptTemplate();
194 BattlegroundMapTemplateContainer::const_iterator itr = _battlegroundMapTemplates.find(mapId);
195 if (itr != _battlegroundMapTemplates.end())
208#define sBattlegroundMgr BattlegroundMgr::instance()
std::unordered_map< uint32, BattlegroundTypeId > BattleMastersMap
@ BATTLEGROUND_OBJECTIVE_UPDATE_INTERVAL
std::set< uint32 > BattlegroundClientIdsContainer
std::map< uint32, Trinity::unique_trackable_ptr< Battleground > > BattlegroundContainer
std::list< Battleground * > BGFreeSlotQueueContainer
@ MAX_BATTLEGROUND_BRACKETS
GroupJoinBattlegroundResult
uint8 constexpr PVP_TEAMS_COUNT
std::map< BattlegroundTypeId, BattlegroundTemplate > BattlegroundTemplateMap
BattlegroundMapTemplateContainer _battlegroundMapTemplates
std::map< BattlegroundQueueTypeId, BattlegroundQueue > m_BattlegroundQueues
BattlegroundTemplate const * GetBattlegroundTemplateByMapId(uint32 mapId)
std::vector< ScheduledQueueUpdate > m_QueueUpdateScheduler
BattlegroundTemplateMap _battlegroundTemplates
std::map< BattlegroundTypeId, BattlegroundData > BattlegroundDataContainer
std::map< uint32, BattlegroundTemplate * > BattlegroundMapTemplateContainer
bool isArenaTesting() const
BattlegroundQueue & GetBattlegroundQueue(BattlegroundQueueTypeId bgQueueTypeId)
BattleMastersMap mBattleMastersMap
std::map< uint32, BGFreeSlotQueueContainer > m_BGFreeSlotQueue
BattlegroundMgr & operator=(BattlegroundMgr const &right)=delete
BattlegroundTemplate const * GetBattlegroundTemplateByTypeId(BattlegroundTypeId id)
BattlegroundMgr(BattlegroundMgr const &right)=delete
BattlegroundTypeId GetBattleMasterBG(uint32 entry) const
uint32 m_NextRatedArenaUpdate
std::map< std::pair< int32, uint32 >, BattlegroundScriptTemplate > _battlegroundScriptTemplates
BattlegroundMgr & operator=(BattlegroundMgr &&right)=delete
BattlegroundDataContainer bgDataStore
BattlegroundMgr(BattlegroundMgr &&right)=delete
void Update(VignetteData &vignette, WorldObject const *owner)
BattlegroundContainer m_Battlegrounds
BattlegroundClientIdsContainer m_ClientBattlegroundIds[MAX_BATTLEGROUND_BRACKETS]
BattlegroundQueueTypeId QueueId
bool operator==(ScheduledQueueUpdate const &right) const =default
uint32 ArenaMatchmakerRating
BattlegroundBracketId BracketId
uint8 GetMinLevel() const
BattlemasterListEntry const * BattlemasterEntry
uint16 GetMaxPlayersPerTeam() const
std::vector< int32 > MapIDs
WorldSafeLocsEntry const * StartLocation[PVP_TEAMS_COUNT]
uint16 GetMinPlayersPerTeam() const
uint8 GetMaxLevel() const