TrinityCore
BattlegroundQueue Class Reference

#include <BattlegroundQueue.h>

Classes

class  SelectionPool
 

Public Types

typedef std::map< ObjectGuid, PlayerQueueInfoQueuedPlayersMap
 
typedef std::list< GroupQueueInfo * > GroupsQueueType
 

Public Member Functions

 BattlegroundQueue (BattlegroundQueueTypeId queueId)
 
 ~BattlegroundQueue ()
 
void BattlegroundQueueUpdate (uint32 diff, BattlegroundBracketId bracket_id, uint32 minRating=0)
 
void UpdateEvents (uint32 diff)
 
void FillPlayersToBG (Battleground *bg, BattlegroundBracketId bracket_id)
 
bool CheckPremadeMatch (BattlegroundBracketId bracket_id, uint32 MinPlayersPerTeam, uint32 MaxPlayersPerTeam)
 
bool CheckNormalMatch (BattlegroundBracketId bracket_id, uint32 minPlayers, uint32 maxPlayers)
 
bool CheckSkirmishForSameFaction (BattlegroundBracketId bracket_id, uint32 minPlayersPerTeam)
 
GroupQueueInfoAddGroup (Player const *leader, Group const *group, Team team, PVPDifficultyEntry const *bracketEntry, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 ArenaTeamId=0)
 
void RemovePlayer (ObjectGuid guid, bool decreaseInvitedCount)
 
bool IsPlayerInvited (ObjectGuid pl_guid, const uint32 bgInstanceGuid, const uint32 removeTime)
 
bool GetPlayerGroupInfoData (ObjectGuid guid, GroupQueueInfo *ginfo)
 
void PlayerInvitedToBGUpdateAverageWaitTime (GroupQueueInfo *ginfo, BattlegroundBracketId bracket_id)
 
uint32 GetAverageQueueWaitTime (GroupQueueInfo *ginfo, BattlegroundBracketId bracket_id) const
 
uint32 GetPlayersInQueue (TeamId id)
 
BattlegroundQueueTypeId const GetQueueId () const
 

Public Attributes

QueuedPlayersMap m_QueuedPlayers
 
GroupsQueueType m_QueuedGroups [MAX_BATTLEGROUND_BRACKETS][BG_QUEUE_GROUP_TYPES_COUNT]
 
SelectionPool m_SelectionPools [PVP_TEAMS_COUNT]
 

Private Member Functions

bool InviteGroupToBG (GroupQueueInfo *ginfo, Battleground *bg, Team side)
 

Private Attributes

BattlegroundQueueTypeId m_queueId
 
uint32 m_WaitTimes [PVP_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS][COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME]
 
uint32 m_WaitTimeLastPlayer [PVP_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS]
 
uint32 m_SumOfWaitTimes [PVP_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS]
 
EventProcessor m_events
 

Detailed Description

Definition at line 69 of file BattlegroundQueue.h.

Member Typedef Documentation

◆ GroupsQueueType

Definition at line 93 of file BattlegroundQueue.h.

◆ QueuedPlayersMap

Constructor & Destructor Documentation

◆ BattlegroundQueue()

BattlegroundQueue::BattlegroundQueue ( BattlegroundQueueTypeId  queueId)

Definition at line 37 of file BattlegroundQueue.cpp.

◆ ~BattlegroundQueue()

BattlegroundQueue::~BattlegroundQueue ( )

Definition at line 51 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddGroup()

GroupQueueInfo * BattlegroundQueue::AddGroup ( Player const *  leader,
Group const *  group,
Team  team,
PVPDifficultyEntry const *  bracketEntry,
bool  isPremade,
uint32  ArenaRating,
uint32  MatchmakerRating,
uint32  ArenaTeamId = 0 
)

Definition at line 133 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ BattlegroundQueueUpdate()

void BattlegroundQueue::BattlegroundQueueUpdate ( uint32  diff,
BattlegroundBracketId  bracket_id,
uint32  minRating = 0 
)

Definition at line 768 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckNormalMatch()

bool BattlegroundQueue::CheckNormalMatch ( BattlegroundBracketId  bracket_id,
uint32  minPlayers,
uint32  maxPlayers 
)

Definition at line 657 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckPremadeMatch()

bool BattlegroundQueue::CheckPremadeMatch ( BattlegroundBracketId  bracket_id,
uint32  MinPlayersPerTeam,
uint32  MaxPlayersPerTeam 
)

Definition at line 599 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ CheckSkirmishForSameFaction()

bool BattlegroundQueue::CheckSkirmishForSameFaction ( BattlegroundBracketId  bracket_id,
uint32  minPlayersPerTeam 
)

Definition at line 700 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ FillPlayersToBG()

void BattlegroundQueue::FillPlayersToBG ( Battleground bg,
BattlegroundBracketId  bracket_id 
)

Definition at line 494 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ GetAverageQueueWaitTime()

uint32 BattlegroundQueue::GetAverageQueueWaitTime ( GroupQueueInfo ginfo,
BattlegroundBracketId  bracket_id 
) const

Definition at line 262 of file BattlegroundQueue.cpp.

+ Here is the caller graph for this function:

◆ GetPlayerGroupInfoData()

bool BattlegroundQueue::GetPlayerGroupInfoData ( ObjectGuid  guid,
GroupQueueInfo ginfo 
)

Definition at line 414 of file BattlegroundQueue.cpp.

+ Here is the caller graph for this function:

◆ GetPlayersInQueue()

uint32 BattlegroundQueue::GetPlayersInQueue ( TeamId  id)

Definition at line 423 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:

◆ GetQueueId()

BattlegroundQueueTypeId const BattlegroundQueue::GetQueueId ( ) const
inline

Definition at line 125 of file BattlegroundQueue.h.

+ Here is the caller graph for this function:

◆ InviteGroupToBG()

bool BattlegroundQueue::InviteGroupToBG ( GroupQueueInfo ginfo,
Battleground bg,
Team  side 
)
private

Definition at line 428 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ IsPlayerInvited()

bool BattlegroundQueue::IsPlayerInvited ( ObjectGuid  pl_guid,
const uint32  bgInstanceGuid,
const uint32  removeTime 
)

Definition at line 406 of file BattlegroundQueue.cpp.

+ Here is the caller graph for this function:

◆ PlayerInvitedToBGUpdateAverageWaitTime()

void BattlegroundQueue::PlayerInvitedToBGUpdateAverageWaitTime ( GroupQueueInfo ginfo,
BattlegroundBracketId  bracket_id 
)

Definition at line 234 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RemovePlayer()

void BattlegroundQueue::RemovePlayer ( ObjectGuid  guid,
bool  decreaseInvitedCount 
)

Definition at line 284 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ UpdateEvents()

void BattlegroundQueue::UpdateEvents ( uint32  diff)

Definition at line 758 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_events

EventProcessor BattlegroundQueue::m_events
private

Definition at line 136 of file BattlegroundQueue.h.

◆ m_QueuedGroups

Definition at line 104 of file BattlegroundQueue.h.

◆ m_QueuedPlayers

QueuedPlayersMap BattlegroundQueue::m_QueuedPlayers

Definition at line 90 of file BattlegroundQueue.h.

◆ m_queueId

BattlegroundQueueTypeId BattlegroundQueue::m_queueId
private

Definition at line 128 of file BattlegroundQueue.h.

◆ m_SelectionPools

SelectionPool BattlegroundQueue::m_SelectionPools[PVP_TEAMS_COUNT]

Definition at line 122 of file BattlegroundQueue.h.

◆ m_SumOfWaitTimes

uint32 BattlegroundQueue::m_SumOfWaitTimes[PVP_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS]
private

Definition at line 133 of file BattlegroundQueue.h.

◆ m_WaitTimeLastPlayer

uint32 BattlegroundQueue::m_WaitTimeLastPlayer[PVP_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS]
private

Definition at line 132 of file BattlegroundQueue.h.

◆ m_WaitTimes

Definition at line 131 of file BattlegroundQueue.h.


The documentation for this class was generated from the following files: