782 for (BGFreeSlotQueueContainer::iterator itr = bgQueues.begin(); itr != bgQueues.end();)
813 TC_LOG_ERROR(
"bg.battleground",
"Battleground: Update: bg template not found for %u", bgTypeId);
820 TC_LOG_ERROR(
"bg.battleground",
"Battleground: Update: bg bracket entry not found for map %u bracket id %u", bg_template->
GetMapId(), bracket_id);
830 MaxPlayersPerTeam = arenaType;
834 MinPlayersPerTeam = 1;
847 TC_LOG_ERROR(
"bg.battleground",
"BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
866 if (
CheckNormalMatch(bg_template, bracket_id, MinPlayersPerTeam, MaxPlayersPerTeam)
873 TC_LOG_ERROR(
"bg.battleground",
"BattlegroundQueue::Update - Cannot create battleground: %u", bgTypeId);
885 else if (bg_template->
isArena())
904 if (front1 && front2)
909 else if (!front1 && !front2)
931 GroupsQueueType::iterator itr2 =
m_QueuedGroups[bracket_id][i].begin();
935 if (!(*itr2)->IsInvitedToBGInstanceGUID
936 && (((*itr2)->ArenaMatchmakerRating >= arenaMinRating && (*itr2)->ArenaMatchmakerRating <= arenaMaxRating)
937 || (
int32)(*itr2)->JoinTime < discardTime))
939 itr_teams[found++] = itr2;
951 for (GroupsQueueType::iterator itr3 = itr_teams[0]; itr3 !=
m_QueuedGroups[bracket_id][team].end(); ++itr3)
953 if (!(*itr3)->IsInvitedToBGInstanceGUID
954 && (((*itr3)->ArenaMatchmakerRating >= arenaMinRating && (*itr3)->ArenaMatchmakerRating <= arenaMaxRating)
955 || (
int32)(*itr3)->JoinTime < discardTime)
956 && (*itr_teams[0])->ArenaTeamId != (*itr3)->ArenaTeamId)
958 itr_teams[found++] = itr3;
972 TC_LOG_ERROR(
"bg.battleground",
"BattlegroundQueue::Update couldn't create arena instance for rated arena match!");
1000 TC_LOG_DEBUG(
"bg.battleground",
"Starting rated arena match!");
SelectionPool m_SelectionPools[BG_TEAMS_COUNT]
Definition: BattlegroundQueue.h:128
uint32 GetMinPlayersPerTeam() const
Definition: Battleground.h:278
uint32 ArenaTeamRating
Definition: BattlegroundQueue.h:52
uint32 OpponentsMatchmakerRating
Definition: BattlegroundQueue.h:55
PvPDifficultyEntry const * GetBattlegroundBracketById(uint32 mapid, BattlegroundBracketId id)
Definition: DBCStores.cpp:784
std::list< Battleground * > BGFreeSlotQueueContainer
Definition: BattlegroundQueue.h:30
void FillPlayersToBG(Battleground *bg, BattlegroundBracketId bracket_id)
Definition: BattlegroundQueue.cpp:496
BattlegroundStatus GetStatus() const
Definition: Battleground.h:266
uint32 getMSTime()
Definition: Timer.h:24
void SetArenaMatchmakerRating(uint32 Team, uint32 MMR)
Definition: Battleground.h:416
arena_t NULL
Definition: jemalloc_internal.h:624
uint32 Team
Definition: BattlegroundQueue.h:44
void Init()
Definition: BattlegroundQueue.cpp:66
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
Definition: Battleground.h:157
#define BG_TEAMS_COUNT
Definition: SharedDefines.h:4555
bool CheckPremadeMatch(BattlegroundBracketId bracket_id, uint32 MinPlayersPerTeam, uint32 MaxPlayersPerTeam)
Definition: BattlegroundQueue.cpp:601
Definition: SharedDefines.h:1000
bool isRated() const
Definition: Battleground.h:328
bool isArena() const
Definition: Battleground.h:326
Definition: BattlegroundQueue.h:60
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
Definition: BattlegroundQueue.h:63
Definition: SharedDefines.h:992
Definition: BattlegroundQueue.h:61
bool isBattleground() const
Definition: Battleground.h:327
uint32 JoinTime
Definition: BattlegroundQueue.h:49
void RemoveFromBGFreeSlotQueue()
Definition: Battleground.cpp:1241
Definition: BattlegroundQueue.h:62
Definition: BattlegroundQueue.h:41
uint32 OpponentsTeamRating
Definition: BattlegroundQueue.h:54
Definition: SharedDefines.h:999
BattlegroundBracketId GetBracketId() const
Definition: Battleground.h:264
uint32 ArenaMatchmakerRating
Definition: BattlegroundQueue.h:53
bool CheckSkirmishForSameFaction(BattlegroundBracketId bracket_id, uint32 minPlayersPerTeam)
Definition: BattlegroundQueue.cpp:702
Definition: DBCStructure.h:926
uint32 GetMaxPlayersPerTeam() const
Definition: Battleground.h:277
Definition: Battleground.h:160
GroupsQueueType m_QueuedGroups[MAX_BATTLEGROUND_BRACKETS][BG_QUEUE_GROUP_TYPES_COUNT]
Definition: BattlegroundQueue.h:110
bool HasFreeSlots() const
Definition: Battleground.cpp:1317
#define sBattlegroundMgr
Definition: BattlegroundMgr.h:181
GroupsQueueType SelectedGroups
Definition: BattlegroundQueue.h:122
uint32 ArenaTeamId
Definition: BattlegroundQueue.h:48
uint8_t uint8
Definition: Define.h:152
BattlegroundTypeId GetTypeID(bool GetRandom=false) const
Definition: Battleground.h:263
uint32 GetMapId() const
Definition: Battleground.h:352
bool InviteGroupToBG(GroupQueueInfo *ginfo, Battleground *bg, uint32 side)
Definition: BattlegroundQueue.cpp:428
void StartBattleground()
Definition: Battleground.cpp:1063
Definition: Battleground.h:235
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
bool CheckNormalMatch(Battleground *bg_template, BattlegroundBracketId bracket_id, uint32 minPlayers, uint32 maxPlayers)
Definition: BattlegroundQueue.cpp:659
Definition: SharedDefines.h:993