TrinityCore
Loading...
Searching...
No Matches
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, bool isRated=false, uint32 minRating=0)
 
void UpdateEvents (uint32 diff)
 
void FillPlayersToBG (Battleground *bg)
 
bool CheckPremadeMatch (uint32 MinPlayersPerTeam, uint32 MaxPlayersPerTeam)
 
bool CheckNormalMatch (Battleground *bg_template, uint32 minPlayers, uint32 maxPlayers)
 
bool CheckSkirmishForSameFaction (uint32 minPlayersPerTeam)
 
GroupQueueInfoAddGroup (Player *leader, Group const *group, PvPDifficultyEntry const *bracketEntry, bool isRated, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating, uint32 ArenaTeamId=0, uint32 OpponentsArenaTeamId=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)
 
uint32 GetAverageQueueWaitTime (GroupQueueInfo *ginfo) const
 
uint32 GetPlayersInQueue (TeamId id)
 
BattlegroundQueueTypeId GetQueueId () const
 

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)
 

Private Attributes

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

Detailed Description

Definition at line 71 of file BattlegroundQueue.h.

Member Typedef Documentation

◆ GroupsQueueType

Definition at line 95 of file BattlegroundQueue.h.

◆ QueuedPlayersMap

Constructor & Destructor Documentation

◆ BattlegroundQueue()

BattlegroundQueue::BattlegroundQueue ( BattlegroundQueueTypeId  queueId)

Definition at line 38 of file BattlegroundQueue.cpp.

◆ ~BattlegroundQueue()

BattlegroundQueue::~BattlegroundQueue ( )

Definition at line 49 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddGroup()

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.

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

◆ BattlegroundQueueUpdate()

void BattlegroundQueue::BattlegroundQueueUpdate ( uint32  diff,
bool  isRated = false,
uint32  minRating = 0 
)

Definition at line 759 of file BattlegroundQueue.cpp.

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

◆ CheckNormalMatch()

bool BattlegroundQueue::CheckNormalMatch ( Battleground bg_template,
uint32  minPlayers,
uint32  maxPlayers 
)

Definition at line 648 of file BattlegroundQueue.cpp.

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

◆ CheckPremadeMatch()

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

Definition at line 590 of file BattlegroundQueue.cpp.

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

◆ CheckSkirmishForSameFaction()

bool BattlegroundQueue::CheckSkirmishForSameFaction ( uint32  minPlayersPerTeam)

Definition at line 691 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)

Definition at line 485 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) const

Definition at line 255 of file BattlegroundQueue.cpp.

+ Here is the caller graph for this function:

◆ GetPlayerGroupInfoData()

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

Definition at line 404 of file BattlegroundQueue.cpp.

+ Here is the caller graph for this function:

◆ GetPlayersInQueue()

uint32 BattlegroundQueue::GetPlayersInQueue ( TeamId  id)

Definition at line 413 of file BattlegroundQueue.cpp.

+ Here is the call graph for this function:

◆ GetQueueId()

BattlegroundQueueTypeId BattlegroundQueue::GetQueueId ( ) const
inline

Definition at line 127 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 418 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 396 of file BattlegroundQueue.cpp.

+ Here is the caller graph for this function:

◆ PlayerInvitedToBGUpdateAverageWaitTime()

void BattlegroundQueue::PlayerInvitedToBGUpdateAverageWaitTime ( GroupQueueInfo ginfo)

Definition at line 227 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 277 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 749 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 138 of file BattlegroundQueue.h.

◆ m_QueuedGroups

GroupsQueueType BattlegroundQueue::m_QueuedGroups[BG_QUEUE_GROUP_TYPES_COUNT]

Definition at line 106 of file BattlegroundQueue.h.

◆ m_QueuedPlayers

QueuedPlayersMap BattlegroundQueue::m_QueuedPlayers

Definition at line 92 of file BattlegroundQueue.h.

◆ m_queueId

BattlegroundQueueTypeId BattlegroundQueue::m_queueId
private

Definition at line 130 of file BattlegroundQueue.h.

◆ m_SelectionPools

SelectionPool BattlegroundQueue::m_SelectionPools[PVP_TEAMS_COUNT]

Definition at line 124 of file BattlegroundQueue.h.

◆ m_SumOfWaitTimes

uint32 BattlegroundQueue::m_SumOfWaitTimes[PVP_TEAMS_COUNT]
private

Definition at line 135 of file BattlegroundQueue.h.

◆ m_WaitTimeLastPlayer

uint32 BattlegroundQueue::m_WaitTimeLastPlayer[PVP_TEAMS_COUNT]
private

Definition at line 134 of file BattlegroundQueue.h.

◆ m_WaitTimes

uint32 BattlegroundQueue::m_WaitTimes[PVP_TEAMS_COUNT][COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME]
private

Definition at line 133 of file BattlegroundQueue.h.


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