diff options
author | QAston <none@none> | 2009-07-31 13:21:32 +0200 |
---|---|---|
committer | QAston <none@none> | 2009-07-31 13:21:32 +0200 |
commit | b212461f95aad264b608abfb88e66e0cf4ce511f (patch) | |
tree | f97ca6171659153c6f045e71b33332e3ef1d178f /src/game/BattleGroundEY.cpp | |
parent | 1f53433c6c4de01709410581ba644be7e6aaf6fe (diff) | |
parent | 40f7c7243cae08cda7b129ac13d4768414753b4e (diff) |
*Merge after backout.
--HG--
branch : trunk
Diffstat (limited to 'src/game/BattleGroundEY.cpp')
-rw-r--r-- | src/game/BattleGroundEY.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/game/BattleGroundEY.cpp b/src/game/BattleGroundEY.cpp index 9b54ecce643..39ef126d9e2 100644 --- a/src/game/BattleGroundEY.cpp +++ b/src/game/BattleGroundEY.cpp @@ -128,7 +128,7 @@ void BattleGroundEY::StartingEventOpenDoors() void BattleGroundEY::AddPoints(uint32 Team, uint32 Points) { - uint8 team_index = GetTeamIndexByTeamId(Team); + BattleGroundTeamId team_index = GetTeamIndexByTeamId(Team); m_TeamScores[team_index] += Points; m_HonorScoreTics[team_index] += Points; if (m_HonorScoreTics[team_index] >= m_HonorTics ) @@ -908,3 +908,12 @@ WorldSafeLocsEntry const *BattleGroundEY::GetClosestGraveYard(Player* player) return nearestEntry; } +bool BattleGroundEY::IsAllNodesConrolledByTeam(uint32 team) const +{ + uint32 count = 0; + for(int i = 0; i < EY_POINTS_MAX; ++i) + if (m_PointOwnedByTeam[i] == team && m_PointState[i] == EY_POINT_UNDER_CONTROL) + ++count; + + return count == EY_POINTS_MAX; +} |