diff options
21 files changed, 106 insertions, 99 deletions
diff --git a/src/server/game/Battlefield/Battlefield.cpp b/src/server/game/Battlefield/Battlefield.cpp index b9f39d4988d..937cc7ee86b 100644 --- a/src/server/game/Battlefield/Battlefield.cpp +++ b/src/server/game/Battlefield/Battlefield.cpp @@ -167,13 +167,13 @@ bool Battlefield::Update(uint32 diff) if (m_uiKickDontAcceptTimer <= diff) { time_t now = GameTime::GetGameTime(); - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) for (PlayerTimerMap::iterator itr = m_InvitedPlayers[team].begin(); itr != m_InvitedPlayers[team].end(); ++itr) if (itr->second <= now) KickPlayerFromBattlefield(itr->first); InvitePlayersInZoneToWar(); - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) for (PlayerTimerMap::iterator itr = m_PlayersWillBeKick[team].begin(); itr != m_PlayersWillBeKick[team].end(); ++itr) if (itr->second <= now) KickPlayerFromBattlefield(itr->first); @@ -204,7 +204,7 @@ bool Battlefield::Update(uint32 diff) void Battlefield::InvitePlayersInZoneToQueue() { - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) for (auto itr = m_players[team].begin(); itr != m_players[team].end(); ++itr) if (Player* player = ObjectAccessor::FindPlayer(*itr)) InvitePlayerToQueue(player); @@ -221,7 +221,7 @@ void Battlefield::InvitePlayerToQueue(Player* player) void Battlefield::InvitePlayersInQueueToWar() { - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) { for (auto itr = m_PlayersInQueue[team].begin(); itr != m_PlayersInQueue[team].end(); ++itr) { @@ -241,7 +241,7 @@ void Battlefield::InvitePlayersInQueueToWar() void Battlefield::InvitePlayersInZoneToWar() { - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) { for (auto itr = m_players[team].begin(); itr != m_players[team].end(); ++itr) { @@ -305,7 +305,7 @@ void Battlefield::InitStalker(uint32 entry, Position const& pos) void Battlefield::KickAfkPlayers() { - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) for (auto itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr) if (Player* player = ObjectAccessor::FindPlayer(*itr)) if (player->isAFK()) @@ -324,7 +324,7 @@ void Battlefield::StartBattle() if (m_isActive) return; - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) { m_PlayersInWar[team].clear(); m_Groups[team].clear(); @@ -429,7 +429,7 @@ void Battlefield::TeamCastSpell(TeamId team, int32 spellId) void Battlefield::BroadcastPacketToZone(WorldPacket const* data) const { - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) for (auto itr = m_players[team].begin(); itr != m_players[team].end(); ++itr) if (Player* player = ObjectAccessor::FindPlayer(*itr)) player->SendDirectMessage(data); @@ -437,7 +437,7 @@ void Battlefield::BroadcastPacketToZone(WorldPacket const* data) const void Battlefield::BroadcastPacketToQueue(WorldPacket const* data) const { - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) for (auto itr = m_PlayersInQueue[team].begin(); itr != m_PlayersInQueue[team].end(); ++itr) if (Player* player = ObjectAccessor::FindConnectedPlayer(*itr)) player->SendDirectMessage(data); @@ -445,7 +445,7 @@ void Battlefield::BroadcastPacketToQueue(WorldPacket const* data) const void Battlefield::BroadcastPacketToWar(WorldPacket const* data) const { - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) for (auto itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr) if (Player* player = ObjectAccessor::FindPlayer(*itr)) player->SendDirectMessage(data); @@ -982,7 +982,7 @@ bool BfCapturePoint::Update(uint32 diff) { float radius = capturePoint->GetGOInfo()->controlZone.radius; - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) { for (GuidSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end();) { @@ -1097,7 +1097,7 @@ bool BfCapturePoint::Update(uint32 diff) void BfCapturePoint::SendUpdateWorldState(uint32 field, uint32 value) { - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) for (GuidSet::iterator itr = m_activePlayers[team].begin(); itr != m_activePlayers[team].end(); ++itr) // send to all players present in the area if (Player* player = ObjectAccessor::FindPlayer(*itr)) player->SendUpdateWorldState(field, value); diff --git a/src/server/game/Battlefield/Battlefield.h b/src/server/game/Battlefield/Battlefield.h index 80bb14ab40b..192340e7e31 100644 --- a/src/server/game/Battlefield/Battlefield.h +++ b/src/server/game/Battlefield/Battlefield.h @@ -129,7 +129,7 @@ class TC_GAME_API BfCapturePoint protected: // active Players in the area of the objective, 0 - alliance, 1 - horde - GuidSet m_activePlayers[BG_TEAMS_COUNT]; + GuidSet m_activePlayers[PVP_TEAMS_COUNT]; // Total shift needed to capture the objective float m_maxValue; @@ -202,7 +202,7 @@ class TC_GAME_API BfGraveyard protected: TeamId m_ControlTeam; uint32 m_GraveyardId; - ObjectGuid m_SpiritGuide[BG_TEAMS_COUNT]; + ObjectGuid m_SpiritGuide[PVP_TEAMS_COUNT]; GuidSet m_ResurrectQueue; Battlefield* m_Bf; }; @@ -379,11 +379,11 @@ class TC_GAME_API Battlefield : public ZoneScript BfCapturePointMap m_capturePoints; // Players info maps - GuidUnorderedSet m_players[BG_TEAMS_COUNT]; // Players in zone - GuidUnorderedSet m_PlayersInQueue[BG_TEAMS_COUNT]; // Players in the queue - GuidUnorderedSet m_PlayersInWar[BG_TEAMS_COUNT]; // Players in WG combat - PlayerTimerMap m_InvitedPlayers[BG_TEAMS_COUNT]; - PlayerTimerMap m_PlayersWillBeKick[BG_TEAMS_COUNT]; + GuidUnorderedSet m_players[PVP_TEAMS_COUNT]; // Players in zone + GuidUnorderedSet m_PlayersInQueue[PVP_TEAMS_COUNT]; // Players in the queue + GuidUnorderedSet m_PlayersInWar[PVP_TEAMS_COUNT]; // Players in WG combat + PlayerTimerMap m_InvitedPlayers[PVP_TEAMS_COUNT]; + PlayerTimerMap m_PlayersWillBeKick[PVP_TEAMS_COUNT]; // Variables that must exist for each battlefield uint32 m_TypeId; // See enum BattlefieldTypes @@ -410,7 +410,7 @@ class TC_GAME_API Battlefield : public ZoneScript uint32 m_StartGroupingTimer; // Timer for invite players in area 15 minute before start battle bool m_StartGrouping; // bool for know if all players in area has been invited - GuidUnorderedSet m_Groups[BG_TEAMS_COUNT]; // Contain different raid group + GuidUnorderedSet m_Groups[PVP_TEAMS_COUNT]; // Contain different raid group std::vector<uint64> m_Data64; std::vector<uint32> m_Data32; diff --git a/src/server/game/Battlefield/Zones/BattlefieldTB.cpp b/src/server/game/Battlefield/Zones/BattlefieldTB.cpp index 81ac01277e9..ca7193c6cc9 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldTB.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldTB.cpp @@ -382,7 +382,7 @@ void BattlefieldTB::SendInitWorldStatesToAll() sWorld->setWorldState(TB_WS_TIME_NEXT_BATTLE_SHOW, uint32(!IsWarTime() ? 1 : 0)); // Tol Barad - for (uint8 team = 0; team < BG_TEAMS_COUNT; team++) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; team++) for (ObjectGuid const& guid : m_players[team]) if (Player* player = ObjectAccessor::FindPlayer(guid)) SendInitWorldStatesTo(player); @@ -402,7 +402,7 @@ void BattlefieldTB::OnStartGrouping() SendUpdateWorldState(TB_WS_STATE_PREPARATIONS, uint32(1)); // Teleport players out of questing area - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) for (ObjectGuid const& guid : m_players[team]) if (Player* player = ObjectAccessor::FindPlayer(guid)) if (player->GetAreaId() == TBQuestAreas[m_iCellblockRandom].entry) diff --git a/src/server/game/Battlefield/Zones/BattlefieldTB.h b/src/server/game/Battlefield/Zones/BattlefieldTB.h index 24825ee0b1e..2b4e467088e 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldTB.h +++ b/src/server/game/Battlefield/Zones/BattlefieldTB.h @@ -279,7 +279,7 @@ enum TolBaradEvent EVENT_COUNT_CAPTURED_BASE = 1, }; -const uint32 TBFactions[BG_TEAMS_COUNT] = { 1610, 1732 }; +const uint32 TBFactions[PVP_TEAMS_COUNT] = { 1610, 1732 }; // Stalker Position const TolBaradDebugAnnouncerPos = { -1234.25f, 961.903f, 159.4913f, 0.0f }; @@ -298,7 +298,7 @@ enum TBQuestInfantryEntry NPC_HORDE_SHAMAN_INFANTRY = 47610, }; -uint32 const TB_QUEST_INFANTRY[BG_TEAMS_COUNT][4] = +uint32 const TB_QUEST_INFANTRY[PVP_TEAMS_COUNT][4] = { { NPC_HORDE_DRUID_INFANTRY, NPC_HORDE_MAGE_INFANTRY, NPC_HORDE_ROGUE_INFANTRY, NPC_HORDE_SHAMAN_INFANTRY }, { NPC_ALLIANCE_WARRIOR_INFANTRY, NPC_ALLIANCE_PALADIN_INFANTRY, NPC_ALLIANCE_HUNTER_INFANTRY, NPC_ALLIANCE_MAGE_INFANTRY }, @@ -444,7 +444,7 @@ TBQuestAreaInfo const TBQuestAreas[CELLBLOCK_MAX] = { AREA_D_BLOCK, SPELL_TB_D_BLOCK_TELEPORT }, { AREA_CURSED_DEPTHS, SPELL_TB_CURSED_DEPTHS_TELEPORT }, }; -uint32 const RandomQuestgivers[BG_TEAMS_COUNT][CELLBLOCK_MAX] = +uint32 const RandomQuestgivers[PVP_TEAMS_COUNT][CELLBLOCK_MAX] = { { NPC_MARSHAL_FALLOWS, NPC_2ND_LIEUTENANT_WANSWORTH, NPC_COMMANDER_STEVENS }, { NPC_DRILLMASTER_RAZGOTH, NPC_STAFF_SERGEANT_LAZGAR, NPC_PRIVATE_GARNOTH }, @@ -493,8 +493,8 @@ struct TBTowerInfo uint32 entry; uint32 textDamaged; uint32 textDestroyed; - uint32 wsIntact[BG_TEAMS_COUNT]; - uint32 wsDamaged[BG_TEAMS_COUNT]; + uint32 wsIntact[PVP_TEAMS_COUNT]; + uint32 wsDamaged[PVP_TEAMS_COUNT]; uint32 wsDestroyed; }; @@ -529,7 +529,7 @@ enum TBFactionBannerEntry GO_HELLSCREAM_REACH_BANNER = 207400, // Horde banner }; -uint32 const TBBannerEntry[BG_TEAMS_COUNT] = { GO_BARADINS_WARDEN_BANNER, GO_HELLSCREAM_REACH_BANNER }; +uint32 const TBBannerEntry[PVP_TEAMS_COUNT] = { GO_BARADINS_WARDEN_BANNER, GO_HELLSCREAM_REACH_BANNER }; uint8 const TB_BANNER_MAX = 23; Position const TBBanners[TB_BANNER_MAX] = @@ -566,7 +566,7 @@ enum TBPortalEntry TB_PORTAL_HORDE = 208226, // Portal to Orgrimmar }; -uint32 const TBPortalEntry[BG_TEAMS_COUNT] = { TB_PORTAL_ALLIANCE, TB_PORTAL_HORDE }; +uint32 const TBPortalEntry[PVP_TEAMS_COUNT] = { TB_PORTAL_ALLIANCE, TB_PORTAL_HORDE }; uint8 const TB_PORTAL_MAX = 2; Position const TBPortals[TB_PORTAL_MAX] = @@ -601,7 +601,7 @@ struct TBGraveyardInfo Position pos; uint32 phaseId; uint32 gyid; - uint32 spiritEntry[BG_TEAMS_COUNT]; + uint32 spiritEntry[PVP_TEAMS_COUNT]; bool defenderControls; }; diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp index 86523f17ed2..909229a1f7d 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.cpp +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.cpp @@ -601,7 +601,7 @@ void BattlefieldWG::OnBattleStart() for (WintergraspWorkshop* workshop : Workshops) workshop->UpdateGraveyardAndWorkshop(); - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) { for (auto itr = m_players[team].begin(); itr != m_players[team].end(); ++itr) { @@ -718,7 +718,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer) if (Player* player = ObjectAccessor::FindPlayer(*itr)) player->CastSpell(player, SPELL_DEFEAT_REWARD, true); - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) { for (auto itr = m_PlayersInWar[team].begin(); itr != m_PlayersInWar[team].end(); ++itr) if (Player* player = ObjectAccessor::FindPlayer(*itr)) @@ -736,7 +736,7 @@ void BattlefieldWG::OnBattleEnd(bool endByTimer) if (!endByTimer) { - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) { for (auto itr = m_players[team].begin(); itr != m_players[team].end(); ++itr) { @@ -973,7 +973,7 @@ void BattlefieldWG::HandleKill(Player* killer, Unit* victim) bool BattlefieldWG::FindAndRemoveVehicleFromList(Unit* vehicle) { - for (uint32 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint32 team = 0; team < PVP_TEAMS_COUNT; ++team) { auto itr = m_vehicles[team].find(vehicle->GetGUID()); if (itr != m_vehicles[team].end()) @@ -1185,7 +1185,7 @@ void BattlefieldWG::SendInitWorldStatesTo(Player* player) void BattlefieldWG::SendInitWorldStatesToAll() { - for (uint8 team = 0; team < BG_TEAMS_COUNT; ++team) + for (uint8 team = 0; team < PVP_TEAMS_COUNT; ++team) for (auto itr = m_players[team].begin(); itr != m_players[team].end(); ++itr) if (Player* player = ObjectAccessor::FindPlayer(*itr)) SendInitWorldStatesTo(player); diff --git a/src/server/game/Battlefield/Zones/BattlefieldWG.h b/src/server/game/Battlefield/Zones/BattlefieldWG.h index c88e5556a0a..85290d7c6d0 100644 --- a/src/server/game/Battlefield/Zones/BattlefieldWG.h +++ b/src/server/game/Battlefield/Zones/BattlefieldWG.h @@ -387,10 +387,10 @@ class TC_GAME_API BattlefieldWG : public Battlefield WorkshopVect Workshops; - GuidVector DefenderPortalList[BG_TEAMS_COUNT]; + GuidVector DefenderPortalList[PVP_TEAMS_COUNT]; GameObjectBuildingVect BuildingsInZone; - GuidUnorderedSet m_vehicles[BG_TEAMS_COUNT]; + GuidUnorderedSet m_vehicles[PVP_TEAMS_COUNT]; GuidVector CanonList; TeamId m_tenacityTeam; @@ -557,11 +557,11 @@ private: StaticWintergraspTowerInfo const* _staticTowerInfo; // GameObject associations - GuidVector m_GameObjectList[BG_TEAMS_COUNT]; + GuidVector m_GameObjectList[PVP_TEAMS_COUNT]; // Creature associations - GuidVector m_CreatureBottomList[BG_TEAMS_COUNT]; - GuidVector m_CreatureTopList[BG_TEAMS_COUNT]; + GuidVector m_CreatureBottomList[PVP_TEAMS_COUNT]; + GuidVector m_CreatureTopList[PVP_TEAMS_COUNT]; GuidVector m_TowerCannonBottomList; GuidVector m_TurretTopList; diff --git a/src/server/game/Battlegrounds/Arena.cpp b/src/server/game/Battlegrounds/Arena.cpp index 79c589ef0bd..548327a678a 100644 --- a/src/server/game/Battlegrounds/Arena.cpp +++ b/src/server/game/Battlegrounds/Arena.cpp @@ -103,7 +103,7 @@ void Arena::BuildPvPLogDataPacket(WorldPackets::Battleground::PVPMatchStatistics { pvpLogData.Ratings = boost::in_place(); - for (uint8 i = 0; i < BG_TEAMS_COUNT; ++i) + for (uint8 i = 0; i < PVP_TEAMS_COUNT; ++i) { pvpLogData.Ratings->Postmatch[i] = _arenaTeamScores[i].PostMatchRating; pvpLogData.Ratings->Prematch[i] = _arenaTeamScores[i].PreMatchRating; @@ -191,8 +191,8 @@ void Arena::EndBattleground(uint32 winner) // bg team that the client expects is different to TeamId // alliance 1, horde 0 - uint8 winnerTeam = winner == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE; - uint8 loserTeam = winner == ALLIANCE ? BG_TEAM_HORDE : BG_TEAM_ALLIANCE; + uint8 winnerTeam = winner == ALLIANCE ? PVP_TEAM_ALLIANCE : PVP_TEAM_HORDE; + uint8 loserTeam = winner == ALLIANCE ? PVP_TEAM_HORDE : PVP_TEAM_ALLIANCE; _arenaTeamScores[winnerTeam].Assign(winnerTeamRating, winnerTeamRating + winnerChange, winnerMatchmakerRating, GetArenaMatchmakerRating(winner)); _arenaTeamScores[loserTeam].Assign(loserTeamRating, loserTeamRating + loserChange, loserMatchmakerRating, GetArenaMatchmakerRating(GetOtherTeam(winner))); @@ -212,8 +212,8 @@ void Arena::EndBattleground(uint32 winner) // Deduct 16 points from each teams arena-rating if there are no winners after 45+2 minutes else { - _arenaTeamScores[BG_TEAM_ALLIANCE].Assign(winnerTeamRating, winnerTeamRating + ARENA_TIMELIMIT_POINTS_LOSS, winnerMatchmakerRating, GetArenaMatchmakerRating(ALLIANCE)); - _arenaTeamScores[BG_TEAM_HORDE].Assign(loserTeamRating, loserTeamRating + ARENA_TIMELIMIT_POINTS_LOSS, loserMatchmakerRating, GetArenaMatchmakerRating(HORDE)); + _arenaTeamScores[PVP_TEAM_ALLIANCE].Assign(winnerTeamRating, winnerTeamRating + ARENA_TIMELIMIT_POINTS_LOSS, winnerMatchmakerRating, GetArenaMatchmakerRating(ALLIANCE)); + _arenaTeamScores[PVP_TEAM_HORDE].Assign(loserTeamRating, loserTeamRating + ARENA_TIMELIMIT_POINTS_LOSS, loserMatchmakerRating, GetArenaMatchmakerRating(HORDE)); winnerArenaTeam->FinishGame(ARENA_TIMELIMIT_POINTS_LOSS); loserArenaTeam->FinishGame(ARENA_TIMELIMIT_POINTS_LOSS); diff --git a/src/server/game/Battlegrounds/Arena.h b/src/server/game/Battlegrounds/Arena.h index ad26dd85c08..b0b561964ab 100644 --- a/src/server/game/Battlegrounds/Arena.h +++ b/src/server/game/Battlegrounds/Arena.h @@ -65,7 +65,7 @@ class TC_GAME_API Arena : public Battleground void CheckWinConditions() override; void EndBattleground(uint32 winner) override; - ArenaTeamScore _arenaTeamScores[BG_TEAMS_COUNT]; + ArenaTeamScore _arenaTeamScores[PVP_TEAMS_COUNT]; }; #endif // TRINITY_ARENA_H diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 9eb8d239f67..b14062b4e06 100644 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -65,7 +65,7 @@ Battleground::Battleground(BattlegroundTemplate const* battlegroundTemplate) : _ m_InvitedAlliance = 0; m_InvitedHorde = 0; m_ArenaType = 0; - _winnerTeamId = BG_TEAM_NEUTRAL; + _winnerTeamId = PVP_TEAM_NEUTRAL; m_StartTime = 0; m_CountdownTimer = 0; m_ResetStatTimer = 0; @@ -703,7 +703,7 @@ void Battleground::EndBattleground(uint32 winner) PlaySoundToAll(SOUND_ALLIANCE_WINS); // alliance wins sound - SetWinner(BG_TEAM_ALLIANCE); + SetWinner(PVP_TEAM_ALLIANCE); } else if (winner == HORDE) { @@ -712,11 +712,11 @@ void Battleground::EndBattleground(uint32 winner) PlaySoundToAll(SOUND_HORDE_WINS); // horde wins sound - SetWinner(BG_TEAM_HORDE); + SetWinner(PVP_TEAM_HORDE); } else { - SetWinner(BG_TEAM_NEUTRAL); + SetWinner(PVP_TEAM_NEUTRAL); } CharacterDatabasePreparedStatement* stmt = nullptr; @@ -982,7 +982,7 @@ void Battleground::RemovePlayerAtLeave(ObjectGuid guid, bool Transport, bool Sen // this method is called when no players remains in battleground void Battleground::Reset() { - SetWinner(BG_TEAM_NEUTRAL); + SetWinner(PVP_TEAM_NEUTRAL); SetStatus(STATUS_WAIT_QUEUE); SetElapsedTime(0); SetRemainingTime(0); @@ -1079,7 +1079,7 @@ void Battleground::AddPlayer(Player* player) pvpMatchInitialize.Duration = std::chrono::duration_cast<Seconds>(duration); pvpMatchInitialize.StartTime = GameTime::GetGameTimeSystemPoint() - duration; } - pvpMatchInitialize.ArenaFaction = player->GetBGTeam() == HORDE ? BG_TEAM_HORDE : BG_TEAM_ALLIANCE; + pvpMatchInitialize.ArenaFaction = player->GetBGTeam() == HORDE ? PVP_TEAM_HORDE : PVP_TEAM_ALLIANCE; pvpMatchInitialize.BattlemasterListID = GetTypeID(); pvpMatchInitialize.Registered = false; pvpMatchInitialize.AffectsRating = isRated(); @@ -1320,8 +1320,8 @@ void Battleground::BuildPvPLogDataPacket(WorldPackets::Battleground::PVPMatchSta pvpLogData.Statistics.push_back(playerData); } - pvpLogData.PlayerCount[BG_TEAM_HORDE] = int8(GetPlayersCountByTeam(HORDE)); - pvpLogData.PlayerCount[BG_TEAM_ALLIANCE] = int8(GetPlayersCountByTeam(ALLIANCE)); + pvpLogData.PlayerCount[PVP_TEAM_HORDE] = int8(GetPlayersCountByTeam(HORDE)); + pvpLogData.PlayerCount[PVP_TEAM_ALLIANCE] = int8(GetPlayersCountByTeam(ALLIANCE)); } bool Battleground::UpdatePlayerScore(Player* player, uint32 type, uint32 value, bool doAddHonor) diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 0e79f076b6e..56dfc065ac9 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -306,7 +306,7 @@ class TC_GAME_API Battleground int32 GetStartDelayTime() const { return m_StartDelayTime; } uint8 GetArenaType() const { return m_ArenaType; } - BattlegroundTeamId GetWinner() const { return _winnerTeamId; } + PvPTeamId GetWinner() const { return _winnerTeamId; } uint32 GetScriptId() const; uint32 GetBonusHonorFromKill(uint32 kills) const; bool IsRandom() const { return m_IsRandom; } @@ -324,7 +324,7 @@ class TC_GAME_API Battleground void SetLastResurrectTime(uint32 Time) { m_LastResurrectTime = Time; } void SetRated(bool state) { m_IsRated = state; } void SetArenaType(uint8 type) { m_ArenaType = type; } - void SetWinner(BattlegroundTeamId winnerTeamId) { _winnerTeamId = winnerTeamId; } + void SetWinner(PvPTeamId winnerTeamId) { _winnerTeamId = winnerTeamId; } void ModifyStartDelayTime(int diff) { m_StartDelayTime -= diff; } void SetStartDelayTime(int Time) { m_StartDelayTime = Time; } @@ -577,7 +577,7 @@ class TC_GAME_API Battleground bool m_IsRandom; BGHonorMode m_HonorMode; - int32 m_TeamScores[BG_TEAMS_COUNT]; + int32 m_TeamScores[PVP_TEAMS_COUNT]; private: // Battleground @@ -596,7 +596,7 @@ class TC_GAME_API Battleground bool m_InBGFreeSlotQueue; // used to make sure that BG is only once inserted into the BattlegroundMgr.BGFreeSlotQueue[bgTypeId] deque bool m_SetDeleteThis; // used for safe deletion of the bg after end / all players leave - BattlegroundTeamId _winnerTeamId; + PvPTeamId _winnerTeamId; int32 m_StartDelayTime; bool m_IsRated; // is this battle rated? bool m_PrematureCountDown; @@ -614,19 +614,19 @@ class TC_GAME_API Battleground uint32 m_InvitedHorde; // Raid Group - Group* m_BgRaids[BG_TEAMS_COUNT]; // 0 - alliance, 1 - horde + Group* m_BgRaids[PVP_TEAMS_COUNT]; // 0 - alliance, 1 - horde // Players count by team - uint32 m_PlayersCount[BG_TEAMS_COUNT]; + uint32 m_PlayersCount[PVP_TEAMS_COUNT]; // Arena team ids by team - uint32 m_ArenaTeamIds[BG_TEAMS_COUNT]; + uint32 m_ArenaTeamIds[PVP_TEAMS_COUNT]; - uint32 m_ArenaTeamMMR[BG_TEAMS_COUNT]; + uint32 m_ArenaTeamMMR[PVP_TEAMS_COUNT]; // Start location BattlegroundMap* m_Map; - Position StartPosition[BG_TEAMS_COUNT]; + Position StartPosition[PVP_TEAMS_COUNT]; BattlegroundTemplate const* _battlegroundTemplate; PVPDifficultyEntry const* _pvpDifficultyEntry; diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.cpp b/src/server/game/Battlegrounds/BattlegroundMgr.cpp index 00bf4f65a46..7cca34a4246 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.cpp +++ b/src/server/game/Battlegrounds/BattlegroundMgr.cpp @@ -222,7 +222,7 @@ void BattlegroundMgr::BuildBattlegroundStatusActive(WorldPackets::Battleground:: { BuildBattlegroundStatusHeader(&battlefieldStatus->Hdr, bg, player, ticketId, joinTime, bg->GetQueueId(), arenaType); battlefieldStatus->ShutdownTimer = bg->GetRemainingTime(); - battlefieldStatus->ArenaFaction = player->GetBGTeam() == HORDE ? BG_TEAM_HORDE : BG_TEAM_ALLIANCE; + battlefieldStatus->ArenaFaction = player->GetBGTeam() == HORDE ? PVP_TEAM_HORDE : PVP_TEAM_ALLIANCE; battlefieldStatus->LeftEarly = false; battlefieldStatus->StartTimer = bg->GetElapsedTime(); battlefieldStatus->Mapid = bg->GetMapId(); diff --git a/src/server/game/Battlegrounds/BattlegroundMgr.h b/src/server/game/Battlegrounds/BattlegroundMgr.h index dc21aaae216..7564c4ebdbb 100644 --- a/src/server/game/Battlegrounds/BattlegroundMgr.h +++ b/src/server/game/Battlegrounds/BattlegroundMgr.h @@ -46,7 +46,7 @@ struct BattlegroundData struct BattlegroundTemplate { BattlegroundTypeId Id; - WorldSafeLocsEntry const* StartLocation[BG_TEAMS_COUNT] = { }; + WorldSafeLocsEntry const* StartLocation[PVP_TEAMS_COUNT] = { }; float MaxStartDistSq; uint8 Weight; uint32 ScriptId; diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.cpp b/src/server/game/Battlegrounds/BattlegroundQueue.cpp index 90764ae7d43..f25f78e2a36 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.cpp +++ b/src/server/game/Battlegrounds/BattlegroundQueue.cpp @@ -36,7 +36,7 @@ BattlegroundQueue::BattlegroundQueue(BattlegroundQueueTypeId queueId) : m_queueId(queueId) { - for (uint32 i = 0; i < BG_TEAMS_COUNT; ++i) + for (uint32 i = 0; i < PVP_TEAMS_COUNT; ++i) { for (uint32 j = 0; j < MAX_BATTLEGROUND_BRACKETS; ++j) { @@ -151,7 +151,7 @@ GroupQueueInfo* BattlegroundQueue::AddGroup(Player* leader, Group* grp, PVPDiffi //compute index (if group is premade or joined a rated match) to queues uint32 index = 0; if (!m_queueId.Rated && !isPremade) - index += BG_TEAMS_COUNT; + index += PVP_TEAMS_COUNT; if (ginfo->Team == HORDE) index++; TC_LOG_DEBUG("bg.battleground", "Adding Group to BattlegroundQueue bgTypeId : %u, bracket_id : %u, index : %u", m_queueId.BattlemasterListId, bracketId, index); @@ -309,7 +309,7 @@ void BattlegroundQueue::RemovePlayer(ObjectGuid guid, bool decreaseInvitedCount) { //we must check premade and normal team's queue - because when players from premade are joining bg, //they leave groupinfo so we can't use its players size to find out index - for (uint32 j = index; j < BG_QUEUE_GROUP_TYPES_COUNT; j += BG_TEAMS_COUNT) + for (uint32 j = index; j < BG_QUEUE_GROUP_TYPES_COUNT; j += PVP_TEAMS_COUNT) { GroupsQueueType::iterator k = m_QueuedGroups[bracket_id_tmp][j].begin(); for (; k != m_QueuedGroups[bracket_id_tmp][j].end(); ++k) @@ -618,7 +618,7 @@ bool BattlegroundQueue::CheckPremadeMatch(BattlegroundBracketId bracket_id, uint //add groups/players from normal queue to size of bigger group uint32 maxPlayers = std::min(m_SelectionPools[TEAM_ALLIANCE].GetPlayerCount(), m_SelectionPools[TEAM_HORDE].GetPlayerCount()); GroupsQueueType::const_iterator itr; - for (uint32 i = 0; i < BG_TEAMS_COUNT; i++) + for (uint32 i = 0; i < PVP_TEAMS_COUNT; i++) { for (itr = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + i].begin(); itr != m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + i].end(); ++itr) { @@ -636,7 +636,7 @@ bool BattlegroundQueue::CheckPremadeMatch(BattlegroundBracketId bracket_id, uint // if first is invited to BG and seconds timer expired, but we can ignore it, because players have only 80 seconds to click to enter bg // and when they click or after 80 seconds the queue info is removed from queue uint32 time_before = GameTime::GetGameTimeMS() - sWorld->getIntConfig(CONFIG_BATTLEGROUND_PREMADE_GROUP_WAIT_FOR_MATCH); - for (uint32 i = 0; i < BG_TEAMS_COUNT; i++) + for (uint32 i = 0; i < PVP_TEAMS_COUNT; i++) { if (!m_QueuedGroups[bracket_id][BG_QUEUE_PREMADE_ALLIANCE + i].empty()) { @@ -656,8 +656,8 @@ bool BattlegroundQueue::CheckPremadeMatch(BattlegroundBracketId bracket_id, uint // this method tries to create battleground or arena with MinPlayersPerTeam against MinPlayersPerTeam bool BattlegroundQueue::CheckNormalMatch(Battleground* /*bg_template*/, BattlegroundBracketId bracket_id, uint32 minPlayers, uint32 maxPlayers) { - GroupsQueueType::const_iterator itr_team[BG_TEAMS_COUNT]; - for (uint32 i = 0; i < BG_TEAMS_COUNT; i++) + GroupsQueueType::const_iterator itr_team[PVP_TEAMS_COUNT]; + for (uint32 i = 0; i < PVP_TEAMS_COUNT; i++) { itr_team[i] = m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + i].begin(); for (; itr_team[i] != m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + i].end(); ++(itr_team[i])) @@ -682,7 +682,7 @@ bool BattlegroundQueue::CheckNormalMatch(Battleground* /*bg_template*/, Battlegr for (; itr_team[j] != m_QueuedGroups[bracket_id][BG_QUEUE_NORMAL_ALLIANCE + j].end(); ++(itr_team[j])) { if (!(*(itr_team[j]))->IsInvitedToBGInstanceGUID) - if (!m_SelectionPools[j].AddGroup(*(itr_team[j]), m_SelectionPools[(j + 1) % BG_TEAMS_COUNT].GetPlayerCount())) + if (!m_SelectionPools[j].AddGroup(*(itr_team[j]), m_SelectionPools[(j + 1) % PVP_TEAMS_COUNT].GetPlayerCount())) break; } // do not allow to start bg with more than 2 players more on 1 faction @@ -846,7 +846,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundBra return; } // invite those selection pools - for (uint32 i = 0; i < BG_TEAMS_COUNT; i++) + for (uint32 i = 0; i < PVP_TEAMS_COUNT; i++) for (GroupsQueueType::const_iterator citr = m_SelectionPools[TEAM_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[TEAM_ALLIANCE + i].SelectedGroups.end(); ++citr) InviteGroupToBG((*citr), bg2, (*citr)->Team); @@ -873,7 +873,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundBra } // invite those selection pools - for (uint32 i = 0; i < BG_TEAMS_COUNT; i++) + for (uint32 i = 0; i < PVP_TEAMS_COUNT; i++) for (GroupsQueueType::const_iterator citr = m_SelectionPools[TEAM_ALLIANCE + i].SelectedGroups.begin(); citr != m_SelectionPools[TEAM_ALLIANCE + i].SelectedGroups.end(); ++citr) InviteGroupToBG((*citr), bg2, (*citr)->Team); // start bg @@ -919,7 +919,7 @@ void BattlegroundQueue::BattlegroundQueueUpdate(uint32 /*diff*/, BattlegroundBra int32 discardTime = GameTime::GetGameTimeMS() - sBattlegroundMgr->GetRatingDiscardTimer(); // we need to find 2 teams which will play next game - GroupsQueueType::iterator itr_teams[BG_TEAMS_COUNT]; + GroupsQueueType::iterator itr_teams[PVP_TEAMS_COUNT]; uint8 found = 0; uint8 team = 0; diff --git a/src/server/game/Battlegrounds/BattlegroundQueue.h b/src/server/game/Battlegrounds/BattlegroundQueue.h index 8286b1accfe..5e4d851924a 100644 --- a/src/server/game/Battlegrounds/BattlegroundQueue.h +++ b/src/server/game/Battlegrounds/BattlegroundQueue.h @@ -121,7 +121,7 @@ class TC_GAME_API BattlegroundQueue }; //one selection pool for horde, other one for alliance - SelectionPool m_SelectionPools[BG_TEAMS_COUNT]; + SelectionPool m_SelectionPools[PVP_TEAMS_COUNT]; uint32 GetPlayersInQueue(TeamId id); BattlegroundQueueTypeId const GetQueueId() const { return m_queueId; } @@ -130,9 +130,9 @@ class TC_GAME_API BattlegroundQueue BattlegroundQueueTypeId m_queueId; bool InviteGroupToBG(GroupQueueInfo* ginfo, Battleground* bg, uint32 side); - uint32 m_WaitTimes[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS][COUNT_OF_PLAYERS_TO_AVERAGE_WAIT_TIME]; - uint32 m_WaitTimeLastPlayer[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS]; - uint32 m_SumOfWaitTimes[BG_TEAMS_COUNT][MAX_BATTLEGROUND_BRACKETS]; + 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]; // Event handler EventProcessor m_events; diff --git a/src/server/game/Battlegrounds/BattlegroundScore.cpp b/src/server/game/Battlegrounds/BattlegroundScore.cpp index b6508be6bc5..a3ec2f196af 100644 --- a/src/server/game/Battlegrounds/BattlegroundScore.cpp +++ b/src/server/game/Battlegrounds/BattlegroundScore.cpp @@ -19,7 +19,7 @@ #include "Errors.h" #include "SharedDefines.h" -BattlegroundScore::BattlegroundScore(ObjectGuid playerGuid, uint32 team) : PlayerGuid(playerGuid), TeamId(team == ALLIANCE ? BG_TEAM_ALLIANCE : BG_TEAM_HORDE), +BattlegroundScore::BattlegroundScore(ObjectGuid playerGuid, uint32 team) : PlayerGuid(playerGuid), TeamId(team == ALLIANCE ? PVP_TEAM_ALLIANCE : PVP_TEAM_HORDE), KillingBlows(0), Deaths(0), HonorableKills(0), BonusHonor(0), DamageDone(0), HealingDone(0) { } diff --git a/src/server/game/Battlegrounds/BattlegroundScore.h b/src/server/game/Battlegrounds/BattlegroundScore.h index a319a744468..7e7aa2110af 100644 --- a/src/server/game/Battlegrounds/BattlegroundScore.h +++ b/src/server/game/Battlegrounds/BattlegroundScore.h @@ -82,7 +82,7 @@ struct BattlegroundScore virtual uint32 GetAttr5() const { return 0; } ObjectGuid PlayerGuid; - uint8 TeamId; // BattlegroundTeamId + uint8 TeamId; // PvPTeamId // Default score, present in every type uint32 KillingBlows; diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index c6e66665048..08dcaabf01e 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -47,7 +47,7 @@ BattlegroundAB::BattlegroundAB(BattlegroundTemplate const* battlegroundTemplate) m_BannerTimers[i].teamIndex = 0; } - for (uint8 i = 0; i < BG_TEAMS_COUNT; ++i) + for (uint8 i = 0; i < PVP_TEAMS_COUNT; ++i) { m_lastTick[i] = 0; m_HonorScoreTics[i] = 0; @@ -65,7 +65,7 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff) { if (GetStatus() == STATUS_IN_PROGRESS) { - int team_points[BG_TEAMS_COUNT] = { 0, 0 }; + int team_points[PVP_TEAMS_COUNT] = { 0, 0 }; for (int node = 0; node < BG_AB_DYNAMIC_NODES_COUNT; ++node) { @@ -114,13 +114,13 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff) } } - for (int team = 0; team < BG_TEAMS_COUNT; ++team) + for (int team = 0; team < PVP_TEAMS_COUNT; ++team) if (m_Nodes[node] == team + BG_AB_NODE_TYPE_OCCUPIED) ++team_points[team]; } // Accumulate points - for (int team = 0; team < BG_TEAMS_COUNT; ++team) + for (int team = 0; team < PVP_TEAMS_COUNT; ++team) { int points = team_points[team]; if (!points) @@ -166,7 +166,7 @@ void BattlegroundAB::PostUpdateImpl(uint32 diff) UpdateWorldState(BG_AB_OP_RESOURCES_HORDE, m_TeamScores[team]); // update achievement flags // we increased m_TeamScores[team] so we just need to check if it is 500 more than other teams resources - uint8 otherTeam = (team + 1) % BG_TEAMS_COUNT; + uint8 otherTeam = (team + 1) % PVP_TEAMS_COUNT; if (m_TeamScores[team] > m_TeamScores[otherTeam] + 500) m_TeamScores500Disadvantage[otherTeam] = true; } diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h index 145417b7389..f356bd51381 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.h @@ -360,13 +360,13 @@ class BattlegroundAB : public Battleground uint8 m_prevNodes[BG_AB_DYNAMIC_NODES_COUNT]; BG_AB_BannerTimer m_BannerTimers[BG_AB_DYNAMIC_NODES_COUNT]; uint32 m_NodeTimers[BG_AB_DYNAMIC_NODES_COUNT]; - uint32 m_lastTick[BG_TEAMS_COUNT]; - uint32 m_HonorScoreTics[BG_TEAMS_COUNT]; - uint32 m_ReputationScoreTics[BG_TEAMS_COUNT]; + uint32 m_lastTick[PVP_TEAMS_COUNT]; + uint32 m_HonorScoreTics[PVP_TEAMS_COUNT]; + uint32 m_ReputationScoreTics[PVP_TEAMS_COUNT]; bool m_IsInformedNearVictory; uint32 m_HonorTics; uint32 m_ReputationTics; // need for achievements - bool m_TeamScores500Disadvantage[BG_TEAMS_COUNT]; + bool m_TeamScores500Disadvantage[PVP_TEAMS_COUNT]; }; #endif diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h index 404b5f0e26b..0e73f34b9ed 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundSA.h +++ b/src/server/game/Battlegrounds/Zones/BattlegroundSA.h @@ -713,6 +713,6 @@ class BattlegroundSA : public Battleground bool _gateDestroyed; // Achievement: Not Even a Scratch - bool _allVehiclesAlive[BG_TEAMS_COUNT]; + bool _allVehiclesAlive[PVP_TEAMS_COUNT]; }; #endif diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 5a19b8f7572..1bb91d32dc8 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -5965,14 +5965,14 @@ enum BanReturn BAN_EXISTS }; -enum BattlegroundTeamId : uint8 +enum PvPTeamId : uint8 { - BG_TEAM_HORDE = 0, // Battleground: Horde, Arena: Green - BG_TEAM_ALLIANCE = 1, // Battleground: Alliance, Arena: Gold - BG_TEAM_NEUTRAL = 2 // Battleground: Neutral, Arena: None + PVP_TEAM_HORDE = 0, // Battleground: Horde, Arena: Green + PVP_TEAM_ALLIANCE = 1, // Battleground: Alliance, Arena: Gold + PVP_TEAM_NEUTRAL = 2 // Battleground: Neutral, Arena: None }; -#define BG_TEAMS_COUNT 2 +uint8 constexpr PVP_TEAMS_COUNT = 2; // Indexes of BattlemasterList.db2 (9.0.2.37176) enum BattlegroundTypeId : uint32 @@ -6077,6 +6077,13 @@ enum BattlegroundTypeId : uint32 #define MAX_BATTLEGROUND_TYPE_ID 845 +enum BattlefieldBattleId : uint8 +{ + BATTLEFIELD_BATTLEID_WINTERGRASP = 1, // Wintergrasp battle + BATTLEFIELD_BATTLEID_TOL_BARAD = 2, // Tol barad battle + BATTLEFIELD_BATTLEID_MAX +}; + enum MailResponseType { MAIL_SEND = 0, diff --git a/src/server/game/OutdoorPvP/OutdoorPvP.cpp b/src/server/game/OutdoorPvP/OutdoorPvP.cpp index 3effc60e53e..5fc95c3740f 100644 --- a/src/server/game/OutdoorPvP/OutdoorPvP.cpp +++ b/src/server/game/OutdoorPvP/OutdoorPvP.cpp @@ -558,7 +558,7 @@ int32 OPvPCapturePoint::HandleOpenGo(Player* /*player*/, GameObject* go) void OutdoorPvP::BroadcastPacket(WorldPacket const* data) const { // This is faster than sWorld->SendZoneMessage - for (uint32 team = 0; team < 2; ++team) + for (uint32 team = 0; team < PVP_TEAMS_COUNT; ++team) for (GuidSet::const_iterator itr = m_players[team].begin(); itr != m_players[team].end(); ++itr) if (Player* const player = ObjectAccessor::FindPlayer(*itr)) player->SendDirectMessage(data); @@ -644,7 +644,7 @@ void OutdoorPvP::SendDefenseMessage(uint32 zoneId, uint32 id) template<class Worker> void OutdoorPvP::BroadcastWorker(Worker& _worker, uint32 zoneId) { - for (uint32 i = 0; i < BG_TEAMS_COUNT; ++i) + for (uint32 i = 0; i < PVP_TEAMS_COUNT; ++i) for (GuidSet::iterator itr = m_players[i].begin(); itr != m_players[i].end(); ++itr) if (Player* player = ObjectAccessor::FindPlayer(*itr)) if (player->GetZoneId() == zoneId) |