TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
BattlegroundMgr Class Reference

#include <BattlegroundMgr.h>

Public Member Functions

void Update (uint32 diff)
 
void SendBattlegroundList (Player *player, ObjectGuid const &guid, BattlegroundTypeId bgTypeId)
 
void BuildBattlegroundStatusHeader (WorldPackets::Battleground::BattlefieldStatusHeader *battlefieldStatus, Battleground *bg, Player *player, uint32 ticketId, uint32 joinTime, uint32 arenaType)
 
void BuildBattlegroundStatusNone (WorldPackets::Battleground::BattlefieldStatusNone *battlefieldStatus, Player *player, uint32 ticketId, uint32 joinTime, uint32 arenaType)
 
void BuildBattlegroundStatusNeedConfirmation (WorldPackets::Battleground::BattlefieldStatusNeedConfirmation *battlefieldStatus, Battleground *bg, Player *player, uint32 ticketId, uint32 joinTime, uint32 timeout, uint32 arenaType)
 
void BuildBattlegroundStatusActive (WorldPackets::Battleground::BattlefieldStatusActive *battlefieldStatus, Battleground *bg, Player *player, uint32 ticketId, uint32 joinTime, uint32 arenaType)
 
void BuildBattlegroundStatusQueued (WorldPackets::Battleground::BattlefieldStatusQueued *battlefieldStatus, Battleground *bg, Player *player, uint32 ticketId, uint32 joinTime, uint32 avgWaitTime, uint32 arenaType, bool asGroup)
 
void BuildBattlegroundStatusFailed (WorldPackets::Battleground::BattlefieldStatusFailed *battlefieldStatus, Battleground *bg, Player *pPlayer, uint32 ticketId, uint32 arenaType, GroupJoinBattlegroundResult result, ObjectGuid const *errorGuid=nullptr)
 
void SendAreaSpiritHealerQueryOpcode (Player *player, Battleground *bg, ObjectGuid const &guid)
 
BattlegroundGetBattleground (uint32 InstanceID, BattlegroundTypeId bgTypeId)
 
BattlegroundGetBattlegroundTemplate (BattlegroundTypeId bgTypeId)
 
BattlegroundCreateNewBattleground (BattlegroundTypeId bgTypeId, PvPDifficultyEntry const *bracketEntry, uint8 arenaType, bool isRated)
 
void AddBattleground (Battleground *bg)
 
void RemoveBattleground (BattlegroundTypeId bgTypeId, uint32 instanceId)
 
void AddToBGFreeSlotQueue (BattlegroundTypeId bgTypeId, Battleground *bg)
 
void RemoveFromBGFreeSlotQueue (BattlegroundTypeId bgTypeId, uint32 instanceId)
 
BGFreeSlotQueueContainerGetBGFreeSlotQueueStore (BattlegroundTypeId bgTypeId)
 
void LoadBattlegroundTemplates ()
 
void DeleteAllBattlegrounds ()
 
void SendToBattleground (Player *player, uint32 InstanceID, BattlegroundTypeId bgTypeId)
 
BattlegroundQueueGetBattlegroundQueue (BattlegroundQueueTypeId bgQueueTypeId)
 
void ScheduleQueueUpdate (uint32 arenaMatchmakerRating, uint8 arenaType, BattlegroundQueueTypeId bgQueueTypeId, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id)
 
uint32 GetPrematureFinishTime () const
 
void ToggleArenaTesting ()
 
void ToggleTesting ()
 
void SetHolidayWeekends (uint32 mask)
 
bool isArenaTesting () const
 
bool isTesting () const
 
uint32 GetMaxRatingDifference () const
 
uint32 GetRatingDiscardTimer () const
 
void LoadBattleMastersEntry ()
 
void CheckBattleMasters ()
 
BattlegroundTypeId GetBattleMasterBG (uint32 entry) const
 

Static Public Member Functions

static BattlegroundMgrinstance ()
 
static BattlegroundQueueTypeId BGQueueTypeId (BattlegroundTypeId bgTypeId, uint8 arenaType)
 
static BattlegroundTypeId BGTemplateId (BattlegroundQueueTypeId bgQueueTypeId)
 
static uint8 BGArenaType (BattlegroundQueueTypeId bgQueueTypeId)
 
static HolidayIds BGTypeToWeekendHolidayId (BattlegroundTypeId bgTypeId)
 
static BattlegroundTypeId WeekendHolidayIdToBGType (HolidayIds holiday)
 
static bool IsBGWeekend (BattlegroundTypeId bgTypeId)
 

Private Types

typedef std::map
< BattlegroundTypeId,
BattlegroundData
BattlegroundDataContainer
 
typedef std::map
< BattlegroundTypeId, uint8
BattlegroundSelectionWeightMap
 
typedef std::map
< BattlegroundTypeId,
BattlegroundTemplate
BattlegroundTemplateMap
 
typedef std::map< uint32,
BattlegroundTemplate * > 
BattlegroundMapTemplateContainer
 

Private Member Functions

 BattlegroundMgr ()
 
 ~BattlegroundMgr ()
 
bool CreateBattleground (BattlegroundTemplate const *bgTemplate)
 
uint32 CreateClientVisibleInstanceId (BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id)
 
BattlegroundTypeId GetRandomBG (BattlegroundTypeId id)
 
BattlegroundTemplate constGetBattlegroundTemplateByTypeId (BattlegroundTypeId id)
 
BattlegroundTemplate constGetBattlegroundTemplateByMapId (uint32 mapId)
 

Static Private Member Functions

static bool IsArenaType (BattlegroundTypeId bgTypeId)
 

Private Attributes

BattlegroundDataContainer bgDataStore
 
BattlegroundQueue m_BattlegroundQueues [MAX_BATTLEGROUND_QUEUE_TYPES]
 
std::vector< uint64m_QueueUpdateScheduler
 
uint32 m_NextRatedArenaUpdate
 
bool m_ArenaTesting
 
bool m_Testing
 
BattleMastersMap mBattleMastersMap
 
BattlegroundTemplateMap _battlegroundTemplates
 
BattlegroundMapTemplateContainer _battlegroundMapTemplates
 

Member Typedef Documentation

Constructor & Destructor Documentation

BattlegroundMgr::BattlegroundMgr ( )
private
51  :
53  m_ArenaTesting(false), m_Testing(false)
54 { }
uint32 m_NextRatedArenaUpdate
Definition: BattlegroundMgr.h:152
#define sWorld
Definition: World.h:887
bool m_ArenaTesting
Definition: BattlegroundMgr.h:153
bool m_Testing
Definition: BattlegroundMgr.h:154
Definition: World.h:308
BattlegroundMgr::~BattlegroundMgr ( )
private
57 {
59 }
void DeleteAllBattlegrounds()
Definition: BattlegroundMgr.cpp:61

+ Here is the call graph for this function:

Member Function Documentation

void BattlegroundMgr::AddBattleground ( Battleground bg)
924 {
925  if (bg)
926  bgDataStore[bg->GetTypeID()].m_Battlegrounds[bg->GetInstanceID()] = bg;
927 }
uint32 GetInstanceID() const
Definition: Battleground.h:265
BattlegroundDataContainer bgDataStore
Definition: BattlegroundMgr.h:147
BattlegroundTypeId GetTypeID(bool GetRandom=false) const
Definition: Battleground.h:263

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundMgr::AddToBGFreeSlotQueue ( BattlegroundTypeId  bgTypeId,
Battleground bg 
)
908 {
909  bgDataStore[bgTypeId].BGFreeSlotQueue.push_front(bg);
910 }
BattlegroundDataContainer bgDataStore
Definition: BattlegroundMgr.h:147
uint8 BattlegroundMgr::BGArenaType ( BattlegroundQueueTypeId  bgQueueTypeId)
static
699 {
700  switch (bgQueueTypeId)
701  {
703  return ARENA_TYPE_2v2;
705  return ARENA_TYPE_3v3;
707  return ARENA_TYPE_5v5;
708  default:
709  return 0;
710  }
711 }
Definition: Battleground.h:183
Definition: SharedDefines.h:4745
Definition: Battleground.h:182
Definition: SharedDefines.h:4744
Definition: Battleground.h:181
Definition: SharedDefines.h:4746

+ Here is the caller graph for this function:

BattlegroundQueueTypeId BattlegroundMgr::BGQueueTypeId ( BattlegroundTypeId  bgTypeId,
uint8  arenaType 
)
static
624 {
625  switch (bgTypeId)
626  {
627  case BATTLEGROUND_AB:
628  return BATTLEGROUND_QUEUE_AB;
629  case BATTLEGROUND_AV:
630  return BATTLEGROUND_QUEUE_AV;
631  case BATTLEGROUND_EY:
632  return BATTLEGROUND_QUEUE_EY;
633  case BATTLEGROUND_IC:
634  return BATTLEGROUND_QUEUE_IC;
635  case BATTLEGROUND_TP:
636  return BATTLEGROUND_QUEUE_TP;
637  case BATTLEGROUND_BFG:
638  return BATTLEGROUND_QUEUE_BFG;
639  case BATTLEGROUND_RB:
640  return BATTLEGROUND_QUEUE_RB;
641  case BATTLEGROUND_SA:
642  return BATTLEGROUND_QUEUE_SA;
643  case BATTLEGROUND_WS:
644  return BATTLEGROUND_QUEUE_WS;
645  case BATTLEGROUND_AA:
646  case BATTLEGROUND_BE:
647  case BATTLEGROUND_DS:
648  case BATTLEGROUND_NA:
649  case BATTLEGROUND_RL:
650  case BATTLEGROUND_RV:
651  switch (arenaType)
652  {
653  case ARENA_TYPE_2v2:
654  return BATTLEGROUND_QUEUE_2v2;
655  case ARENA_TYPE_3v3:
656  return BATTLEGROUND_QUEUE_3v3;
657  case ARENA_TYPE_5v5:
658  return BATTLEGROUND_QUEUE_5v5;
659  default:
661  }
662  default:
664  }
665 }
Definition: SharedDefines.h:4572
Definition: SharedDefines.h:4742
Definition: Battleground.h:183
Definition: SharedDefines.h:4564
Definition: SharedDefines.h:4563
Definition: SharedDefines.h:4569
Definition: SharedDefines.h:4745
Definition: SharedDefines.h:4566
Definition: SharedDefines.h:4562
Definition: Battleground.h:182
Definition: SharedDefines.h:4744
Definition: SharedDefines.h:4741
Definition: SharedDefines.h:4568
Definition: SharedDefines.h:4567
Definition: SharedDefines.h:4735
Definition: Battleground.h:181
Definition: SharedDefines.h:4565
Definition: SharedDefines.h:4746
Definition: SharedDefines.h:4738
Definition: SharedDefines.h:4571
Definition: SharedDefines.h:4740
Definition: SharedDefines.h:4734
Definition: SharedDefines.h:4739
Definition: SharedDefines.h:4561
Definition: SharedDefines.h:4570
Definition: SharedDefines.h:4736
Definition: SharedDefines.h:4578
Definition: SharedDefines.h:4737
Definition: SharedDefines.h:4743
Definition: SharedDefines.h:4573
Definition: SharedDefines.h:4577

+ Here is the caller graph for this function:

BattlegroundTypeId BattlegroundMgr::BGTemplateId ( BattlegroundQueueTypeId  bgQueueTypeId)
static
668 {
669  switch (bgQueueTypeId)
670  {
672  return BATTLEGROUND_WS;
674  return BATTLEGROUND_AB;
676  return BATTLEGROUND_AV;
678  return BATTLEGROUND_EY;
680  return BATTLEGROUND_SA;
682  return BATTLEGROUND_IC;
684  return BATTLEGROUND_TP;
686  return BATTLEGROUND_BFG;
688  return BATTLEGROUND_RB;
692  return BATTLEGROUND_AA;
693  default:
694  return BattlegroundTypeId(0); // used for unknown template (it existed and do nothing)
695  }
696 }
Definition: SharedDefines.h:4572
Definition: SharedDefines.h:4742
Definition: SharedDefines.h:4563
Definition: SharedDefines.h:4569
BattlegroundTypeId
Definition: SharedDefines.h:4558
Definition: SharedDefines.h:4745
Definition: SharedDefines.h:4566
Definition: SharedDefines.h:4562
Definition: SharedDefines.h:4744
Definition: SharedDefines.h:4741
Definition: SharedDefines.h:4567
Definition: SharedDefines.h:4735
Definition: SharedDefines.h:4746
Definition: SharedDefines.h:4738
Definition: SharedDefines.h:4740
Definition: SharedDefines.h:4739
Definition: SharedDefines.h:4561
Definition: SharedDefines.h:4736
Definition: SharedDefines.h:4578
Definition: SharedDefines.h:4737
Definition: SharedDefines.h:4743
Definition: SharedDefines.h:4573
Definition: SharedDefines.h:4577

+ Here is the caller graph for this function:

HolidayIds BattlegroundMgr::BGTypeToWeekendHolidayId ( BattlegroundTypeId  bgTypeId)
static
825 {
826  switch (bgTypeId)
827  {
836  default: return HOLIDAY_NONE;
837  }
838 }
Definition: SharedDefines.h:4572
Definition: SharedDefines.h:4563
Definition: SharedDefines.h:4569
Definition: SharedDefines.h:3722
Definition: SharedDefines.h:3716
Definition: SharedDefines.h:3723
Definition: SharedDefines.h:4562
Definition: SharedDefines.h:4567
Definition: SharedDefines.h:3741
Definition: SharedDefines.h:3737
Definition: SharedDefines.h:3744
Definition: SharedDefines.h:3724
Definition: SharedDefines.h:3745
Definition: SharedDefines.h:4561
Definition: SharedDefines.h:3731
Definition: SharedDefines.h:4578
Definition: SharedDefines.h:4577

+ Here is the caller graph for this function:

void BattlegroundMgr::BuildBattlegroundStatusActive ( WorldPackets::Battleground::BattlefieldStatusActive battlefieldStatus,
Battleground bg,
Player player,
uint32  ticketId,
uint32  joinTime,
uint32  arenaType 
)
185 {
186  BuildBattlegroundStatusHeader(&battlefieldStatus->Hdr, bg, player, ticketId, joinTime, arenaType);
187  battlefieldStatus->ShutdownTimer = bg->GetRemainingTime();
188  battlefieldStatus->ArenaFaction = player->GetBGTeam() == HORDE ? BG_TEAM_HORDE : BG_TEAM_ALLIANCE;
189  battlefieldStatus->LeftEarly = false;
190  battlefieldStatus->StartTimer = bg->GetElapsedTime();
191  battlefieldStatus->Mapid = bg->GetMapId();
192 }
uint32 StartTimer
Definition: BattlegroundPackets.h:181
void BuildBattlegroundStatusHeader(WorldPackets::Battleground::BattlefieldStatusHeader *battlefieldStatus, Battleground *bg, Player *player, uint32 ticketId, uint32 joinTime, uint32 arenaType)
Definition: BattlegroundMgr.cpp:153
uint32 ShutdownTimer
Definition: BattlegroundPackets.h:178
BattlefieldStatusHeader Hdr
Definition: BattlegroundPackets.h:177
Definition: SharedDefines.h:999
Definition: SharedDefines.h:4551
uint32 GetRemainingTime() const
Definition: Battleground.h:269
bool LeftEarly
Definition: BattlegroundPackets.h:180
uint32 Mapid
Definition: BattlegroundPackets.h:182
uint32 GetMapId() const
Definition: Battleground.h:352
Definition: SharedDefines.h:4550
uint32 GetElapsedTime() const
Definition: Battleground.h:268
uint8 ArenaFaction
Definition: BattlegroundPackets.h:179

+ Here is the call graph for this function:

void BattlegroundMgr::BuildBattlegroundStatusFailed ( WorldPackets::Battleground::BattlefieldStatusFailed battlefieldStatus,
Battleground bg,
Player pPlayer,
uint32  ticketId,
uint32  arenaType,
GroupJoinBattlegroundResult  result,
ObjectGuid const errorGuid = nullptr 
)
205 {
206  battlefieldStatus->Ticket.RequesterGuid = pPlayer->GetGUID();
207  battlefieldStatus->Ticket.Id = ticketId;
208  battlefieldStatus->Ticket.Type = arenaType;
209  battlefieldStatus->Ticket.Time = pPlayer->GetBattlegroundQueueJoinTime(BGQueueTypeId(bg->GetTypeID(), arenaType));
210  battlefieldStatus->QueueID = bg->GetQueueId();
211  battlefieldStatus->Reason = result;
212  if (errorGuid && (result == ERR_BATTLEGROUND_NOT_IN_BATTLEGROUND || result == ERR_BATTLEGROUND_JOIN_TIMED_OUT))
213  battlefieldStatus->ClientID = *errorGuid;
214 }
int32 Id
Definition: LFGPackets.h:30
Definition: SharedDefines.h:4762
static BattlegroundQueueTypeId BGQueueTypeId(BattlegroundTypeId bgTypeId, uint8 arenaType)
Definition: BattlegroundMgr.cpp:623
uint64 GetQueueId() const
Definition: Battleground.h:262
ObjectGuid ClientID
Definition: BattlegroundPackets.h:208
uint64 QueueID
Definition: BattlegroundPackets.h:207
int32 Type
Definition: LFGPackets.h:31
Definition: SharedDefines.h:4759
ObjectGuid RequesterGuid
Definition: LFGPackets.h:29
BattlegroundTypeId GetTypeID(bool GetRandom=false) const
Definition: Battleground.h:263
WorldPackets::LFG::RideTicket Ticket
Definition: BattlegroundPackets.h:210
uint32 Time
Definition: LFGPackets.h:32
int32 Reason
Definition: BattlegroundPackets.h:209

+ Here is the call graph for this function:

void BattlegroundMgr::BuildBattlegroundStatusHeader ( WorldPackets::Battleground::BattlefieldStatusHeader battlefieldStatus,
Battleground bg,
Player player,
uint32  ticketId,
uint32  joinTime,
uint32  arenaType 
)
154 {
155  header->Ticket.RequesterGuid = player->GetGUID();
156  header->Ticket.Id = ticketId;
157  header->Ticket.Type = bg->isArena() ? arenaType : 1;
158  header->Ticket.Time = joinTime;
159  header->QueueID = bg->GetQueueId();
160  header->RangeMin = bg->GetMinLevel();
161  header->RangeMax = bg->GetMaxLevel();
162  header->TeamSize = bg->isArena() ? arenaType : 0;
163  header->InstanceID = bg->GetClientInstanceID();
164  header->RegisteredMatch = bg->isRated();
165  header->TournamentRules = false;
166 }
uint64 GetQueueId() const
Definition: Battleground.h:262
bool isRated() const
Definition: Battleground.h:328
bool isArena() const
Definition: Battleground.h:326
uint32 GetMaxLevel() const
Definition: Battleground.h:275
uint32 GetClientInstanceID() const
Definition: Battleground.h:267
uint32 GetMinLevel() const
Definition: Battleground.h:274

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void BattlegroundMgr::BuildBattlegroundStatusNeedConfirmation ( WorldPackets::Battleground::BattlefieldStatusNeedConfirmation battlefieldStatus,
Battleground bg,
Player player,
uint32  ticketId,
uint32  joinTime,
uint32  timeout,
uint32  arenaType 
)
177 {
178  BuildBattlegroundStatusHeader(&battlefieldStatus->Hdr, bg, player, ticketId, joinTime, arenaType);
179  battlefieldStatus->Mapid = bg->GetMapId();
180  battlefieldStatus->Timeout = timeout;
181  battlefieldStatus->Role = 0;
182 }
BattlefieldStatusHeader Hdr
Definition: BattlegroundPackets.h:166
uint8 Role
Definition: BattlegroundPackets.h:167
void BuildBattlegroundStatusHeader(WorldPackets::Battleground::BattlefieldStatusHeader *battlefieldStatus, Battleground *bg, Player *player, uint32 ticketId, uint32 joinTime, uint32 arenaType)
Definition: BattlegroundMgr.cpp:153
uint32 Mapid
Definition: BattlegroundPackets.h:165
uint32 GetMapId() const
Definition: Battleground.h:352
uint32 Timeout
Definition: BattlegroundPackets.h:164

+ Here is the call graph for this function:

void BattlegroundMgr::BuildBattlegroundStatusNone ( WorldPackets::Battleground::BattlefieldStatusNone battlefieldStatus,
Player player,
uint32  ticketId,
uint32  joinTime,
uint32  arenaType 
)
169 {
170  battlefieldStatus->Ticket.RequesterGuid = player->GetGUID();
171  battlefieldStatus->Ticket.Id = ticketId;
172  battlefieldStatus->Ticket.Type = arenaType;
173  battlefieldStatus->Ticket.Time = joinTime;
174 }
int32 Id
Definition: LFGPackets.h:30
int32 Type
Definition: LFGPackets.h:31
WorldPackets::LFG::RideTicket Ticket
Definition: BattlegroundPackets.h:154
ObjectGuid RequesterGuid
Definition: LFGPackets.h:29
uint32 Time
Definition: LFGPackets.h:32
void BattlegroundMgr::BuildBattlegroundStatusQueued ( WorldPackets::Battleground::BattlefieldStatusQueued battlefieldStatus,
Battleground bg,
Player player,
uint32  ticketId,
uint32  joinTime,
uint32  avgWaitTime,
uint32  arenaType,
bool  asGroup 
)
195 {
196  BuildBattlegroundStatusHeader(&battlefieldStatus->Hdr, bg, player, ticketId, joinTime, arenaType);
197  battlefieldStatus->AverageWaitTime = avgWaitTime;
198  battlefieldStatus->AsGroup = asGroup;
199  battlefieldStatus->SuspendedQueue = false;
200  battlefieldStatus->EligibleForMatchmaking = true;
201  battlefieldStatus->WaitTime = GetMSTimeDiffToNow(joinTime);
202 }
bool AsGroup
Definition: BattlegroundPackets.h:194
uint32 WaitTime
Definition: BattlegroundPackets.h:197
BattlefieldStatusHeader Hdr
Definition: BattlegroundPackets.h:193
void BuildBattlegroundStatusHeader(WorldPackets::Battleground::BattlefieldStatusHeader *battlefieldStatus, Battleground *bg, Player *player, uint32 ticketId, uint32 joinTime, uint32 arenaType)
Definition: BattlegroundMgr.cpp:153
uint32 AverageWaitTime
Definition: BattlegroundPackets.h:192
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
bool SuspendedQueue
Definition: BattlegroundPackets.h:195
bool EligibleForMatchmaking
Definition: BattlegroundPackets.h:196

+ Here is the call graph for this function:

void BattlegroundMgr::CheckBattleMasters ( )
812 {
813  CreatureTemplateContainer const* ctc = sObjectMgr->GetCreatureTemplates();
814  for (CreatureTemplateContainer::const_iterator itr = ctc->begin(); itr != ctc->end(); ++itr)
815  {
816  if ((itr->second.npcflag & UNIT_NPC_FLAG_BATTLEMASTER) && mBattleMastersMap.find(itr->second.Entry) == mBattleMastersMap.end())
817  {
818  TC_LOG_ERROR("sql.sql", "CreatureTemplate (Entry: %u) has UNIT_NPC_FLAG_BATTLEMASTER but no data in `battlemaster_entry` table. Removing flag!", itr->second.Entry);
819  const_cast<CreatureTemplate*>(&itr->second)->npcflag &= ~UNIT_NPC_FLAG_BATTLEMASTER;
820  }
821  }
822 }
#define sObjectMgr
Definition: ObjectMgr.h:1567
BattleMastersMap mBattleMastersMap
Definition: BattlegroundMgr.h:155
Definition: Unit.h:755
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
std::unordered_map< uint32, CreatureTemplate > CreatureTemplateContainer
Definition: Creature.h:213
Definition: Creature.h:79

+ Here is the caller graph for this function:

bool BattlegroundMgr::CreateBattleground ( BattlegroundTemplate const bgTemplate)
private
386 {
387  Battleground* bg = GetBattlegroundTemplate(bgTemplate->Id);
388  if (!bg)
389  {
390  // Create the BG
391  switch (bgTemplate->Id)
392  {
393  case BATTLEGROUND_AV:
394  bg = new BattlegroundAV;
395  break;
396  case BATTLEGROUND_WS:
397  bg = new BattlegroundWS;
398  break;
399  case BATTLEGROUND_AB:
400  bg = new BattlegroundAB;
401  break;
402  case BATTLEGROUND_NA:
403  bg = new BattlegroundNA;
404  break;
405  case BATTLEGROUND_BE:
406  bg = new BattlegroundBE;
407  break;
408  case BATTLEGROUND_EY:
409  bg = new BattlegroundEY;
410  break;
411  case BATTLEGROUND_RL:
412  bg = new BattlegroundRL;
413  break;
414  case BATTLEGROUND_SA:
415  bg = new BattlegroundSA;
416  break;
417  case BATTLEGROUND_DS:
418  bg = new BattlegroundDS;
419  break;
420  case BATTLEGROUND_RV:
421  bg = new BattlegroundRV;
422  break;
423  case BATTLEGROUND_IC:
424  bg = new BattlegroundIC;
425  break;
426  case BATTLEGROUND_AA:
427  bg = new Battleground;
428  break;
429  case BATTLEGROUND_RB:
430  bg = new Battleground;
431  bg->SetRandom(true);
432  break;
433  case BATTLEGROUND_TP:
434  bg = new BattlegroundTP;
435  break;
436  case BATTLEGROUND_BFG:
437  bg = new BattlegroundBFG;
438  break;
439  default:
440  return false;
441  }
442 
443  bg->SetTypeID(bgTemplate->Id);
444  bg->SetInstanceID(0);
445  AddBattleground(bg);
446  }
447 
448  bg->SetMapId(bgTemplate->BattlemasterEntry->MapID[0]);
449  bg->SetName(bgTemplate->BattlemasterEntry->Name_lang);
450  bg->SetInstanceID(0);
451  bg->SetArenaorBGType(bgTemplate->IsArena());
452  bg->SetMinPlayersPerTeam(bgTemplate->MinPlayersPerTeam);
453  bg->SetMaxPlayersPerTeam(bgTemplate->MaxPlayersPerTeam);
454  bg->SetMinPlayers(bgTemplate->MinPlayersPerTeam * 2);
455  bg->SetMaxPlayers(bgTemplate->MaxPlayersPerTeam * 2);
456  bg->SetTeamStartPosition(TEAM_ALLIANCE, bgTemplate->StartLocation[TEAM_ALLIANCE]);
457  bg->SetTeamStartPosition(TEAM_HORDE, bgTemplate->StartLocation[TEAM_HORDE]);
458  bg->SetStartMaxDist(bgTemplate->MaxStartDistSq);
459  bg->SetLevelRange(bgTemplate->MinLevel, bgTemplate->MaxLevel);
460  bg->SetScriptId(bgTemplate->ScriptId);
461  bg->SetQueueId(uint64(bgTemplate->Id) | UI64LIT(0x1F10000000000000));
462 
463  AddBattleground(bg);
464 
465  return true;
466 }
Definition: SharedDefines.h:4572
Definition: SharedDefines.h:4564
Definition: SharedDefines.h:4563
Definition: SharedDefines.h:4569
void SetMinPlayersPerTeam(uint32 MinPlayers)
Definition: Battleground.h:313
Definition: BattlegroundAB.h:276
void SetMaxPlayersPerTeam(uint32 MaxPlayers)
Definition: Battleground.h:312
Definition: SharedDefines.h:4566
Definition: SharedDefines.h:4562
void SetTeamStartPosition(TeamId teamId, Position const &pos)
Definition: Battleground.cpp:645
Definition: BattlegroundDS.h:91
Definition: BattlegroundAV.h:1606
Definition: BattlegroundNA.h:44
Definition: SharedDefines.h:4568
#define UI64LIT(N)
Definition: Define.h:138
Definition: SharedDefines.h:4567
uint64_t uint64
Definition: g3dmath.h:170
void SetQueueId(uint64 queueId)
Definition: Battleground.h:288
Definition: BattlegroundEY.h:356
void SetInstanceID(uint32 InstanceID)
Definition: Battleground.h:294
void SetStartMaxDist(float startMaxDist)
Definition: Battleground.h:362
Definition: BattlegroundIC.h:919
Definition: SharedDefines.h:4565
void SetTypeID(BattlegroundTypeId TypeID)
Definition: Battleground.h:290
void SetLevelRange(uint32 min, uint32 max)
Definition: Battleground.h:302
Battleground * GetBattlegroundTemplate(BattlegroundTypeId bgTypeId)
Definition: BattlegroundMgr.cpp:247
Definition: SharedDefines.h:4571
void SetArenaorBGType(bool _isArena)
Definition: Battleground.h:305
void SetMapId(uint32 MapID)
Definition: Battleground.h:351
Definition: SharedDefines.h:992
Definition: BattlegroundRL.h:40
void AddBattleground(Battleground *bg)
Definition: BattlegroundMgr.cpp:923
Definition: SharedDefines.h:4561
void SetRandom(bool isRandom)
Definition: Battleground.h:321
Definition: BattlegroundRV.h:93
Definition: SharedDefines.h:4570
Definition: BattlegroundTP.h:58
Definition: Battleground.h:235
Definition: BattlegroundWS.h:186
void SetName(std::string const &name)
Definition: Battleground.h:289
Definition: BattlegroundBFG.h:58
Definition: SharedDefines.h:4578
Definition: SharedDefines.h:993
Definition: SharedDefines.h:4573
void SetScriptId(uint32 scriptId)
Definition: Battleground.h:307
void SetMaxPlayers(uint32 MaxPlayers)
Definition: Battleground.h:300
Class for manage Strand of Ancient battleground.
Definition: BattlegroundSA.h:548
void SetMinPlayers(uint32 MinPlayers)
Definition: Battleground.h:301
Definition: SharedDefines.h:4577
Definition: BattlegroundBE.h:45

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32 BattlegroundMgr::CreateClientVisibleInstanceId ( BattlegroundTypeId  bgTypeId,
BattlegroundBracketId  bracket_id 
)
private
259 {
260  if (IsArenaType(bgTypeId))
261  return 0; //arenas don't have client-instanceids
262 
263  // we create here an instanceid, which is just for
264  // displaying this to the client and without any other use..
265  // the client-instanceIds are unique for each battleground-type
266  // the instance-id just needs to be as low as possible, beginning with 1
267  // the following works, because std::set is default ordered with "<"
268  // the optimalization would be to use as bitmask std::vector<uint32> - but that would only make code unreadable
269 
270  BattlegroundClientIdsContainer& clientIds = bgDataStore[bgTypeId].m_ClientBattlegroundIds[bracket_id];
271  uint32 lastId = 0;
272  for (BattlegroundClientIdsContainer::const_iterator itr = clientIds.begin(); itr != clientIds.end();)
273  {
274  if ((++lastId) != *itr) //if there is a gap between the ids, we will break..
275  break;
276  lastId = *itr;
277  }
278 
279  clientIds.insert(++lastId);
280  return lastId;
281 }
static bool IsArenaType(BattlegroundTypeId bgTypeId)
Definition: BattlegroundMgr.cpp:613
uint32_t uint32
Definition: Define.h:150
BattlegroundDataContainer bgDataStore
Definition: BattlegroundMgr.h:147
std::set< uint32 > BattlegroundClientIdsContainer
Definition: BattlegroundMgr.h:28

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Battleground * BattlegroundMgr::CreateNewBattleground ( BattlegroundTypeId  bgTypeId,
PvPDifficultyEntry const bracketEntry,
uint8  arenaType,
bool  isRated 
)
285 {
286  BattlegroundTypeId bgTypeId = GetRandomBG(originalBgTypeId);
287 
288  // get the template BG
289  Battleground* bg_template = GetBattlegroundTemplate(bgTypeId);
290 
291  if (!bg_template)
292  {
293  TC_LOG_ERROR("bg.battleground", "Battleground: CreateNewBattleground - bg template not found for %u", bgTypeId);
294  return NULL;
295  }
296 
297  Battleground* bg = NULL;
298  // create a copy of the BG template
299  switch (bgTypeId)
300  {
301  case BATTLEGROUND_AV:
302  bg = new BattlegroundAV(*(BattlegroundAV*)bg_template);
303  break;
304  case BATTLEGROUND_WS:
305  bg = new BattlegroundWS(*(BattlegroundWS*)bg_template);
306  break;
307  case BATTLEGROUND_AB:
308  bg = new BattlegroundAB(*(BattlegroundAB*)bg_template);
309  break;
310  case BATTLEGROUND_NA:
311  bg = new BattlegroundNA(*(BattlegroundNA*)bg_template);
312  break;
313  case BATTLEGROUND_BE:
314  bg = new BattlegroundBE(*(BattlegroundBE*)bg_template);
315  break;
316  case BATTLEGROUND_EY:
317  bg = new BattlegroundEY(*(BattlegroundEY*)bg_template);
318  break;
319  case BATTLEGROUND_RL:
320  bg = new BattlegroundRL(*(BattlegroundRL*)bg_template);
321  break;
322  case BATTLEGROUND_SA:
323  bg = new BattlegroundSA(*(BattlegroundSA*)bg_template);
324  break;
325  case BATTLEGROUND_DS:
326  bg = new BattlegroundDS(*(BattlegroundDS*)bg_template);
327  break;
328  case BATTLEGROUND_RV:
329  bg = new BattlegroundRV(*(BattlegroundRV*)bg_template);
330  break;
331  case BATTLEGROUND_IC:
332  bg = new BattlegroundIC(*(BattlegroundIC*)bg_template);
333  break;
334  case BATTLEGROUND_TP:
335  bg = new BattlegroundTP(*(BattlegroundTP*)bg_template);
336  break;
337  case BATTLEGROUND_BFG:
338  bg = new BattlegroundBFG(*(BattlegroundBFG*)bg_template);
339  break;
340  case BATTLEGROUND_RB:
341  case BATTLEGROUND_AA:
342  default:
343  return NULL;
344  }
345 
346  bool isRandom = bgTypeId != originalBgTypeId && !bg->isArena();
347 
348  bg->SetBracket(bracketEntry);
349  bg->SetInstanceID(sMapMgr->GenerateInstanceId());
350  bg->SetClientInstanceID(CreateClientVisibleInstanceId(originalBgTypeId, bracketEntry->GetBracketId()));
351  bg->Reset(); // reset the new bg (set status to status_wait_queue from status_none)
352  bg->SetStatus(STATUS_WAIT_JOIN); // start the joining of the bg
353  bg->SetArenaType(arenaType);
354  bg->SetTypeID(originalBgTypeId);
355  bg->SetRandomTypeID(bgTypeId);
356  bg->SetRated(isRated);
357  bg->SetRandom(isRandom);
358  bg->SetQueueId(uint64(bgTypeId) | UI64LIT(0x1F10000000000000));
359 
360  // Set up correct min/max player counts for scoreboards
361  if (bg->isArena())
362  {
363  uint32 maxPlayersPerTeam = 0;
364  switch (arenaType)
365  {
366  case ARENA_TYPE_2v2:
367  maxPlayersPerTeam = 2;
368  break;
369  case ARENA_TYPE_3v3:
370  maxPlayersPerTeam = 3;
371  break;
372  case ARENA_TYPE_5v5:
373  maxPlayersPerTeam = 5;
374  break;
375  }
376 
377  bg->SetMaxPlayersPerTeam(maxPlayersPerTeam);
378  bg->SetMaxPlayers(maxPlayersPerTeam * 2);
379  }
380 
381  return bg;
382 }
Definition: SharedDefines.h:4572
Definition: Battleground.h:183
Definition: SharedDefines.h:4564
Definition: SharedDefines.h:4563
Definition: SharedDefines.h:4569
BattlegroundTypeId
Definition: SharedDefines.h:4558
Definition: BattlegroundAB.h:276
void SetMaxPlayersPerTeam(uint32 MaxPlayers)
Definition: Battleground.h:312
Definition: SharedDefines.h:4566
Definition: SharedDefines.h:4562
Definition: Battleground.h:182
Definition: BattlegroundDS.h:91
Definition: BattlegroundAV.h:1606
void SetArenaType(uint8 type)
Definition: Battleground.h:304
Definition: BattlegroundNA.h:44
Definition: SharedDefines.h:4568
#define UI64LIT(N)
Definition: Define.h:138
arena_t NULL
Definition: jemalloc_internal.h:624
Definition: SharedDefines.h:4567
void SetRandomTypeID(BattlegroundTypeId TypeID)
Definition: Battleground.h:291
uint32 CreateClientVisibleInstanceId(BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id)
Definition: BattlegroundMgr.cpp:258
uint64_t uint64
Definition: g3dmath.h:170
void SetQueueId(uint64 queueId)
Definition: Battleground.h:288
Definition: BattlegroundEY.h:356
void SetInstanceID(uint32 InstanceID)
Definition: Battleground.h:294
Definition: Battleground.h:181
Definition: BattlegroundIC.h:919
Definition: SharedDefines.h:4565
bool isArena() const
Definition: Battleground.h:326
Definition: Battleground.h:158
void SetTypeID(BattlegroundTypeId TypeID)
Definition: Battleground.h:290
void SetClientInstanceID(uint32 InstanceID)
Definition: Battleground.h:296
Battleground * GetBattlegroundTemplate(BattlegroundTypeId bgTypeId)
Definition: BattlegroundMgr.cpp:247
Definition: SharedDefines.h:4571
void SetBracket(PvPDifficultyEntry const *bracketEntry)
Definition: Battleground.cpp:1912
virtual void Reset()
Definition: Battleground.cpp:1034
uint32_t uint32
Definition: Define.h:150
Definition: BattlegroundRL.h:40
void SetRated(bool state)
Definition: Battleground.h:303
Definition: SharedDefines.h:4561
void SetRandom(bool isRandom)
Definition: Battleground.h:321
Definition: BattlegroundRV.h:93
Definition: SharedDefines.h:4570
#define sMapMgr
Definition: MapManager.h:194
BattlegroundTypeId GetRandomBG(BattlegroundTypeId id)
Definition: BattlegroundMgr.cpp:861
Definition: BattlegroundTP.h:58
Definition: Battleground.h:235
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
Definition: BattlegroundWS.h:186
Definition: BattlegroundBFG.h:58
Definition: SharedDefines.h:4578
Definition: SharedDefines.h:4573
void SetMaxPlayers(uint32 MaxPlayers)
Definition: Battleground.h:300
void SetStatus(BattlegroundStatus Status)
Definition: Battleground.h:295
Class for manage Strand of Ancient battleground.
Definition: BattlegroundSA.h:548
Definition: SharedDefines.h:4577
Definition: BattlegroundBE.h:45

+ Here is the call graph for this function:

void BattlegroundMgr::DeleteAllBattlegrounds ( )
62 {
63  for (BattlegroundDataContainer::iterator itr1 = bgDataStore.begin(); itr1 != bgDataStore.end(); ++itr1)
64  {
65  BattlegroundData& data = itr1->second;
66 
67  while (!data.m_Battlegrounds.empty())
68  delete data.m_Battlegrounds.begin()->second;
69  data.m_Battlegrounds.clear();
70 
71  while (!data.BGFreeSlotQueue.empty())
72  delete data.BGFreeSlotQueue.front();
73  }
74 
75  bgDataStore.clear();
76 }
Definition: BattlegroundMgr.h:34
BattlegroundDataContainer bgDataStore
Definition: BattlegroundMgr.h:147
BGFreeSlotQueueContainer BGFreeSlotQueue
Definition: BattlegroundMgr.h:38
BattlegroundContainer m_Battlegrounds
Definition: BattlegroundMgr.h:36

+ Here is the caller graph for this function:

Battleground * BattlegroundMgr::GetBattleground ( uint32  InstanceID,
BattlegroundTypeId  bgTypeId 
)
217 {
218  if (!instanceId)
219  return NULL;
220 
221  BattlegroundDataContainer::const_iterator begin, end;
222 
223  if (bgTypeId == BATTLEGROUND_TYPE_NONE)
224  {
225  begin = bgDataStore.begin();
226  end = bgDataStore.end();
227  }
228  else
229  {
230  end = bgDataStore.find(bgTypeId);
231  if (end == bgDataStore.end())
232  return NULL;
233  begin = end++;
234  }
235 
236  for (BattlegroundDataContainer::const_iterator it = begin; it != end; ++it)
237  {
238  BattlegroundContainer const& bgs = it->second.m_Battlegrounds;
239  BattlegroundContainer::const_iterator itr = bgs.find(instanceId);
240  if (itr != bgs.end())
241  return itr->second;
242  }
243 
244  return NULL;
245 }
Definition: Session.h:36
arena_t NULL
Definition: jemalloc_internal.h:624
std::map< uint32, Battleground * > BattlegroundContainer
Definition: BattlegroundMgr.h:27
BattlegroundDataContainer bgDataStore
Definition: BattlegroundMgr.h:147
Definition: SharedDefines.h:4560

+ Here is the caller graph for this function:

BattlegroundQueue& BattlegroundMgr::GetBattlegroundQueue ( BattlegroundQueueTypeId  bgQueueTypeId)
inline
108 { return m_BattlegroundQueues[bgQueueTypeId]; }
BattlegroundQueue m_BattlegroundQueues[MAX_BATTLEGROUND_QUEUE_TYPES]
Definition: BattlegroundMgr.h:149
Battleground * BattlegroundMgr::GetBattlegroundTemplate ( BattlegroundTypeId  bgTypeId)
248 {
249  BattlegroundDataContainer::const_iterator itr = bgDataStore.find(bgTypeId);
250  if (itr == bgDataStore.end())
251  return NULL;
252 
253  BattlegroundContainer const& bgs = itr->second.m_Battlegrounds;
254  // map is sorted and we can be sure that lowest instance id has only BG template
255  return bgs.empty() ? NULL : bgs.begin()->second;
256 }
Definition: Session.h:36
arena_t NULL
Definition: jemalloc_internal.h:624
std::map< uint32, Battleground * > BattlegroundContainer
Definition: BattlegroundMgr.h:27
BattlegroundDataContainer bgDataStore
Definition: BattlegroundMgr.h:147

+ Here is the caller graph for this function:

BattlegroundTemplate const* BattlegroundMgr::GetBattlegroundTemplateByMapId ( uint32  mapId)
inlineprivate
166  {
167  BattlegroundMapTemplateContainer::const_iterator itr = _battlegroundMapTemplates.find(mapId);
168  if (itr != _battlegroundMapTemplates.end())
169  return itr->second;
170  return nullptr;
171  }
BattlegroundMapTemplateContainer _battlegroundMapTemplates
Definition: BattlegroundMgr.h:178

+ Here is the caller graph for this function:

BattlegroundTemplate const* BattlegroundMgr::GetBattlegroundTemplateByTypeId ( BattlegroundTypeId  id)
inlineprivate
158  {
159  BattlegroundTemplateMap::const_iterator itr = _battlegroundTemplates.find(id);
160  if (itr != _battlegroundTemplates.end())
161  return &itr->second;
162  return nullptr;
163  }
BattlegroundTemplateMap _battlegroundTemplates
Definition: BattlegroundMgr.h:177

+ Here is the caller graph for this function:

BattlegroundTypeId BattlegroundMgr::GetBattleMasterBG ( uint32  entry) const
inline
133  {
134  BattleMastersMap::const_iterator itr = mBattleMastersMap.find(entry);
135  if (itr != mBattleMastersMap.end())
136  return itr->second;
137  return BATTLEGROUND_TYPE_NONE;
138  }
BattleMastersMap mBattleMastersMap
Definition: BattlegroundMgr.h:155
Definition: SharedDefines.h:4560
BGFreeSlotQueueContainer & BattlegroundMgr::GetBGFreeSlotQueueStore ( BattlegroundTypeId  bgTypeId)
903 {
904  return bgDataStore[bgTypeId].BGFreeSlotQueue;
905 }
BattlegroundDataContainer bgDataStore
Definition: BattlegroundMgr.h:147
uint32 BattlegroundMgr::GetMaxRatingDifference ( ) const
743 {
744  // this is for stupid people who can't use brain and set max rating difference to 0
745  uint32 diff = sWorld->getIntConfig(CONFIG_ARENA_MAX_RATING_DIFFERENCE);
746  if (diff == 0)
747  diff = 5000;
748  return diff;
749 }
#define sWorld
Definition: World.h:887
Definition: World.h:306
uint32_t uint32
Definition: Define.h:150
uint32 BattlegroundMgr::GetPrematureFinishTime ( ) const
757 {
759 }
#define sWorld
Definition: World.h:887
BattlegroundTypeId BattlegroundMgr::GetRandomBG ( BattlegroundTypeId  id)
private
862 {
863  if (BattlegroundTemplate const* bgTemplate = GetBattlegroundTemplateByTypeId(bgTypeId))
864  {
865  uint32 weight = 0;
866  BattlegroundSelectionWeightMap selectionWeights;
867 
868  for (int32 mapId : bgTemplate->BattlemasterEntry->MapID)
869  {
870  if (mapId == -1)
871  break;
872 
874  {
875  weight += bg->Weight;
876  selectionWeights[bg->Id] = bg->Weight;
877  }
878  }
879 
880  // there is only one bg to select
881  if (selectionWeights.size() == 1)
882  return selectionWeights.begin()->first;
883 
884  if (weight)
885  {
886  // Select a random value
887  uint32 selectedWeight = urand(0, weight - 1);
888  // Select the correct bg (if we have in DB A(10), B(20), C(10), D(15) --> [0---A---9|10---B---29|30---C---39|40---D---54])
889  weight = 0;
890  for (auto it : selectionWeights)
891  {
892  weight += it.second;
893  if (selectedWeight < weight)
894  return it.first;
895  }
896  }
897  }
898 
899  return BATTLEGROUND_TYPE_NONE;
900 }
uint32 urand(uint32 min, uint32 max)
Definition: Random.cpp:45
int32_t int32
Definition: Define.h:146
uint32_t uint32
Definition: Define.h:150
Definition: BattlegroundMgr.h:41
BattlegroundTemplate const * GetBattlegroundTemplateByMapId(uint32 mapId)
Definition: BattlegroundMgr.h:165
BattlegroundTemplate const * GetBattlegroundTemplateByTypeId(BattlegroundTypeId id)
Definition: BattlegroundMgr.h:157
std::map< BattlegroundTypeId, uint8 > BattlegroundSelectionWeightMap
Definition: BattlegroundMgr.h:173
Definition: SharedDefines.h:4560

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32 BattlegroundMgr::GetRatingDiscardTimer ( ) const
752 {
753  return sWorld->getIntConfig(CONFIG_ARENA_RATING_DISCARD_TIMER);
754 }
Definition: World.h:307
#define sWorld
Definition: World.h:887
BattlegroundMgr * BattlegroundMgr::instance ( )
static
79 {
81  return &instance;
82 }
Definition: BattlegroundMgr.h:70
static BattlegroundMgr * instance()
Definition: BattlegroundMgr.cpp:78
bool BattlegroundMgr::isArenaTesting ( ) const
inline
117 { return m_ArenaTesting; }
bool m_ArenaTesting
Definition: BattlegroundMgr.h:153
bool BattlegroundMgr::IsArenaType ( BattlegroundTypeId  bgTypeId)
staticprivate
614 {
615  return bgTypeId == BATTLEGROUND_AA
616  || bgTypeId == BATTLEGROUND_BE
617  || bgTypeId == BATTLEGROUND_NA
618  || bgTypeId == BATTLEGROUND_DS
619  || bgTypeId == BATTLEGROUND_RV
620  || bgTypeId == BATTLEGROUND_RL;
621 }
Definition: SharedDefines.h:4564
Definition: SharedDefines.h:4566
Definition: SharedDefines.h:4568
Definition: SharedDefines.h:4565
Definition: SharedDefines.h:4571
Definition: SharedDefines.h:4570

+ Here is the caller graph for this function:

bool BattlegroundMgr::IsBGWeekend ( BattlegroundTypeId  bgTypeId)
static
857 {
858  return IsHolidayActive(BGTypeToWeekendHolidayId(bgTypeId));
859 }
static HolidayIds BGTypeToWeekendHolidayId(BattlegroundTypeId bgTypeId)
Definition: BattlegroundMgr.cpp:824
bool IsHolidayActive(HolidayIds id)
Definition: GameEventMgr.cpp:1673

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

bool BattlegroundMgr::isTesting ( ) const
inline
118 { return m_Testing; }
bool m_Testing
Definition: BattlegroundMgr.h:154
void BattlegroundMgr::LoadBattlegroundTemplates ( )
469 {
470  uint32 oldMSTime = getMSTime();
471 
473  _battlegroundTemplates.clear();
474 
475  // 0 1 2 3 4 5 6 7 8 9
476  QueryResult result = WorldDatabase.Query("SELECT ID, MinPlayersPerTeam, MaxPlayersPerTeam, MinLvl, MaxLvl, AllianceStartLoc, HordeStartLoc, StartMaxDist, Weight, ScriptName FROM battleground_template");
477  if (!result)
478  {
479  TC_LOG_ERROR("server.loading", ">> Loaded 0 battlegrounds. DB table `battleground_template` is empty.");
480  return;
481  }
482 
483  uint32 count = 0;
484 
485  do
486  {
487  Field* fields = result->Fetch();
488 
489  BattlegroundTypeId bgTypeId = BattlegroundTypeId(fields[0].GetUInt32());
490 
492  continue;
493 
494  // can be overwrite by values from DB
495  BattlemasterListEntry const* bl = sBattlemasterListStore.LookupEntry(bgTypeId);
496  if (!bl)
497  {
498  TC_LOG_ERROR("bg.battleground", "Battleground ID %u not found in BattlemasterList.dbc. Battleground not created.", bgTypeId);
499  continue;
500  }
501 
502  BattlegroundTemplate bgTemplate;
503  bgTemplate.Id = bgTypeId;
504  bgTemplate.MinPlayersPerTeam = fields[1].GetUInt16();
505  bgTemplate.MaxPlayersPerTeam = fields[2].GetUInt16();
506  bgTemplate.MinLevel = fields[3].GetUInt8();
507  bgTemplate.MaxLevel = fields[4].GetUInt8();
508  float dist = fields[7].GetFloat();
509  bgTemplate.MaxStartDistSq = dist * dist;
510  bgTemplate.Weight = fields[8].GetUInt8();
511  bgTemplate.ScriptId = sObjectMgr->GetScriptId(fields[9].GetString());
512  bgTemplate.BattlemasterEntry = bl;
513 
514  if (bgTemplate.MaxPlayersPerTeam == 0 || bgTemplate.MinPlayersPerTeam > bgTemplate.MaxPlayersPerTeam)
515  {
516  TC_LOG_ERROR("sql.sql", "Table `battleground_template` for ID %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)",
517  bgTemplate.Id, bgTemplate.MinPlayersPerTeam, bgTemplate.MaxPlayersPerTeam);
518  continue;
519  }
520 
521  if (bgTemplate.MinLevel == 0 || bgTemplate.MaxLevel == 0 || bgTemplate.MinLevel > bgTemplate.MaxLevel)
522  {
523  TC_LOG_ERROR("sql.sql", "Table `battleground_template` for ID %u has bad values for MinLevel (%u) and MaxLevel (%u)",
524  bgTemplate.Id, bgTemplate.MinLevel, bgTemplate.MaxLevel);
525  continue;
526  }
527 
528  if (bgTemplate.Id != BATTLEGROUND_AA && bgTemplate.Id != BATTLEGROUND_RB)
529  {
530  uint32 startId = fields[5].GetUInt32();
531  if (WorldSafeLocsEntry const* start = sWorldSafeLocsStore.LookupEntry(startId))
532  {
533  bgTemplate.StartLocation[TEAM_ALLIANCE].Relocate(start->Loc.X, start->Loc.Y, start->Loc.Z, (start->Facing * M_PI) / 180);
534  }
535  else
536  {
537  TC_LOG_ERROR("sql.sql", "Table `battleground_template` for ID %u a non-existant WorldSafeLoc (ID: %u) in field `AllianceStartLoc`. BG not created.", bgTemplate.Id, startId);
538  continue;
539  }
540 
541  startId = fields[6].GetUInt32();
542  if (WorldSafeLocsEntry const* start = sWorldSafeLocsStore.LookupEntry(startId))
543  {
544  bgTemplate.StartLocation[TEAM_HORDE].Relocate(start->Loc.X, start->Loc.Y, start->Loc.Z, (start->Facing * M_PI) / 180);
545  }
546  else
547  {
548  TC_LOG_ERROR("sql.sql", "Table `battleground_template` for ID %u has a non-existant WorldSafeLoc (ID: %u) in field `HordeStartLoc`. BG not created.", bgTemplate.Id, startId);
549  continue;
550  }
551  }
552 
553  if (!CreateBattleground(&bgTemplate))
554  continue;
555 
556  _battlegroundTemplates[bgTypeId] = bgTemplate;
557 
558  if (bgTemplate.BattlemasterEntry->MapID[1] == -1) // in this case we have only one mapId
560 
561  ++count;
562  }
563  while (result->NextRow());
564 
565  TC_LOG_INFO("server.loading", ">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
566 }
int32 MapID[16]
Definition: DBCStructure.h:117
bool IsDisabledFor(DisableType type, uint32 entry, Unit const *unit, uint8 flags)
Definition: DisableMgr.cpp:277
BattlegroundTypeId
Definition: SharedDefines.h:4558
DBCStorage< WorldSafeLocsEntry > sWorldSafeLocsStore(WorldSafeLocsfmt)
float GetFloat() const
Definition: Field.h:222
#define M_PI
Definition: Common.h:163
Definition: SharedDefines.h:4566
Class used to access individual fields of database query result.
Definition: Field.h:56
DBCStorage< BattlemasterListEntry > sBattlemasterListStore(BattlemasterListfmt)
uint16 MinPlayersPerTeam
Definition: BattlegroundMgr.h:44
uint32 getMSTime()
Definition: Timer.h:24
uint8 Weight
Definition: BattlegroundMgr.h:50
BattlegroundTypeId Id
Definition: BattlegroundMgr.h:43
Definition: DBCStructure.h:1434
float MaxStartDistSq
Definition: BattlegroundMgr.h:49
arena_t NULL
Definition: jemalloc_internal.h:624
WorldDatabaseWorkerPool WorldDatabase
Accessor to the world database.
Definition: DatabaseEnv.cpp:20
uint16 MaxPlayersPerTeam
Definition: BattlegroundMgr.h:45
BattlegroundTemplateMap _battlegroundTemplates
Definition: BattlegroundMgr.h:177
BattlemasterListEntry const * BattlemasterEntry
Definition: BattlegroundMgr.h:52
#define sObjectMgr
Definition: ObjectMgr.h:1567
bool CreateBattleground(BattlegroundTemplate const *bgTemplate)
Definition: BattlegroundMgr.cpp:385
uint8 MinLevel
Definition: BattlegroundMgr.h:46
uint8 GetUInt8() const
Definition: Field.h:70
void Relocate(float x, float y)
Definition: Position.h:67
Definition: DisableMgr.h:32
uint32_t uint32
Definition: Define.h:150
std::shared_ptr< ResultSet > QueryResult
Definition: QueryResult.h:61
uint32 ScriptId
Definition: BattlegroundMgr.h:51
Definition: SharedDefines.h:992
uint16 GetUInt16() const
Definition: Field.h:108
Definition: BattlegroundMgr.h:41
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
QueryResult Query(const char *sql, T *connection=nullptr)
Definition: DatabaseWorkerPool.cpp:113
uint8 MaxLevel
Definition: BattlegroundMgr.h:47
uint32 GetUInt32() const
Definition: Field.h:146
BattlegroundMapTemplateContainer _battlegroundMapTemplates
Definition: BattlegroundMgr.h:178
Position StartLocation[BG_TEAMS_COUNT]
Definition: BattlegroundMgr.h:48
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:201
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
Definition: SharedDefines.h:993
Definition: SharedDefines.h:4573
Definition: DBCStructure.h:114

+ Here is the call graph for this function:

void BattlegroundMgr::LoadBattleMastersEntry ( )
762 {
763  uint32 oldMSTime = getMSTime();
764 
765  mBattleMastersMap.clear(); // need for reload case
766 
767  QueryResult result = WorldDatabase.Query("SELECT entry, bg_template FROM battlemaster_entry");
768 
769  if (!result)
770  {
771  TC_LOG_INFO("server.loading", ">> Loaded 0 battlemaster entries. DB table `battlemaster_entry` is empty!");
772  return;
773  }
774 
775  uint32 count = 0;
776 
777  do
778  {
779  ++count;
780 
781  Field* fields = result->Fetch();
782 
783  uint32 entry = fields[0].GetUInt32();
784  if (CreatureTemplate const* cInfo = sObjectMgr->GetCreatureTemplate(entry))
785  {
786  if ((cInfo->npcflag & UNIT_NPC_FLAG_BATTLEMASTER) == 0)
787  TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) listed in `battlemaster_entry` is not a battlemaster.", entry);
788  }
789  else
790  {
791  TC_LOG_ERROR("sql.sql", "Creature (Entry: %u) listed in `battlemaster_entry` does not exist.", entry);
792  continue;
793  }
794 
795  uint32 bgTypeId = fields[1].GetUInt32();
796  if (!sBattlemasterListStore.LookupEntry(bgTypeId))
797  {
798  TC_LOG_ERROR("sql.sql", "Table `battlemaster_entry` contain entry %u for not existed battleground type %u, ignored.", entry, bgTypeId);
799  continue;
800  }
801 
802  mBattleMastersMap[entry] = BattlegroundTypeId(bgTypeId);
803  }
804  while (result->NextRow());
805 
807 
808  TC_LOG_INFO("server.loading", ">> Loaded %u battlemaster entries in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
809 }
BattlegroundTypeId
Definition: SharedDefines.h:4558
Class used to access individual fields of database query result.
Definition: Field.h:56
DBCStorage< BattlemasterListEntry > sBattlemasterListStore(BattlemasterListfmt)
uint32 getMSTime()
Definition: Timer.h:24
WorldDatabaseWorkerPool WorldDatabase
Accessor to the world database.
Definition: DatabaseEnv.cpp:20
#define sObjectMgr
Definition: ObjectMgr.h:1567
uint32_t uint32
Definition: Define.h:150
std::shared_ptr< ResultSet > QueryResult
Definition: QueryResult.h:61
BattleMastersMap mBattleMastersMap
Definition: BattlegroundMgr.h:155
Definition: Unit.h:755
uint32 GetMSTimeDiffToNow(uint32 oldMSTime)
Definition: Timer.h:42
QueryResult Query(const char *sql, T *connection=nullptr)
Definition: DatabaseWorkerPool.cpp:113
void CheckBattleMasters()
Definition: BattlegroundMgr.cpp:811
uint32 GetUInt32() const
Definition: Field.h:146
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:201
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
Definition: Creature.h:79

+ Here is the call graph for this function:

void BattlegroundMgr::RemoveBattleground ( BattlegroundTypeId  bgTypeId,
uint32  instanceId 
)
930 {
931  bgDataStore[bgTypeId].m_Battlegrounds.erase(instanceId);
932 }
BattlegroundDataContainer bgDataStore
Definition: BattlegroundMgr.h:147
void BattlegroundMgr::RemoveFromBGFreeSlotQueue ( BattlegroundTypeId  bgTypeId,
uint32  instanceId 
)
913 {
914  BGFreeSlotQueueContainer& queues = bgDataStore[bgTypeId].BGFreeSlotQueue;
915  for (BGFreeSlotQueueContainer::iterator itr = queues.begin(); itr != queues.end(); ++itr)
916  if ((*itr)->GetInstanceID() == instanceId)
917  {
918  queues.erase(itr);
919  return;
920  }
921 }
std::list< Battleground * > BGFreeSlotQueueContainer
Definition: BattlegroundQueue.h:30
BattlegroundDataContainer bgDataStore
Definition: BattlegroundMgr.h:147
void BattlegroundMgr::ScheduleQueueUpdate ( uint32  arenaMatchmakerRating,
uint8  arenaType,
BattlegroundQueueTypeId  bgQueueTypeId,
BattlegroundTypeId  bgTypeId,
BattlegroundBracketId  bracket_id 
)
734 {
735  //This method must be atomic, @todo add mutex
736  //we will use only 1 number created of bgTypeId and bracket_id
737  uint64 const scheduleId = ((uint64)arenaMatchmakerRating << 32) | (uint32(arenaType) << 24) | (bgQueueTypeId << 16) | (bgTypeId << 8) | bracket_id;
738  if (std::find(m_QueueUpdateScheduler.begin(), m_QueueUpdateScheduler.end(), scheduleId) == m_QueueUpdateScheduler.end())
739  m_QueueUpdateScheduler.push_back(scheduleId);
740 }
uint64_t uint64
Definition: g3dmath.h:170
std::vector< uint64 > m_QueueUpdateScheduler
Definition: BattlegroundMgr.h:151
uint64_t uint64
Definition: Define.h:149
uint32_t uint32
Definition: g3dmath.h:168
void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode ( Player player,
Battleground bg,
ObjectGuid const guid 
)
602 {
603  uint32 time_ = 30000 - bg->GetLastResurrectTime(); // resurrect every 30 seconds
604  if (time_ == uint32(-1))
605  time_ = 0;
606 
608  areaSpiritHealerTime.HealerGuid = guid;
609  areaSpiritHealerTime.TimeLeft = time_;
610  player->GetSession()->SendPacket(areaSpiritHealerTime.Write());
611 }
int32 TimeLeft
Definition: BattlegroundPackets.h:70
Definition: BattlegroundPackets.h:62
uint32_t uint32
Definition: Define.h:150
ObjectGuid HealerGuid
Definition: BattlegroundPackets.h:69
uint32 GetLastResurrectTime() const
Definition: Battleground.h:270
uint32_t uint32
Definition: g3dmath.h:168
WorldPacket const * Write() override
Definition: BattlegroundPackets.cpp:38

+ Here is the call graph for this function:

void BattlegroundMgr::SendBattlegroundList ( Player player,
ObjectGuid const guid,
BattlegroundTypeId  bgTypeId 
)
569 {
570  BattlegroundTemplate const* bgTemplate = GetBattlegroundTemplateByTypeId(bgTypeId);
571  if (!bgTemplate)
572  return;
573 
575  battlefieldList.BattlemasterGuid = guid;
576  battlefieldList.BattlemasterListID = bgTypeId;
577  battlefieldList.MinLevel = bgTemplate->MinLevel;
578  battlefieldList.MaxLevel = bgTemplate->MaxLevel;
579  battlefieldList.PvpAnywhere = guid.IsEmpty();
580  battlefieldList.HasRandomWinToday = player->GetRandomWinner();
581  battlefieldList.HasHolidayWinToday = false;
582  battlefieldList.IsRandomBG = bgTypeId == BATTLEGROUND_RB;
583  player->SendDirectMessage(battlefieldList.Write());
584 }
WorldPacket const * Write() override
Definition: BattlegroundPackets.cpp:209
ObjectGuid BattlemasterGuid
Definition: BattlegroundPackets.h:274
uint8 MinLevel
Definition: BattlegroundMgr.h:46
bool HasRandomWinToday
Definition: BattlegroundPackets.h:279
bool PvpAnywhere
Definition: BattlegroundPackets.h:273
Definition: BattlegroundMgr.h:41
BattlegroundTemplate const * GetBattlegroundTemplateByTypeId(BattlegroundTypeId id)
Definition: BattlegroundMgr.h:157
uint8 MinLevel
Definition: BattlegroundPackets.h:276
uint8 MaxLevel
Definition: BattlegroundMgr.h:47
int32 BattlemasterListID
Definition: BattlegroundPackets.h:278
bool HasHolidayWinToday
Definition: BattlegroundPackets.h:277
Definition: SharedDefines.h:4573
Definition: BattlegroundPackets.h:265
uint8 MaxLevel
Definition: BattlegroundPackets.h:272
bool IsRandomBG
Definition: BattlegroundPackets.h:275

+ Here is the call graph for this function:

void BattlegroundMgr::SendToBattleground ( Player player,
uint32  InstanceID,
BattlegroundTypeId  bgTypeId 
)
587 {
588  if (Battleground* bg = GetBattleground(instanceId, bgTypeId))
589  {
590  uint32 mapid = bg->GetMapId();
591  uint32 team = player->GetBGTeam();
592 
593  Position const* pos = bg->GetTeamStartPosition(Battleground::GetTeamIndexByTeamId(team));
594  TC_LOG_DEBUG("bg.battleground", "BattlegroundMgr::SendToBattleground: Sending %s to map %u, %s (bgType %u)", player->GetName().c_str(), mapid, pos->ToString().c_str(), bgTypeId);
595  player->TeleportTo(mapid, pos->GetPositionX(), pos->GetPositionY(), pos->GetPositionZ(), pos->GetOrientation());
596  }
597  else
598  TC_LOG_ERROR("bg.battleground", "BattlegroundMgr::SendToBattleground: Instance %u (bgType %u) not found while trying to teleport player %s", instanceId, bgTypeId, player->GetName().c_str());
599 }
#define TC_LOG_DEBUG(filterType__,...)
Definition: Log.h:198
static TeamId GetTeamIndexByTeamId(uint32 Team)
Definition: Battleground.h:399
float GetOrientation() const
Definition: Position.h:107
float GetPositionY() const
Definition: Position.h:105
std::string ToString() const
Definition: Position.cpp:160
float GetPositionZ() const
Definition: Position.h:106
uint32_t uint32
Definition: Define.h:150
Battleground * GetBattleground(uint32 InstanceID, BattlegroundTypeId bgTypeId)
Definition: BattlegroundMgr.cpp:216
Definition: Position.h:27
Definition: Battleground.h:235
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207
float GetPositionX() const
Definition: Position.h:104

+ Here is the call graph for this function:

void BattlegroundMgr::SetHolidayWeekends ( uint32  mask)
726 {
727  // The current code supports battlegrounds up to BattlegroundTypeId(31)
728  for (uint32 bgtype = 1; bgtype < MAX_BATTLEGROUND_TYPE_ID && bgtype < 32; ++bgtype)
730  bg->SetHoliday((mask & (1 << bgtype)) != 0);
731 }
BattlegroundTypeId
Definition: SharedDefines.h:4558
#define MAX_BATTLEGROUND_TYPE_ID
Definition: SharedDefines.h:4591
Battleground * GetBattlegroundTemplate(BattlegroundTypeId bgTypeId)
Definition: BattlegroundMgr.cpp:247
uint32_t uint32
Definition: Define.h:150
Definition: Battleground.h:235

+ Here is the call graph for this function:

void BattlegroundMgr::ToggleArenaTesting ( )
720 {
723 }
#define sWorld
Definition: World.h:887
bool m_ArenaTesting
Definition: BattlegroundMgr.h:153
Definition: Language.h:741
Definition: Language.h:742
void BattlegroundMgr::ToggleTesting ( )
714 {
715  m_Testing = !m_Testing;
717 }
#define sWorld
Definition: World.h:887
Definition: Language.h:744
bool m_Testing
Definition: BattlegroundMgr.h:154
Definition: Language.h:743
void BattlegroundMgr::Update ( uint32  diff)
86 {
87  for (BattlegroundDataContainer::iterator itr1 = bgDataStore.begin(); itr1 != bgDataStore.end(); ++itr1)
88  {
89  BattlegroundContainer& bgs = itr1->second.m_Battlegrounds;
90  BattlegroundContainer::iterator itrDelete = bgs.begin();
91  // first one is template and should not be deleted
92  for (BattlegroundContainer::iterator itr = ++itrDelete; itr != bgs.end();)
93  {
94  itrDelete = itr++;
95  Battleground* bg = itrDelete->second;
96 
97  bg->Update(diff);
98  if (bg->ToBeDeleted())
99  {
100  itrDelete->second = NULL;
101  bgs.erase(itrDelete);
102  BattlegroundClientIdsContainer& clients = itr1->second.m_ClientBattlegroundIds[bg->GetBracketId()];
103  if (!clients.empty())
104  clients.erase(bg->GetClientInstanceID());
105 
106  delete bg;
107  }
108  }
109  }
110 
111  // update events timer
112  for (int qtype = BATTLEGROUND_QUEUE_NONE; qtype < MAX_BATTLEGROUND_QUEUE_TYPES; ++qtype)
113  m_BattlegroundQueues[qtype].UpdateEvents(diff);
114 
115  // update scheduled queues
116  if (!m_QueueUpdateScheduler.empty())
117  {
118  std::vector<uint64> scheduled;
119  std::swap(scheduled, m_QueueUpdateScheduler);
120 
121  for (uint8 i = 0; i < scheduled.size(); i++)
122  {
123  uint32 arenaMMRating = scheduled[i] >> 32;
124  uint8 arenaType = scheduled[i] >> 24 & 255;
125  BattlegroundQueueTypeId bgQueueTypeId = BattlegroundQueueTypeId(scheduled[i] >> 16 & 255);
126  BattlegroundTypeId bgTypeId = BattlegroundTypeId((scheduled[i] >> 8) & 255);
127  BattlegroundBracketId bracket_id = BattlegroundBracketId(scheduled[i] & 255);
128  m_BattlegroundQueues[bgQueueTypeId].BattlegroundQueueUpdate(diff, bgTypeId, bracket_id, arenaType, arenaMMRating > 0, arenaMMRating);
129  }
130  }
131 
132  // if rating difference counts, maybe force-update queues
134  {
135  // it's time to force update
136  if (m_NextRatedArenaUpdate < diff)
137  {
138  // forced update for rated arenas (scan all, but skipped non rated)
139  TC_LOG_TRACE("bg.arena", "BattlegroundMgr: UPDATING ARENA QUEUES");
140  for (int qtype = BATTLEGROUND_QUEUE_2v2; qtype <= BATTLEGROUND_QUEUE_5v5; ++qtype)
141  for (int bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket)
142  m_BattlegroundQueues[qtype].BattlegroundQueueUpdate(diff,
145 
147  }
148  else
149  m_NextRatedArenaUpdate -= diff;
150  }
151 }
BattlegroundQueue m_BattlegroundQueues[MAX_BATTLEGROUND_QUEUE_TYPES]
Definition: BattlegroundMgr.h:149
Definition: DBCEnums.h:63
BattlegroundTypeId
Definition: SharedDefines.h:4558
bool ToBeDeleted() const
Definition: Battleground.h:475
Definition: DBCEnums.h:59
Definition: SharedDefines.h:4566
Definition: Session.h:36
BattlegroundBracketId
Definition: DBCEnums.h:57
Definition: SharedDefines.h:4744
uint32 m_NextRatedArenaUpdate
Definition: BattlegroundMgr.h:152
arena_t NULL
Definition: jemalloc_internal.h:624
#define sWorld
Definition: World.h:887
Definition: SharedDefines.h:4747
Definition: SharedDefines.h:4746
std::vector< uint64 > m_QueueUpdateScheduler
Definition: BattlegroundMgr.h:151
void BattlegroundQueueUpdate(uint32 diff, BattlegroundTypeId bgTypeId, BattlegroundBracketId bracket_id, uint8 arenaType=0, bool isRated=false, uint32 minRating=0)
Definition: BattlegroundQueue.cpp:770
Definition: World.h:306
#define TC_LOG_TRACE(filterType__,...)
Definition: Log.h:195
uint32_t uint32
Definition: Define.h:150
Definition: SharedDefines.h:4734
BattlegroundBracketId GetBracketId() const
Definition: Battleground.h:264
std::map< uint32, Battleground * > BattlegroundContainer
Definition: BattlegroundMgr.h:27
BattlegroundDataContainer bgDataStore
Definition: BattlegroundMgr.h:147
uint32 GetClientInstanceID() const
Definition: Battleground.h:267
BattlegroundQueueTypeId
Definition: SharedDefines.h:4732
Definition: World.h:308
uint8_t uint8
Definition: Define.h:152
Definition: Battleground.h:235
static uint8 BGArenaType(BattlegroundQueueTypeId bgQueueTypeId)
Definition: BattlegroundMgr.cpp:698
std::set< uint32 > BattlegroundClientIdsContainer
Definition: BattlegroundMgr.h:28
void Update(uint32 diff)
Definition: Battleground.cpp:220

+ Here is the call graph for this function:

BattlegroundTypeId BattlegroundMgr::WeekendHolidayIdToBGType ( HolidayIds  holiday)
static
841 {
842  switch (holiday)
843  {
852  default: return BATTLEGROUND_TYPE_NONE;
853  }
854 }
Definition: SharedDefines.h:4572
Definition: SharedDefines.h:4563
Definition: SharedDefines.h:4569
Definition: SharedDefines.h:3722
Definition: SharedDefines.h:3723
Definition: SharedDefines.h:4562
Definition: SharedDefines.h:4567
Definition: SharedDefines.h:3741
Definition: SharedDefines.h:3737
Definition: SharedDefines.h:3744
Definition: SharedDefines.h:3724
Definition: SharedDefines.h:3745
Definition: SharedDefines.h:4561
Definition: SharedDefines.h:4560
Definition: SharedDefines.h:3731
Definition: SharedDefines.h:4578
Definition: SharedDefines.h:4577

+ Here is the caller graph for this function:

Member Data Documentation

BattlegroundMapTemplateContainer BattlegroundMgr::_battlegroundMapTemplates
private
BattlegroundTemplateMap BattlegroundMgr::_battlegroundTemplates
private
BattlegroundDataContainer BattlegroundMgr::bgDataStore
private
bool BattlegroundMgr::m_ArenaTesting
private
BattlegroundQueue BattlegroundMgr::m_BattlegroundQueues[MAX_BATTLEGROUND_QUEUE_TYPES]
private
uint32 BattlegroundMgr::m_NextRatedArenaUpdate
private
std::vector<uint64> BattlegroundMgr::m_QueueUpdateScheduler
private
bool BattlegroundMgr::m_Testing
private
BattleMastersMap BattlegroundMgr::mBattleMastersMap
private

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