TrinityCore
Loading...
Searching...
No Matches
BattlegroundQueue Class Reference

#include <BattlegroundQueue.h>

Classes

class  SelectionPool
 

Public Types

typedef std::map< ObjectGuid, PlayerQueueInfo > QueuedPlayersMap
 
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)
 
GroupQueueInfo * AddGroup (Player const *leader, Group const *group, Team team, PVPDifficultyEntry const *bracketEntry, bool isPremade, uint32 ArenaRating, uint32 MatchmakerRating)
 
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 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 68 of file BattlegroundQueue.h.

Member Typedef Documentation

◆ GroupsQueueType

Definition at line 92 of file BattlegroundQueue.h.

◆ QueuedPlayersMap

Constructor & Destructor Documentation

◆ BattlegroundQueue()

◆ ~BattlegroundQueue()

BattlegroundQueue::~BattlegroundQueue ( )

Member Function Documentation

◆ AddGroup()

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

◆ BattlegroundQueueUpdate()

◆ CheckNormalMatch()

◆ CheckPremadeMatch()

◆ CheckSkirmishForSameFaction()

◆ FillPlayersToBG()

◆ GetAverageQueueWaitTime()

◆ GetPlayerGroupInfoData()

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

◆ GetPlayersInQueue()

uint32 BattlegroundQueue::GetPlayersInQueue ( TeamId  id)

◆ GetQueueId()

BattlegroundQueueTypeId BattlegroundQueue::GetQueueId ( ) const
inline

Definition at line 124 of file BattlegroundQueue.h.

Referenced by WorldSession::HandleBattleFieldPortOpcode().

◆ InviteGroupToBG()

◆ IsPlayerInvited()

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

Definition at line 403 of file BattlegroundQueue.cpp.

References m_QueuedPlayers.

Referenced by BGQueueInviteEvent::Execute(), and BGQueueRemoveEvent::Execute().

◆ PlayerInvitedToBGUpdateAverageWaitTime()

◆ RemovePlayer()

◆ UpdateEvents()

void BattlegroundQueue::UpdateEvents ( uint32  diff)

Definition at line 751 of file BattlegroundQueue.cpp.

References m_events, and EventProcessor::Update().

Member Data Documentation

◆ m_events

EventProcessor BattlegroundQueue::m_events
private

Definition at line 135 of file BattlegroundQueue.h.

Referenced by InviteGroupToBG(), UpdateEvents(), and ~BattlegroundQueue().

◆ m_QueuedGroups

◆ m_QueuedPlayers

QueuedPlayersMap BattlegroundQueue::m_QueuedPlayers

◆ m_queueId

◆ m_SelectionPools

◆ m_SumOfWaitTimes

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

◆ m_WaitTimeLastPlayer

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

◆ m_WaitTimes


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