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/BattleGround.cpp | |
parent | 1f53433c6c4de01709410581ba644be7e6aaf6fe (diff) | |
parent | 40f7c7243cae08cda7b129ac13d4768414753b4e (diff) |
*Merge after backout.
--HG--
branch : trunk
Diffstat (limited to 'src/game/BattleGround.cpp')
-rw-r--r-- | src/game/BattleGround.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/game/BattleGround.cpp b/src/game/BattleGround.cpp index f1825fe805c..14778e9b471 100644 --- a/src/game/BattleGround.cpp +++ b/src/game/BattleGround.cpp @@ -182,6 +182,9 @@ BattleGround::BattleGround() m_PlayersCount[BG_TEAM_ALLIANCE] = 0; m_PlayersCount[BG_TEAM_HORDE] = 0; + m_TeamScores[BG_TEAM_ALLIANCE] = 0; + m_TeamScores[BG_TEAM_HORDE] = 0; + m_PrematureCountDown = false; m_PrematureCountDown = 0; @@ -473,7 +476,7 @@ void BattleGround::Update(uint32 diff) void BattleGround::SetTeamStartLoc(uint32 TeamID, float X, float Y, float Z, float O) { - uint8 idx = GetTeamIndexByTeamId(TeamID); + BattleGroundTeamId idx = GetTeamIndexByTeamId(TeamID); m_TeamStartLocX[idx] = X; m_TeamStartLocY[idx] = Y; m_TeamStartLocZ[idx] = Z; @@ -1875,3 +1878,9 @@ WorldSafeLocsEntry const* BattleGround::GetClosestGraveYard( Player* player ) { return objmgr.GetClosestGraveYard( player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetMapId(), player->GetTeam() ); } + +bool BattleGround::IsTeamScoreInRange(uint32 team, uint32 minScore, uint32 maxScore) const +{ + BattleGroundTeamId team_idx = GetTeamIndexByTeamId(team); + return m_TeamScores[team_idx] >= minScore && m_TeamScores[team_idx] <= maxScore; +} |