diff options
Diffstat (limited to 'src/server/game/Battlegrounds/Battleground.cpp')
| -rwxr-xr-x | src/server/game/Battlegrounds/Battleground.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/server/game/Battlegrounds/Battleground.cpp b/src/server/game/Battlegrounds/Battleground.cpp index 74fb3b7c878..b33140a3419 100755 --- a/src/server/game/Battlegrounds/Battleground.cpp +++ b/src/server/game/Battlegrounds/Battleground.cpp @@ -1907,13 +1907,6 @@ WorldSafeLocsEntry const* Battleground::GetClosestGraveYard(Player* player) return sObjectMgr->GetClosestGraveYard(player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), player->GetTeam()); } -bool Battleground::IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxScore) const -{ - TeamId teamIndex = GetTeamIndexByTeamId(team); - uint32 score = std::max(m_TeamScores[teamIndex], 0); - return score >= minScore && score <= maxScore; -} - void Battleground::StartTimedAchievement(AchievementCriteriaTimedTypes type, uint32 entry) { for (BattlegroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr) @@ -1933,6 +1926,15 @@ void Battleground::RewardXPAtKill(Player* killer, Player* victim) killer->RewardPlayerAndGroupAtKill(victim, true); } +uint32 Battleground::GetTeamScore(uint32 teamId) const +{ + if (teamId == TEAM_ALLIANCE || teamId == TEAM_HORDE) + return m_TeamScores[teamId]; + + sLog->outError(LOG_FILTER_BATTLEGROUND, "GetTeamScore with wrong Team %u for BG %u", teamId, GetTypeID()); + return 0; +} + void Battleground::HandleAreaTrigger(Player* player, uint32 trigger) { sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Unhandled AreaTrigger %u in Battleground %u. Player coords (x: %f, y: %f, z: %f)", |
