![]() |
TrinityCore
|
#include <BattlegroundQueue.h>
Classes | |
| class | SelectionPool |
Public Types | |
| typedef std::map< ObjectGuid, PlayerQueueInfo > | QueuedPlayersMap |
| typedef std::list< GroupQueueInfo * > | GroupsQueueType |
Public Attributes | |
| QueuedPlayersMap | m_QueuedPlayers |
| GroupsQueueType | m_QueuedGroups [BG_QUEUE_GROUP_TYPES_COUNT] |
| SelectionPool | m_SelectionPools [PVP_TEAMS_COUNT] |
Private Member Functions | |
| bool | InviteGroupToBG (GroupQueueInfo *ginfo, Battleground *bg, Team side) |
Definition at line 71 of file BattlegroundQueue.h.
| typedef std::list<GroupQueueInfo*> BattlegroundQueue::GroupsQueueType |
Definition at line 95 of file BattlegroundQueue.h.
| typedef std::map<ObjectGuid, PlayerQueueInfo> BattlegroundQueue::QueuedPlayersMap |
Definition at line 91 of file BattlegroundQueue.h.
| BattlegroundQueue::BattlegroundQueue | ( | BattlegroundQueueTypeId | queueId | ) |
Definition at line 38 of file BattlegroundQueue.cpp.
References COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME, m_SumOfWaitTimes, m_WaitTimeLastPlayer, m_WaitTimes, and PVP_TEAMS_COUNT.
| BattlegroundQueue::~BattlegroundQueue | ( | ) |
Definition at line 49 of file BattlegroundQueue.cpp.
References BG_QUEUE_GROUP_TYPES_COUNT, EventProcessor::KillAllEvents(), m_events, and m_QueuedGroups.
| GroupQueueInfo * BattlegroundQueue::AddGroup | ( | Player * | leader, |
| Group const * | group, | ||
| PvPDifficultyEntry const * | bracketEntry, | ||
| bool | isRated, | ||
| bool | isPremade, | ||
| uint32 | ArenaRating, | ||
| uint32 | MatchmakerRating, | ||
| uint32 | ArenaTeamId = 0, |
||
| uint32 | OpponentsArenaTeamId = 0 |
||
| ) |
Definition at line 126 of file BattlegroundQueue.cpp.
References GroupQueueInfo::ArenaMatchmakerRating, GroupQueueInfo::ArenaTeamId, GroupQueueInfo::ArenaTeamRating, BattlegroundQueueTypeId::BattlemasterListId, BG_QUEUE_NORMAL_ALLIANCE, BG_QUEUE_NORMAL_HORDE, BattlegroundQueueTypeId::BracketId, CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY, Group::GetFirstMember(), GameTime::GetGameTimeMS(), Object::GetGUID(), ArenaTeam::GetName(), Player::GetSession(), Player::GetTeam(), PlayerQueueInfo::GroupInfo, HORDE, GroupQueueInfo::IsInvitedToBGInstanceGUID, GroupQueueInfo::IsRated, GroupQueueInfo::JoinTime, LANG_ARENA_QUEUE_ANNOUNCE_WORLD_JOIN, LANG_BG_QUEUE_ANNOUNCE_SELF, LANG_BG_QUEUE_ANNOUNCE_WORLD, PlayerQueueInfo::LastOnlineTime, m_QueuedGroups, m_QueuedPlayers, m_queueId, PvPDifficultyEntry::MaxLevel, PvPDifficultyEntry::MinLevel, GroupQueueInfo::OpponentsMatchmakerRating, GroupQueueInfo::OpponentsTeamRating, GroupQueueInfo::Players, GroupQueueInfo::PreviousOpponentsTeamId, ChatHandler::PSendSysMessage(), PVP_TEAMS_COUNT, GroupQueueInfo::RemoveInviteTime, sArenaTeamMgr, sBattlegroundMgr, sWorld, TC_LOG_DEBUG, GroupQueueInfo::Team, and BattlegroundQueueTypeId::TeamSize.
Referenced by CheckNormalMatch(), WorldSession::HandleBattlemasterJoinArena(), and WorldSession::HandleBattlemasterJoinOpcode().
| void BattlegroundQueue::BattlegroundQueueUpdate | ( | uint32 | diff, |
| bool | isRated = false, |
||
| uint32 | minRating = 0 |
||
| ) |
Definition at line 759 of file BattlegroundQueue.cpp.
References ALLIANCE, GroupQueueInfo::ArenaMatchmakerRating, GroupQueueInfo::ArenaTeamId, GroupQueueInfo::ArenaTeamRating, BattlegroundQueueTypeId::BattlemasterListId, BG_QUEUE_NORMAL_ALLIANCE, BG_QUEUE_NORMAL_HORDE, BG_QUEUE_PREMADE_ALLIANCE, BG_QUEUE_PREMADE_HORDE, BattlegroundQueueTypeId::BracketId, CheckNormalMatch(), CheckPremadeMatch(), CheckSkirmishForSameFaction(), CONFIG_ARENA_PREV_OPPONENTS_DISCARD_TIMER, FillPlayersToBG(), GetBattlegroundBracketById(), Battleground::GetBracketId(), GameTime::GetGameTimeMS(), Battleground::GetMapId(), Battleground::GetMaxPlayersPerTeam(), Battleground::GetMinPlayersPerTeam(), Battleground::GetStatus(), Battleground::GetTypeID(), Battleground::HasFreeSlots(), HORDE, BattlegroundQueue::SelectionPool::Init(), InviteGroupToBG(), Battleground::isArena(), Battleground::isBattleground(), Battleground::isRated(), GroupQueueInfo::JoinTime, m_QueuedGroups, m_queueId, m_SelectionPools, GroupQueueInfo::OpponentsMatchmakerRating, GroupQueueInfo::OpponentsTeamRating, PVP_TEAMS_COUNT, Battleground::RemoveFromBGFreeSlotQueue(), sBattlegroundMgr, BattlegroundQueue::SelectionPool::SelectedGroups, Battleground::SetArenaMatchmakerRating(), Battleground::StartBattleground(), STATUS_WAIT_LEAVE, STATUS_WAIT_QUEUE, sWorld, TC_LOG_DEBUG, TC_LOG_ERROR, GroupQueueInfo::Team, TEAM_ALLIANCE, TEAM_HORDE, and BattlegroundQueueTypeId::TeamSize.
Referenced by BattlegroundMgr::Update().
| bool BattlegroundQueue::CheckNormalMatch | ( | Battleground * | bg_template, |
| uint32 | minPlayers, | ||
| uint32 | maxPlayers | ||
| ) |
Definition at line 648 of file BattlegroundQueue.cpp.
References BattlegroundQueue::SelectionPool::AddGroup(), AddGroup(), BG_QUEUE_INVITATION_TYPE_NO_BALANCE, BG_QUEUE_NORMAL_ALLIANCE, CONFIG_BATTLEGROUND_INVITATION_TYPE, BattlegroundQueue::SelectionPool::GetPlayerCount(), Battleground::isBattleground(), m_QueuedGroups, m_SelectionPools, PVP_TEAMS_COUNT, sBattlegroundMgr, sWorld, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by BattlegroundQueueUpdate().
Definition at line 590 of file BattlegroundQueue.cpp.
References BattlegroundQueue::SelectionPool::AddGroup(), BG_QUEUE_NORMAL_ALLIANCE, BG_QUEUE_PREMADE_ALLIANCE, BG_QUEUE_PREMADE_HORDE, CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH, GameTime::GetGameTimeMS(), m_QueuedGroups, m_SelectionPools, PVP_TEAMS_COUNT, sWorld, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by BattlegroundQueueUpdate().
| bool BattlegroundQueue::CheckSkirmishForSameFaction | ( | uint32 | minPlayersPerTeam | ) |
Definition at line 691 of file BattlegroundQueue.cpp.
References BattlegroundQueue::SelectionPool::AddGroup(), ALLIANCE, BG_QUEUE_NORMAL_ALLIANCE, HORDE, BattlegroundQueue::SelectionPool::Init(), m_QueuedGroups, m_SelectionPools, BattlegroundQueue::SelectionPool::SelectedGroups, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by BattlegroundQueueUpdate().
| void BattlegroundQueue::FillPlayersToBG | ( | Battleground * | bg | ) |
Definition at line 485 of file BattlegroundQueue.cpp.
References BattlegroundQueue::SelectionPool::AddGroup(), ALLIANCE, BG_QUEUE_INVITATION_TYPE_EVEN, BG_QUEUE_INVITATION_TYPE_NO_BALANCE, BG_QUEUE_NORMAL_ALLIANCE, BG_QUEUE_NORMAL_HORDE, CONFIG_BATTLEGROUND_INVITATION_TYPE, Battleground::GetFreeSlotsForTeam(), HORDE, BattlegroundQueue::SelectionPool::KickGroup(), m_QueuedGroups, m_SelectionPools, sWorld, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by BattlegroundQueueUpdate().
| uint32 BattlegroundQueue::GetAverageQueueWaitTime | ( | GroupQueueInfo * | ginfo | ) | const |
Definition at line 255 of file BattlegroundQueue.cpp.
References COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME, HORDE, GroupQueueInfo::IsRated, m_queueId, m_SumOfWaitTimes, m_WaitTimes, GroupQueueInfo::Team, TEAM_ALLIANCE, TEAM_HORDE, and BattlegroundQueueTypeId::TeamSize.
Referenced by WorldSession::HandleBattlemasterJoinArena(), WorldSession::HandleBattlemasterJoinOpcode(), and WorldSession::HandleRequestBattlefieldStatusOpcode().
| bool BattlegroundQueue::GetPlayerGroupInfoData | ( | ObjectGuid | guid, |
| GroupQueueInfo * | ginfo | ||
| ) |
Definition at line 404 of file BattlegroundQueue.cpp.
References m_QueuedPlayers.
Referenced by ArenaTeam::DelMember(), WorldSession::HandleArenaTeamDisbandOpcode(), WorldSession::HandleArenaTeamLeaveOpcode(), WorldSession::HandleArenaTeamRemoveOpcode(), WorldSession::HandleBattleFieldPortOpcode(), and WorldSession::HandleRequestBattlefieldStatusOpcode().
Definition at line 413 of file BattlegroundQueue.cpp.
References BattlegroundQueue::SelectionPool::GetPlayerCount(), and m_SelectionPools.
|
inline |
Definition at line 127 of file BattlegroundQueue.h.
Referenced by WorldSession::HandleBattleFieldPortOpcode().
|
private |
Definition at line 418 of file BattlegroundQueue.cpp.
References EventProcessor::AddEvent(), GroupQueueInfo::ArenaTeamId, BattlegroundQueueTypeId::BattlemasterListId, BattlegroundMgr::BuildBattlegroundStatusNeedConfirmation(), EventProcessor::CalculateTime(), ObjectAccessor::FindConnectedPlayer(), Player::GetBattlegroundQueueIndex(), GameTime::GetGameTimeMS(), Object::GetGUID(), Battleground::GetInstanceID(), WorldObject::GetName(), Battleground::GetTypeID(), Battleground::IncreaseInvitedCount(), INVITATION_REMIND_TIME, INVITE_ACCEPT_WAIT_TIME, Battleground::isArena(), GroupQueueInfo::IsInvitedToBGInstanceGUID, Battleground::isRated(), m_events, m_queueId, PlayerInvitedToBGUpdateAverageWaitTime(), GroupQueueInfo::Players, GroupQueueInfo::RemoveInviteTime, Player::SendDirectMessage(), Battleground::SetArenaTeamIdForTeam(), Player::SetInviteForBattlegroundQueueType(), TC_LOG_DEBUG, GroupQueueInfo::Team, ObjectGuid::ToString(), and WorldPackets::Battleground::BattlefieldStatusNeedConfirmation::Write().
Referenced by BattlegroundQueueUpdate().
| bool BattlegroundQueue::IsPlayerInvited | ( | ObjectGuid | pl_guid, |
| const uint32 | bgInstanceGuid, | ||
| const uint32 | removeTime | ||
| ) |
Definition at line 396 of file BattlegroundQueue.cpp.
References m_QueuedPlayers.
Referenced by BGQueueInviteEvent::Execute(), and BGQueueRemoveEvent::Execute().
| void BattlegroundQueue::PlayerInvitedToBGUpdateAverageWaitTime | ( | GroupQueueInfo * | ginfo | ) |
Definition at line 227 of file BattlegroundQueue.cpp.
References COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME, GameTime::GetGameTimeMS(), getMSTimeDiff(), HORDE, GroupQueueInfo::IsRated, GroupQueueInfo::JoinTime, m_queueId, m_SumOfWaitTimes, m_WaitTimeLastPlayer, m_WaitTimes, GroupQueueInfo::Team, TEAM_ALLIANCE, TEAM_HORDE, and BattlegroundQueueTypeId::TeamSize.
Referenced by InviteGroupToBG().
| void BattlegroundQueue::RemovePlayer | ( | ObjectGuid | guid, |
| bool | decreaseInvitedCount | ||
| ) |
Definition at line 277 of file BattlegroundQueue.cpp.
References GroupQueueInfo::ArenaTeamId, GroupQueueInfo::ArenaTeamRating, BattlegroundQueueTypeId::BattlemasterListId, BG_QUEUE_GROUP_TYPES_COUNT, BG_QUEUE_PREMADE_ALLIANCE, BG_QUEUE_PREMADE_HORDE, BattlegroundQueueTypeId::BracketId, BattlegroundMgr::BuildBattlegroundStatusNone(), CONFIG_ARENA_QUEUE_ANNOUNCER_ENABLE, ObjectAccessor::FindConnectedPlayer(), ObjectAccessor::FindPlayer(), HORDE, GroupQueueInfo::IsInvitedToBGInstanceGUID, GroupQueueInfo::IsRated, LANG_ARENA_QUEUE_ANNOUNCE_WORLD_EXIT, m_QueuedGroups, m_QueuedPlayers, m_queueId, GroupQueueInfo::OpponentsMatchmakerRating, GroupQueueInfo::OpponentsTeamRating, GroupQueueInfo::Players, PVP_TEAMS_COUNT, RemovePlayer(), sArenaTeamMgr, sBattlegroundMgr, sWorld, TC_LOG_DEBUG, TC_LOG_ERROR, GroupQueueInfo::Team, BattlegroundQueueTypeId::TeamSize, ObjectGuid::ToString(), and WorldPackets::Battleground::BattlefieldStatusNone::Write().
Referenced by ArenaTeam::DelMember(), BGQueueRemoveEvent::Execute(), WorldSession::HandleBattleFieldPortOpcode(), WorldSession::LogoutPlayer(), and RemovePlayer().
| void BattlegroundQueue::UpdateEvents | ( | uint32 | diff | ) |
Definition at line 749 of file BattlegroundQueue.cpp.
References m_events, and EventProcessor::Update().
|
private |
Definition at line 138 of file BattlegroundQueue.h.
Referenced by InviteGroupToBG(), UpdateEvents(), and ~BattlegroundQueue().
| GroupsQueueType BattlegroundQueue::m_QueuedGroups[BG_QUEUE_GROUP_TYPES_COUNT] |
Definition at line 106 of file BattlegroundQueue.h.
Referenced by AddGroup(), BattlegroundQueueUpdate(), CheckNormalMatch(), CheckPremadeMatch(), CheckSkirmishForSameFaction(), FillPlayersToBG(), RemovePlayer(), and ~BattlegroundQueue().
| QueuedPlayersMap BattlegroundQueue::m_QueuedPlayers |
Definition at line 92 of file BattlegroundQueue.h.
Referenced by AddGroup(), GetPlayerGroupInfoData(), IsPlayerInvited(), and RemovePlayer().
|
private |
Definition at line 130 of file BattlegroundQueue.h.
Referenced by AddGroup(), BattlegroundQueueUpdate(), GetAverageQueueWaitTime(), InviteGroupToBG(), PlayerInvitedToBGUpdateAverageWaitTime(), and RemovePlayer().
| SelectionPool BattlegroundQueue::m_SelectionPools[PVP_TEAMS_COUNT] |
Definition at line 124 of file BattlegroundQueue.h.
Referenced by BattlegroundQueueUpdate(), CheckNormalMatch(), CheckPremadeMatch(), CheckSkirmishForSameFaction(), FillPlayersToBG(), and GetPlayersInQueue().
|
private |
Definition at line 135 of file BattlegroundQueue.h.
Referenced by BattlegroundQueue(), GetAverageQueueWaitTime(), and PlayerInvitedToBGUpdateAverageWaitTime().
|
private |
Definition at line 134 of file BattlegroundQueue.h.
Referenced by BattlegroundQueue(), and PlayerInvitedToBGUpdateAverageWaitTime().
|
private |
Definition at line 133 of file BattlegroundQueue.h.
Referenced by BattlegroundQueue(), GetAverageQueueWaitTime(), and PlayerInvitedToBGUpdateAverageWaitTime().