|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <BattlegroundQueue.h>
Classes | |
| class | SelectionPool |
Public Types | |
| typedef std::deque< GroupQueueInfo * > | GroupsQueueType |
| typedef std::map< uint64, PlayerQueueInfo > | QueuedPlayersMap |
Public Attributes | |
| GroupsQueueType | m_QueuedGroups [MAX_BATTLEGROUND_BRACKETS][BG_QUEUE_GROUP_TYPES_COUNT] |
| QueuedPlayersMap | m_QueuedPlayers |
| SelectionPool | m_SelectionPools [BG_TEAMS_COUNT] |
Private Member Functions | |
| bool | InviteGroupToBG (GroupQueueInfo *ginfo, Battleground *bg, uint32 side) |
Definition at line 55 of file BattlegroundQueue.h.
| typedef std::deque<GroupQueueInfo*> BattlegroundQueue::GroupsQueueType |
Definition at line 79 of file BattlegroundQueue.h.
| typedef std::map<uint64, PlayerQueueInfo> BattlegroundQueue::QueuedPlayersMap |
Definition at line 75 of file BattlegroundQueue.h.
| BattlegroundQueue::BattlegroundQueue | ( | ) |
Definition at line 21 of file BattlegroundQueue.cpp.
References BG_TEAMS_COUNT, COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME, m_SumOfWaitTimes, m_WaitTimeLastPlayer, m_WaitTimes, and MAX_BATTLEGROUND_BRACKETS.
| BattlegroundQueue::~BattlegroundQueue | ( | ) |
Definition at line 35 of file BattlegroundQueue.cpp.
References BG_QUEUE_GROUP_TYPES_COUNT, m_events, m_QueuedGroups, and MAX_BATTLEGROUND_BRACKETS.
| GroupQueueInfo * BattlegroundQueue::AddGroup | ( | Player * | leader, |
| Group * | group, | ||
| BattlegroundTypeId | bgTypeId, | ||
| PvPDifficultyEntry const * | bracketEntry, | ||
| uint8 | ArenaType, | ||
| bool | isRated, | ||
| bool | isPremade, | ||
| uint32 | ArenaRating, | ||
| uint32 | MatchmakerRating ) |
Definition at line 117 of file BattlegroundQueue.cpp.
References GroupQueueInfo::ArenaGroup, GroupQueueInfo::ArenaMatchmakerRating, GroupQueueInfo::ArenaTeamRating, GroupQueueInfo::ArenaType, BG_QUEUE_NORMAL_ALLIANCE, BG_QUEUE_NORMAL_HORDE, BG_TEAMS_COUNT, GroupQueueInfo::BgTypeId, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_ENABLE, CONFIG_BATTLEGROUND_QUEUE_ANNOUNCER_PLAYERONLY, PvPDifficultyEntry::GetBracketId(), Group::GetFirstMember(), Object::GetGUID(), getMSTime(), Player::GetSession(), Player::GetTeam(), PlayerQueueInfo::GroupInfo, HORDE, GroupQueueInfo::IsInvitedToBGInstanceGUID, GroupQueueInfo::IsRated, GroupQueueInfo::JoinTime, LANG_BG_QUEUE_ANNOUNCE_SELF, LANG_BG_QUEUE_ANNOUNCE_WORLD, PlayerQueueInfo::LastOnlineTime, m_QueuedGroups, m_QueuedPlayers, PvPDifficultyEntry::maxLevel, PvPDifficultyEntry::minLevel, GroupReference::next(), GroupQueueInfo::OpponentsMatchmakerRating, GroupQueueInfo::OpponentsTeamRating, GroupQueueInfo::Players, ChatHandler::PSendSysMessage(), GroupQueueInfo::RemoveInviteTime, sBattlegroundMgr, SF_LOG_DEBUG, sWorld, and GroupQueueInfo::Team.
Referenced by CheckNormalMatch(), WorldSession::HandleBattlemasterJoinArena(), and WorldSession::HandleBattlemasterJoinOpcode().
| void BattlegroundQueue::BattlegroundQueueUpdate | ( | uint32 | diff, |
| BattlegroundTypeId | bgTypeId, | ||
| BattlegroundBracketId | bracket_id, | ||
| uint8 | arenaType = 0, | ||
| bool | isRated = false, | ||
| uint32 | minRating = 0 ) |
Definition at line 722 of file BattlegroundQueue.cpp.
References ALLIANCE, GroupQueueInfo::ArenaMatchmakerRating, GroupQueueInfo::ArenaTeamRating, BG_QUEUE_NORMAL_ALLIANCE, BG_QUEUE_NORMAL_HORDE, BG_QUEUE_PREMADE_ALLIANCE, BG_QUEUE_PREMADE_HORDE, BG_TEAMS_COUNT, CheckNormalMatch(), CheckPremadeMatch(), CheckSkirmishForSameFaction(), FillPlayersToBG(), GetBattlegroundBracketById(), Battleground::GetBracketId(), Battleground::GetMapId(), Battleground::GetMaxPlayersPerTeam(), Battleground::GetMinPlayersPerTeam(), getMSTime(), Battleground::GetStatus(), Battleground::GetTypeID(), Battleground::HasFreeSlots(), HORDE, InviteGroupToBG(), Battleground::isArena(), Battleground::isBattleground(), Battleground::isRated(), GroupQueueInfo::JoinTime, m_QueuedGroups, m_SelectionPools, GroupQueueInfo::OpponentsMatchmakerRating, GroupQueueInfo::OpponentsTeamRating, Battleground::RemoveFromBGFreeSlotQueue(), sBattlegroundMgr, Battleground::SetArenaMatchmakerRating(), SF_LOG_DEBUG, SF_LOG_ERROR, Battleground::StartBattleground(), STATUS_WAIT_LEAVE, STATUS_WAIT_QUEUE, GroupQueueInfo::Team, TEAM_ALLIANCE, and TEAM_HORDE.
| bool BattlegroundQueue::CheckNormalMatch | ( | Battleground * | bg_template, |
| BattlegroundBracketId | bracket_id, | ||
| uint32 | minPlayers, | ||
| uint32 | maxPlayers ) |
Definition at line 609 of file BattlegroundQueue.cpp.
References AddGroup(), BG_QUEUE_NORMAL_ALLIANCE, BG_TEAMS_COUNT, CONFIG_BATTLEGROUND_INVITATION_TYPE, m_QueuedGroups, m_SelectionPools, sBattlegroundMgr, sWorld, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by BattlegroundQueueUpdate().
| bool BattlegroundQueue::CheckPremadeMatch | ( | BattlegroundBracketId | bracket_id, |
| uint32 | MinPlayersPerTeam, | ||
| uint32 | MaxPlayersPerTeam ) |
Definition at line 550 of file BattlegroundQueue.cpp.
References BG_QUEUE_NORMAL_ALLIANCE, BG_QUEUE_PREMADE_ALLIANCE, BG_QUEUE_PREMADE_HORDE, BG_TEAMS_COUNT, CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH, getMSTime(), m_QueuedGroups, m_SelectionPools, sWorld, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by BattlegroundQueueUpdate().
| bool BattlegroundQueue::CheckSkirmishForSameFaction | ( | BattlegroundBracketId | bracket_id, |
| uint32 | minPlayersPerTeam ) |
Definition at line 653 of file BattlegroundQueue.cpp.
References ALLIANCE, BG_QUEUE_NORMAL_ALLIANCE, HORDE, m_QueuedGroups, m_SelectionPools, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by BattlegroundQueueUpdate().
| void BattlegroundQueue::FillPlayersToBG | ( | Battleground * | bg, |
| BattlegroundBracketId | bracket_id ) |
Definition at line 471 of file BattlegroundQueue.cpp.
References ALLIANCE, BG_QUEUE_NORMAL_ALLIANCE, BG_QUEUE_NORMAL_HORDE, CONFIG_BATTLEGROUND_INVITATION_TYPE, Battleground::GetFreeSlotsForTeam(), HORDE, m_QueuedGroups, m_SelectionPools, sWorld, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by BattlegroundQueueUpdate().
| uint32 BattlegroundQueue::GetAverageQueueWaitTime | ( | GroupQueueInfo * | ginfo, |
| BattlegroundBracketId | bracket_id ) const |
Definition at line 243 of file BattlegroundQueue.cpp.
References GroupQueueInfo::ArenaType, COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME, HORDE, GroupQueueInfo::IsRated, m_SumOfWaitTimes, m_WaitTimes, GroupQueueInfo::Team, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by WorldSession::HandleBattlefieldStatusOpcode(), WorldSession::HandleBattlemasterJoinArena(), and WorldSession::HandleBattlemasterJoinOpcode().
| bool BattlegroundQueue::GetPlayerGroupInfoData | ( | uint64 | guid, |
| GroupQueueInfo * | ginfo ) |
Definition at line 393 of file BattlegroundQueue.cpp.
References m_QueuedPlayers.
Referenced by WorldSession::HandleBattleFieldPortOpcode(), and WorldSession::HandleBattlefieldStatusOpcode().
Definition at line 402 of file BattlegroundQueue.cpp.
References m_SelectionPools.
|
private |
Definition at line 407 of file BattlegroundQueue.cpp.
References GroupQueueInfo::ArenaType, BattlegroundMgr::BGQueueTypeId(), ObjectAccessor::FindPlayer(), Battleground::GetArenaType(), Player::GetBattlegroundQueueIndex(), Player::GetBattlegroundQueueJoinTime(), Battleground::GetBracketId(), Object::GetGUID(), Object::GetGUIDLow(), Battleground::GetInstanceID(), getMSTime(), WorldObject::GetName(), Player::GetSession(), Battleground::GetTypeID(), Battleground::IncreaseInvitedCount(), INVITATION_REMIND_TIME, INVITE_ACCEPT_WAIT_TIME, GroupQueueInfo::IsInvitedToBGInstanceGUID, m_events, PlayerInvitedToBGUpdateAverageWaitTime(), GroupQueueInfo::Players, GroupQueueInfo::RemoveInviteTime, sBattlegroundMgr, WorldSession::SendPacket(), Player::SetInviteForBattlegroundQueueType(), SF_LOG_DEBUG, STATUS_WAIT_JOIN, and GroupQueueInfo::Team.
Referenced by BattlegroundQueueUpdate().
| bool BattlegroundQueue::IsPlayerInvited | ( | uint64 | pl_guid, |
| const uint32 | bgInstanceGuid, | ||
| const uint32 | removeTime ) |
Definition at line 385 of file BattlegroundQueue.cpp.
References m_QueuedPlayers.
Referenced by BGQueueInviteEvent::Execute(), and BGQueueRemoveEvent::Execute().
| void BattlegroundQueue::PlayerInvitedToBGUpdateAverageWaitTime | ( | GroupQueueInfo * | ginfo, |
| BattlegroundBracketId | bracket_id ) |
Definition at line 214 of file BattlegroundQueue.cpp.
References GroupQueueInfo::ArenaType, COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME, getMSTime(), getMSTimeDiff(), HORDE, GroupQueueInfo::IsRated, GroupQueueInfo::JoinTime, m_SumOfWaitTimes, m_WaitTimeLastPlayer, m_WaitTimes, GroupQueueInfo::Team, TEAM_ALLIANCE, and TEAM_HORDE.
Referenced by InviteGroupToBG().
| void BattlegroundQueue::RemovePlayer | ( | uint64 | guid, |
| bool | decreaseInvitedCount ) |
Definition at line 266 of file BattlegroundQueue.cpp.
References GroupQueueInfo::ArenaType, BG_QUEUE_GROUP_TYPES_COUNT, BG_QUEUE_PREMADE_ALLIANCE, BG_QUEUE_PREMADE_HORDE, BG_TEAMS_COUNT, BattlegroundMgr::BGQueueTypeId(), GroupQueueInfo::BgTypeId, ObjectAccessor::FindPlayer(), GUID_LOPART(), HORDE, GroupQueueInfo::IsInvitedToBGInstanceGUID, GroupQueueInfo::IsRated, m_QueuedGroups, m_QueuedPlayers, MAX_BATTLEGROUND_BRACKETS, GroupQueueInfo::Players, RemovePlayer(), sBattlegroundMgr, SF_LOG_DEBUG, SF_LOG_ERROR, STATUS_NONE, and GroupQueueInfo::Team.
Referenced by BGQueueRemoveEvent::Execute(), WorldSession::HandleBattleFieldPortOpcode(), WorldSession::LogoutPlayer(), and RemovePlayer().
| void BattlegroundQueue::UpdateEvents | ( | uint32 | diff | ) |
Definition at line 712 of file BattlegroundQueue.cpp.
References m_events.
|
private |
Definition at line 118 of file BattlegroundQueue.h.
Referenced by InviteGroupToBG(), UpdateEvents(), and ~BattlegroundQueue().
| GroupsQueueType BattlegroundQueue::m_QueuedGroups[MAX_BATTLEGROUND_BRACKETS][BG_QUEUE_GROUP_TYPES_COUNT] |
Definition at line 90 of file BattlegroundQueue.h.
Referenced by AddGroup(), BattlegroundQueueUpdate(), CheckNormalMatch(), CheckPremadeMatch(), CheckSkirmishForSameFaction(), FillPlayersToBG(), RemovePlayer(), and ~BattlegroundQueue().
| QueuedPlayersMap BattlegroundQueue::m_QueuedPlayers |
Definition at line 76 of file BattlegroundQueue.h.
Referenced by AddGroup(), GetPlayerGroupInfoData(), IsPlayerInvited(), and RemovePlayer().
| SelectionPool BattlegroundQueue::m_SelectionPools[BG_TEAMS_COUNT] |
Definition at line 108 of file BattlegroundQueue.h.
Referenced by BattlegroundQueueUpdate(), CheckNormalMatch(), CheckPremadeMatch(), CheckSkirmishForSameFaction(), FillPlayersToBG(), and GetPlayersInQueue().
|
private |
Definition at line 115 of file BattlegroundQueue.h.
Referenced by BattlegroundQueue(), GetAverageQueueWaitTime(), and PlayerInvitedToBGUpdateAverageWaitTime().
|
private |
Definition at line 114 of file BattlegroundQueue.h.
Referenced by BattlegroundQueue(), and PlayerInvitedToBGUpdateAverageWaitTime().
|
private |
Definition at line 113 of file BattlegroundQueue.h.
Referenced by BattlegroundQueue(), GetAverageQueueWaitTime(), and PlayerInvitedToBGUpdateAverageWaitTime().