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, 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)
 
GroupQueueInfo * AddGroup (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)

◆ ~BattlegroundQueue()

BattlegroundQueue::~BattlegroundQueue ( )

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 
)

◆ BattlegroundQueueUpdate()

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

◆ CheckNormalMatch()

◆ CheckPremadeMatch()

◆ CheckSkirmishForSameFaction()

◆ FillPlayersToBG()

◆ GetAverageQueueWaitTime()

◆ GetPlayerGroupInfoData()

◆ GetPlayersInQueue()

uint32 BattlegroundQueue::GetPlayersInQueue ( TeamId  id)

◆ GetQueueId()

BattlegroundQueueTypeId BattlegroundQueue::GetQueueId ( ) const
inline

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

References m_events, and EventProcessor::Update().

Member Data Documentation

◆ m_events

EventProcessor BattlegroundQueue::m_events
private

Definition at line 138 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]
private

◆ m_WaitTimeLastPlayer

uint32 BattlegroundQueue::m_WaitTimeLastPlayer[PVP_TEAMS_COUNT]
private

◆ m_WaitTimes


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