mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 05:06:24 +00:00
refactor(Core/Game): restyle game lib with astyle (#3466)
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
/*********************************************************/
|
||||
|
||||
BattlegroundMgr::BattlegroundMgr() : m_ArenaTesting(false), m_Testing(false),
|
||||
m_lastClientVisibleInstanceId(0), m_NextAutoDistributionTime(0), m_AutoDistributionTimeChecker(0), m_NextPeriodicQueueUpdateTime(5*IN_MILLISECONDS)
|
||||
m_lastClientVisibleInstanceId(0), m_NextAutoDistributionTime(0), m_AutoDistributionTimeChecker(0), m_NextPeriodicQueueUpdateTime(5 * IN_MILLISECONDS)
|
||||
{
|
||||
for (uint32 qtype = BATTLEGROUND_QUEUE_NONE; qtype < MAX_BATTLEGROUND_QUEUE_TYPES; ++qtype)
|
||||
m_BattlegroundQueues[qtype].SetBgTypeIdAndArenaType(BGTemplateId(BattlegroundQueueTypeId(qtype)), BGArenaType(BattlegroundQueueTypeId(qtype)));
|
||||
@@ -124,7 +124,7 @@ void BattlegroundMgr::Update(uint32 diff)
|
||||
for (uint32 bracket = BG_BRACKET_ID_FIRST; bracket < MAX_BATTLEGROUND_BRACKETS; ++bracket)
|
||||
m_BattlegroundQueues[qtype].BattlegroundQueueUpdate(BattlegroundBracketId(bracket), false, 0);
|
||||
|
||||
m_NextPeriodicQueueUpdateTime = 5*IN_MILLISECONDS;
|
||||
m_NextPeriodicQueueUpdateTime = 5 * IN_MILLISECONDS;
|
||||
}
|
||||
else
|
||||
m_NextPeriodicQueueUpdateTime -= diff;
|
||||
@@ -143,7 +143,7 @@ void BattlegroundMgr::Update(uint32 diff)
|
||||
m_AutoDistributionTimeChecker = 600000; // 10 minutes check
|
||||
}
|
||||
else
|
||||
m_AutoDistributionTimeChecker -= diff;
|
||||
m_AutoDistributionTimeChecker -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,13 +154,13 @@ void BattlegroundMgr::BuildBattlegroundStatusPacket(WorldPacket* data, Battlegro
|
||||
|
||||
if (StatusID == STATUS_NONE || !bg)
|
||||
{
|
||||
data->Initialize(SMSG_BATTLEFIELD_STATUS, 4+8);
|
||||
data->Initialize(SMSG_BATTLEFIELD_STATUS, 4 + 8);
|
||||
*data << uint32(QueueSlot);
|
||||
*data << uint64(0);
|
||||
return;
|
||||
}
|
||||
|
||||
data->Initialize(SMSG_BATTLEFIELD_STATUS, (4+8+1+1+4+1+4+4+4));
|
||||
data->Initialize(SMSG_BATTLEFIELD_STATUS, (4 + 8 + 1 + 1 + 4 + 1 + 4 + 4 + 4));
|
||||
*data << uint32(QueueSlot);
|
||||
// The following segment is read as uint64 in client but can be appended as their original type.
|
||||
*data << uint8(arenatype);
|
||||
@@ -203,13 +203,13 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
|
||||
{
|
||||
uint8 type = (bg->isArena() ? 1 : 0);
|
||||
|
||||
data->Initialize(MSG_PVP_LOG_DATA, (1+1+4+40*bg->GetPlayerScoresSize()));
|
||||
data->Initialize(MSG_PVP_LOG_DATA, (1 + 1 + 4 + 40 * bg->GetPlayerScoresSize()));
|
||||
*data << uint8(type); // type (battleground=0/arena=1)
|
||||
|
||||
if (type) // arena
|
||||
{
|
||||
// it seems this must be according to BG_WINNER_A/H and _NOT_ TEAM_A/H
|
||||
for (TeamId iTeamId = TEAM_ALLIANCE; iTeamId <= TEAM_HORDE; iTeamId = TeamId(iTeamId+1))
|
||||
for (TeamId iTeamId = TEAM_ALLIANCE; iTeamId <= TEAM_HORDE; iTeamId = TeamId(iTeamId + 1))
|
||||
{
|
||||
// Xinef: oryginally this was looping in reverse order, loop order was changed so we have to change checked teamId
|
||||
int32 rating_change = bg->GetArenaTeamRatingChangeForTeam(Battleground::GetOtherTeamId(iTeamId));
|
||||
@@ -222,10 +222,10 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
|
||||
*data << uint32(pointsGained); // Rating gained
|
||||
*data << uint32(MatchmakerRating); // Matchmaking Value
|
||||
}
|
||||
for (TeamId iTeamId = TEAM_ALLIANCE; iTeamId <= TEAM_HORDE; iTeamId = TeamId(iTeamId+1))
|
||||
for (TeamId iTeamId = TEAM_ALLIANCE; iTeamId <= TEAM_HORDE; iTeamId = TeamId(iTeamId + 1))
|
||||
{
|
||||
if (ArenaTeam* at = sArenaTeamMgr->GetArenaTeamById(bg->GetArenaTeamIdForTeam(Battleground::GetOtherTeamId(iTeamId))))
|
||||
*data << at->GetName();
|
||||
* data << at->GetName();
|
||||
else
|
||||
*data << uint8(0);
|
||||
}
|
||||
@@ -362,9 +362,9 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
|
||||
break;
|
||||
}
|
||||
// should never happen
|
||||
if (++scoreCount >= bg->GetMaxPlayersPerTeam()*2 && itr != bg->GetPlayerScoresEnd())
|
||||
if (++scoreCount >= bg->GetMaxPlayersPerTeam() * 2 && itr != bg->GetPlayerScoresEnd())
|
||||
{
|
||||
sLog->outMisc("Battleground %u scoreboard has more entries (%u) than allowed players in this bg (%u)", bgTypeId, bg->GetPlayerScoresSize(), bg->GetMaxPlayersPerTeam()*2);
|
||||
sLog->outMisc("Battleground %u scoreboard has more entries (%u) than allowed players in this bg (%u)", bgTypeId, bg->GetPlayerScoresSize(), bg->GetMaxPlayersPerTeam() * 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -382,7 +382,7 @@ void BattlegroundMgr::BuildGroupJoinedBattlegroundPacket(WorldPacket* data, Grou
|
||||
|
||||
void BattlegroundMgr::BuildUpdateWorldStatePacket(WorldPacket* data, uint32 field, uint32 value)
|
||||
{
|
||||
data->Initialize(SMSG_UPDATE_WORLD_STATE, 4+4);
|
||||
data->Initialize(SMSG_UPDATE_WORLD_STATE, 4 + 4);
|
||||
*data << uint32(field);
|
||||
*data << uint32(value);
|
||||
}
|
||||
@@ -412,7 +412,7 @@ Battleground* BattlegroundMgr::GetBattleground(uint32 instanceId)
|
||||
|
||||
BattlegroundContainer::const_iterator itr = m_Battlegrounds.find(instanceId);
|
||||
if (itr != m_Battlegrounds.end())
|
||||
return itr->second;
|
||||
return itr->second;
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
@@ -446,7 +446,8 @@ Battleground* BattlegroundMgr::CreateNewBattleground(BattlegroundTypeId original
|
||||
|
||||
Battleground* bg = nullptr;
|
||||
// create a copy of the BG template
|
||||
if (BattlegroundMgr::bgTypeToTemplate.find(bgTypeId) == BattlegroundMgr::bgTypeToTemplate.end()) {
|
||||
if (BattlegroundMgr::bgTypeToTemplate.find(bgTypeId) == BattlegroundMgr::bgTypeToTemplate.end())
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -572,14 +573,14 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
if (data.MaxPlayersPerTeam == 0 || data.MinPlayersPerTeam > data.MaxPlayersPerTeam)
|
||||
{
|
||||
sLog->outError("Table `battleground_template` for id %u has bad values for MinPlayersPerTeam (%u) and MaxPlayersPerTeam(%u)",
|
||||
data.bgTypeId, data.MinPlayersPerTeam, data.MaxPlayersPerTeam);
|
||||
data.bgTypeId, data.MinPlayersPerTeam, data.MaxPlayersPerTeam);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (data.LevelMin == 0 || data.LevelMax == 0 || data.LevelMin > data.LevelMax)
|
||||
{
|
||||
sLog->outError("Table `battleground_template` for id %u has bad values for LevelMin (%u) and LevelMax(%u)",
|
||||
data.bgTypeId, data.LevelMin, data.LevelMax);
|
||||
data.bgTypeId, data.LevelMin, data.LevelMax);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -634,8 +635,7 @@ void BattlegroundMgr::CreateInitialBattlegrounds()
|
||||
_battlegroundMapTemplates[bl->mapid[0]] = &_battlegroundTemplates[BattlegroundTypeId(bgTypeId)];
|
||||
|
||||
++count;
|
||||
}
|
||||
while (result->NextRow());
|
||||
} while (result->NextRow());
|
||||
|
||||
sLog->outString(">> Loaded %u battlegrounds in %u ms", count, GetMSTimeDiffToNow(oldMSTime));
|
||||
}
|
||||
@@ -655,7 +655,7 @@ void BattlegroundMgr::InitAutomaticArenaPointDistribution()
|
||||
}
|
||||
else
|
||||
m_NextAutoDistributionTime = wstime;
|
||||
sLog->outString("AzerothCore Battleground: Automatic Arena Point Distribution initialized.");
|
||||
sLog->outString("AzerothCore Battleground: Automatic Arena Point Distribution initialized.");
|
||||
}
|
||||
|
||||
void BattlegroundMgr::BuildBattlegroundListPacket(WorldPacket* data, uint64 guid, Player* player, BattlegroundTypeId bgTypeId, uint8 fromWhere)
|
||||
@@ -739,17 +739,19 @@ void BattlegroundMgr::SendAreaSpiritHealerQueryOpcode(Player* player, Battlegrou
|
||||
bool BattlegroundMgr::IsArenaType(BattlegroundTypeId bgTypeId)
|
||||
{
|
||||
return bgTypeId == BATTLEGROUND_AA
|
||||
|| bgTypeId == BATTLEGROUND_BE
|
||||
|| bgTypeId == BATTLEGROUND_NA
|
||||
|| bgTypeId == BATTLEGROUND_DS
|
||||
|| bgTypeId == BATTLEGROUND_RV
|
||||
|| bgTypeId == BATTLEGROUND_RL;
|
||||
|| bgTypeId == BATTLEGROUND_BE
|
||||
|| bgTypeId == BATTLEGROUND_NA
|
||||
|| bgTypeId == BATTLEGROUND_DS
|
||||
|| bgTypeId == BATTLEGROUND_RV
|
||||
|| bgTypeId == BATTLEGROUND_RL;
|
||||
}
|
||||
|
||||
BattlegroundQueueTypeId BattlegroundMgr::BGQueueTypeId(BattlegroundTypeId bgTypeId, uint8 arenaType)
|
||||
{
|
||||
if (arenaType) {
|
||||
switch (arenaType) {
|
||||
if (arenaType)
|
||||
{
|
||||
switch (arenaType)
|
||||
{
|
||||
case ARENA_TYPE_2v2:
|
||||
return BATTLEGROUND_QUEUE_2v2;
|
||||
case ARENA_TYPE_3v3:
|
||||
@@ -761,7 +763,8 @@ BattlegroundQueueTypeId BattlegroundMgr::BGQueueTypeId(BattlegroundTypeId bgType
|
||||
}
|
||||
}
|
||||
|
||||
if (BattlegroundMgr::bgToQueue.find(bgTypeId) == BattlegroundMgr::bgToQueue.end()) {
|
||||
if (BattlegroundMgr::bgToQueue.find(bgTypeId) == BattlegroundMgr::bgToQueue.end())
|
||||
{
|
||||
return BATTLEGROUND_QUEUE_NONE;
|
||||
}
|
||||
|
||||
@@ -770,7 +773,8 @@ BattlegroundQueueTypeId BattlegroundMgr::BGQueueTypeId(BattlegroundTypeId bgType
|
||||
|
||||
BattlegroundTypeId BattlegroundMgr::BGTemplateId(BattlegroundQueueTypeId bgQueueTypeId)
|
||||
{
|
||||
if (BattlegroundMgr::queueToBg.find(bgQueueTypeId) == BattlegroundMgr::queueToBg.end()) {
|
||||
if (BattlegroundMgr::queueToBg.find(bgQueueTypeId) == BattlegroundMgr::queueToBg.end())
|
||||
{
|
||||
return BattlegroundTypeId(0);
|
||||
}
|
||||
|
||||
@@ -891,8 +895,7 @@ void BattlegroundMgr::LoadBattleMastersEntry()
|
||||
}
|
||||
|
||||
mBattleMastersMap[entry] = BattlegroundTypeId(bgTypeId);
|
||||
}
|
||||
while (result->NextRow());
|
||||
} while (result->NextRow());
|
||||
|
||||
CheckBattleMasters();
|
||||
|
||||
@@ -917,13 +920,20 @@ HolidayIds BattlegroundMgr::BGTypeToWeekendHolidayId(BattlegroundTypeId bgTypeId
|
||||
{
|
||||
switch (bgTypeId)
|
||||
{
|
||||
case BATTLEGROUND_AV: return HOLIDAY_CALL_TO_ARMS_AV;
|
||||
case BATTLEGROUND_EY: return HOLIDAY_CALL_TO_ARMS_EY;
|
||||
case BATTLEGROUND_WS: return HOLIDAY_CALL_TO_ARMS_WS;
|
||||
case BATTLEGROUND_SA: return HOLIDAY_CALL_TO_ARMS_SA;
|
||||
case BATTLEGROUND_AB: return HOLIDAY_CALL_TO_ARMS_AB;
|
||||
case BATTLEGROUND_IC: return HOLIDAY_CALL_TO_ARMS_IC;
|
||||
default: return HOLIDAY_NONE;
|
||||
case BATTLEGROUND_AV:
|
||||
return HOLIDAY_CALL_TO_ARMS_AV;
|
||||
case BATTLEGROUND_EY:
|
||||
return HOLIDAY_CALL_TO_ARMS_EY;
|
||||
case BATTLEGROUND_WS:
|
||||
return HOLIDAY_CALL_TO_ARMS_WS;
|
||||
case BATTLEGROUND_SA:
|
||||
return HOLIDAY_CALL_TO_ARMS_SA;
|
||||
case BATTLEGROUND_AB:
|
||||
return HOLIDAY_CALL_TO_ARMS_AB;
|
||||
case BATTLEGROUND_IC:
|
||||
return HOLIDAY_CALL_TO_ARMS_IC;
|
||||
default:
|
||||
return HOLIDAY_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -931,13 +941,20 @@ BattlegroundTypeId BattlegroundMgr::WeekendHolidayIdToBGType(HolidayIds holiday)
|
||||
{
|
||||
switch (holiday)
|
||||
{
|
||||
case HOLIDAY_CALL_TO_ARMS_AV: return BATTLEGROUND_AV;
|
||||
case HOLIDAY_CALL_TO_ARMS_EY: return BATTLEGROUND_EY;
|
||||
case HOLIDAY_CALL_TO_ARMS_WS: return BATTLEGROUND_WS;
|
||||
case HOLIDAY_CALL_TO_ARMS_SA: return BATTLEGROUND_SA;
|
||||
case HOLIDAY_CALL_TO_ARMS_AB: return BATTLEGROUND_AB;
|
||||
case HOLIDAY_CALL_TO_ARMS_IC: return BATTLEGROUND_IC;
|
||||
default: return BATTLEGROUND_TYPE_NONE;
|
||||
case HOLIDAY_CALL_TO_ARMS_AV:
|
||||
return BATTLEGROUND_AV;
|
||||
case HOLIDAY_CALL_TO_ARMS_EY:
|
||||
return BATTLEGROUND_EY;
|
||||
case HOLIDAY_CALL_TO_ARMS_WS:
|
||||
return BATTLEGROUND_WS;
|
||||
case HOLIDAY_CALL_TO_ARMS_SA:
|
||||
return BATTLEGROUND_SA;
|
||||
case HOLIDAY_CALL_TO_ARMS_AB:
|
||||
return BATTLEGROUND_AB;
|
||||
case HOLIDAY_CALL_TO_ARMS_IC:
|
||||
return BATTLEGROUND_IC;
|
||||
default:
|
||||
return BATTLEGROUND_TYPE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1052,7 +1069,8 @@ void BattlegroundMgr::InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg, T
|
||||
|
||||
// init/update unordered_map
|
||||
// Battlegrounds
|
||||
std::unordered_map<int, BattlegroundQueueTypeId> BattlegroundMgr::bgToQueue = {
|
||||
std::unordered_map<int, BattlegroundQueueTypeId> BattlegroundMgr::bgToQueue =
|
||||
{
|
||||
{ BATTLEGROUND_AV, BATTLEGROUND_QUEUE_AV},
|
||||
{ BATTLEGROUND_WS, BATTLEGROUND_QUEUE_WS},
|
||||
{ BATTLEGROUND_AB, BATTLEGROUND_QUEUE_AB},
|
||||
@@ -1069,7 +1087,8 @@ std::unordered_map<int, BattlegroundQueueTypeId> BattlegroundMgr::bgToQueue = {
|
||||
{ BATTLEGROUND_RV, BattlegroundQueueTypeId(0)}, // Ring of Valor
|
||||
};
|
||||
|
||||
std::unordered_map<int, BattlegroundTypeId> BattlegroundMgr::queueToBg = {
|
||||
std::unordered_map<int, BattlegroundTypeId> BattlegroundMgr::queueToBg =
|
||||
{
|
||||
{ BATTLEGROUND_QUEUE_NONE, BATTLEGROUND_TYPE_NONE },
|
||||
{ BATTLEGROUND_QUEUE_AV, BATTLEGROUND_AV },
|
||||
{ BATTLEGROUND_QUEUE_WS, BATTLEGROUND_WS },
|
||||
@@ -1083,7 +1102,8 @@ std::unordered_map<int, BattlegroundTypeId> BattlegroundMgr::queueToBg = {
|
||||
{ BATTLEGROUND_QUEUE_5v5, BATTLEGROUND_AA },
|
||||
};
|
||||
|
||||
std::unordered_map<int, Battleground*> BattlegroundMgr::bgtypeToBattleground = {
|
||||
std::unordered_map<int, Battleground*> BattlegroundMgr::bgtypeToBattleground =
|
||||
{
|
||||
{ BATTLEGROUND_AV, new BattlegroundAV },
|
||||
{ BATTLEGROUND_WS, new BattlegroundWS },
|
||||
{ BATTLEGROUND_AB, new BattlegroundAB },
|
||||
@@ -1099,29 +1119,31 @@ std::unordered_map<int, Battleground*> BattlegroundMgr::bgtypeToBattleground = {
|
||||
{ BATTLEGROUND_RB, new Battleground },
|
||||
};
|
||||
|
||||
std::unordered_map<int, bgRef> BattlegroundMgr::bgTypeToTemplate = {
|
||||
{ BATTLEGROUND_AV, [](Battleground *bg_t) -> Battleground*{ return new BattlegroundAV(*(BattlegroundAV*)bg_t); } },
|
||||
{ BATTLEGROUND_WS, [](Battleground *bg_t) -> Battleground*{ return new BattlegroundWS(*(BattlegroundWS*)bg_t); } },
|
||||
{ BATTLEGROUND_AB, [](Battleground *bg_t) -> Battleground*{ return new BattlegroundAB(*(BattlegroundAB*)bg_t); } },
|
||||
{ BATTLEGROUND_NA, [](Battleground *bg_t) -> Battleground*{ return new BattlegroundNA(*(BattlegroundNA*)bg_t); } },
|
||||
{ BATTLEGROUND_BE, [](Battleground *bg_t) -> Battleground*{ return new BattlegroundBE(*(BattlegroundBE*)bg_t); } },
|
||||
{ BATTLEGROUND_EY, [](Battleground *bg_t) -> Battleground*{ return new BattlegroundEY(*(BattlegroundEY*)bg_t); } },
|
||||
{ BATTLEGROUND_RL, [](Battleground *bg_t) -> Battleground*{ return new BattlegroundRL(*(BattlegroundRL*)bg_t); } },
|
||||
{ BATTLEGROUND_SA, [](Battleground *bg_t) -> Battleground*{ return new BattlegroundSA(*(BattlegroundSA*)bg_t); } },
|
||||
{ BATTLEGROUND_DS, [](Battleground *bg_t) -> Battleground*{ return new BattlegroundDS(*(BattlegroundDS*)bg_t); } },
|
||||
{ BATTLEGROUND_RV, [](Battleground *bg_t) -> Battleground*{ return new BattlegroundRV(*(BattlegroundRV*)bg_t); } },
|
||||
{ BATTLEGROUND_IC, [](Battleground *bg_t) -> Battleground*{ return new BattlegroundIC(*(BattlegroundIC*)bg_t); } },
|
||||
std::unordered_map<int, bgRef> BattlegroundMgr::bgTypeToTemplate =
|
||||
{
|
||||
{ BATTLEGROUND_AV, [](Battleground * bg_t) -> Battleground* { return new BattlegroundAV(*(BattlegroundAV*)bg_t); } },
|
||||
{ BATTLEGROUND_WS, [](Battleground * bg_t) -> Battleground* { return new BattlegroundWS(*(BattlegroundWS*)bg_t); } },
|
||||
{ BATTLEGROUND_AB, [](Battleground * bg_t) -> Battleground* { return new BattlegroundAB(*(BattlegroundAB*)bg_t); } },
|
||||
{ BATTLEGROUND_NA, [](Battleground * bg_t) -> Battleground* { return new BattlegroundNA(*(BattlegroundNA*)bg_t); } },
|
||||
{ BATTLEGROUND_BE, [](Battleground * bg_t) -> Battleground* { return new BattlegroundBE(*(BattlegroundBE*)bg_t); } },
|
||||
{ BATTLEGROUND_EY, [](Battleground * bg_t) -> Battleground* { return new BattlegroundEY(*(BattlegroundEY*)bg_t); } },
|
||||
{ BATTLEGROUND_RL, [](Battleground * bg_t) -> Battleground* { return new BattlegroundRL(*(BattlegroundRL*)bg_t); } },
|
||||
{ BATTLEGROUND_SA, [](Battleground * bg_t) -> Battleground* { return new BattlegroundSA(*(BattlegroundSA*)bg_t); } },
|
||||
{ BATTLEGROUND_DS, [](Battleground * bg_t) -> Battleground* { return new BattlegroundDS(*(BattlegroundDS*)bg_t); } },
|
||||
{ BATTLEGROUND_RV, [](Battleground * bg_t) -> Battleground* { return new BattlegroundRV(*(BattlegroundRV*)bg_t); } },
|
||||
{ BATTLEGROUND_IC, [](Battleground * bg_t) -> Battleground* { return new BattlegroundIC(*(BattlegroundIC*)bg_t); } },
|
||||
|
||||
{ BATTLEGROUND_RB, [](Battleground *bg_t) -> Battleground*{ return new Battleground(*bg_t); }, },
|
||||
{ BATTLEGROUND_AA, [](Battleground *bg_t) -> Battleground*{ return new Battleground(*bg_t); }, },
|
||||
{ BATTLEGROUND_RB, [](Battleground * bg_t) -> Battleground* { return new Battleground(*bg_t); }, },
|
||||
{ BATTLEGROUND_AA, [](Battleground * bg_t) -> Battleground* { return new Battleground(*bg_t); }, },
|
||||
};
|
||||
|
||||
std::unordered_map<int, bgMapRef> BattlegroundMgr::getBgFromMap = {};
|
||||
|
||||
std::unordered_map<int, bgTypeRef> BattlegroundMgr::getBgFromTypeID = {
|
||||
std::unordered_map<int, bgTypeRef> BattlegroundMgr::getBgFromTypeID =
|
||||
{
|
||||
{
|
||||
BATTLEGROUND_RB,
|
||||
[](WorldPacket* data, Battleground::BattlegroundScoreMap::const_iterator itr2, Battleground* bg)
|
||||
[](WorldPacket * data, Battleground::BattlegroundScoreMap::const_iterator itr2, Battleground * bg)
|
||||
{
|
||||
if (BattlegroundMgr::getBgFromMap.find(bg->GetMapId()) == BattlegroundMgr::getBgFromMap.end()) // this should not happen
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user