6#ifndef SF_BATTLEGROUNDMGR_H
7#define SF_BATTLEGROUNDMGR_H
20#define WS_CURRENCY_RESET_TIME 20001
66 void
BuildStatusFailedPacket(WorldPacket* data, Battleground* bg, Player* pPlayer, uint8 QueueSlot, GroupJoinBattlegroundResult result);
69 void
BuildBattlegroundStatusPacket(WorldPacket* data, Battleground* bg, Player* player, uint8 queueSlot, uint8 statusId, uint32 time1, uint32 time2, uint8 arenaType);
88 void
SendToBattleground(Player* player, uint32 InstanceID, BattlegroundTypeId bgTypeId);
157#define sBattlegroundMgr Skyfire::Singleton<BattlegroundMgr, Skyfire::NullMutex>::instance()
std::map< uint32, Battleground * > BattlegroundContainer
std::set< uint32 > BattlegroundClientIdsContainer
UNORDERED_MAP< uint32, BattlegroundTypeId > BattleMastersMap
std::list< Battleground * > BGFreeSlotQueueContainer
#define MAX_BATTLEGROUND_BRACKETS
@ MAX_BATTLEGROUND_QUEUE_TYPES
Battleground * GetBattlegroundThroughClientInstance(uint32 instanceId, BattlegroundTypeId bgTypeId)
void BuildUpdateWorldStatePacket(WorldPacket *data, uint32 field, uint32 value)
void LoadBattleMastersEntry()
void BuildPlayerJoinedBattlegroundPacket(WorldPacket *data, uint64 guid)
bool CreateBattleground(CreateBattlegroundData &data)
void AddToBGFreeSlotQueue(BattlegroundTypeId bgTypeId, Battleground *bg)
BattlegroundSelectionWeightMap m_BGSelectionWeights
std::vector< ScheduledQueueUpdate > m_QueueUpdateScheduler
std::map< BattlegroundTypeId, uint8 > BattlegroundSelectionWeightMap
void DeleteAllBattlegrounds()
Battleground * GetBattleground(uint32 InstanceID, BattlegroundTypeId bgTypeId)
void RemoveBattleground(BattlegroundTypeId bgTypeId, uint32 instanceId)
uint32 GetMaxRatingDifference() const
BattlegroundTypeId GetRandomBG(BattlegroundTypeId id)
void CreateInitialBattlegrounds()
std::map< BattlegroundTypeId, BattlegroundData > BattlegroundDataContainer
BattlegroundQueue m_BattlegroundQueues[MAX_BATTLEGROUND_QUEUE_TYPES]
static bool IsArenaType(BattlegroundTypeId bgTypeId)
BGFreeSlotQueueContainer & GetBGFreeSlotQueueStore(BattlegroundTypeId bgTypeId)
static BattlegroundQueueTypeId BGQueueTypeId(BattlegroundTypeId bgTypeId, uint8 arenaType)
bool isArenaTesting() const
BattlegroundQueue & GetBattlegroundQueue(BattlegroundQueueTypeId bgQueueTypeId)
void AddBattleground(Battleground *bg)
void BuildBattlegroundStatusPacket(WorldPacket *data, Battleground *bg, Player *player, uint8 queueSlot, uint8 statusId, uint32 time1, uint32 time2, uint8 arenaType)
void ToggleArenaTesting()
static BattlegroundTypeId BGTemplateId(BattlegroundQueueTypeId bgQueueTypeId)
void RemoveFromBGFreeSlotQueue(BattlegroundTypeId bgTypeId, uint32 instanceId)
BattleMastersMap mBattleMastersMap
void ScheduleQueueUpdate(uint32 arenaMatchmakerRating, uint8 arenaType, BattlegroundQueueTypeId bgQueueTypeId, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id)
Battleground * CreateNewBattleground(BattlegroundTypeId bgTypeId, PvPDifficultyEntry const *bracketEntry, uint8 arenaType, bool isRated)
BattlegroundSelectionWeightMap m_ArenaSelectionWeights
void SendToBattleground(Player *player, uint32 InstanceID, BattlegroundTypeId bgTypeId)
void SetHolidayWeekends(uint32 mask)
void BuildPvpLogDataPacket(WorldPacket *data, Battleground *bg)
uint32 GetRatingDiscardTimer() const
static BattlegroundTypeId WeekendHolidayIdToBGType(HolidayIds holiday)
void BuildStatusFailedPacket(WorldPacket *data, Battleground *bg, Player *pPlayer, uint8 QueueSlot, GroupJoinBattlegroundResult result)
static HolidayIds BGTypeToWeekendHolidayId(BattlegroundTypeId bgTypeId)
void BuildBattlegroundListPacket(WorldPacket *data, uint64 guid, Player *player, BattlegroundTypeId bgTypeId)
BattlegroundTypeId GetBattleMasterBG(uint32 entry) const
Battleground * GetBattlegroundTemplate(BattlegroundTypeId bgTypeId)
void BuildPlaySoundPacket(WorldPacket *data, uint32 soundId)
void BuildPlayerLeftBattlegroundPacket(WorldPacket *data, uint64 guid)
uint32 GetPrematureFinishTime() const
uint32 CreateClientVisibleInstanceId(BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id)
uint32 m_NextRatedArenaUpdate
void SendAreaSpiritHealerQueryOpcode(Player *player, Battleground *bg, uint64 guid)
static bool IsBGWeekend(BattlegroundTypeId bgTypeId)
static uint8 BGArenaType(BattlegroundQueueTypeId bgQueueTypeId)
BattlegroundDataContainer bgDataStore
BattlegroundContainer m_Battlegrounds
BattlegroundClientIdsContainer m_ClientBattlegroundIds[MAX_BATTLEGROUND_BRACKETS]
BGFreeSlotQueueContainer BGFreeSlotQueue
BattlegroundQueueTypeId QueueId
bool operator==(ScheduledQueueUpdate const &right) const
BattlegroundTypeId TypeId
BattlegroundBracketId BracketId
BattlegroundTypeId bgTypeId