From dc1207139ac3a6bccd918ddb5d291df98ac1cf33 Mon Sep 17 00:00:00 2001 From: maximius Date: Fri, 18 Dec 2009 13:41:30 -0800 Subject: *Cleanup, proper indentation, and remove some wrong/irrelevant comments copied from custom patches.. --HG-- branch : trunk --- src/game/BattleGroundWS.cpp | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'src/game/BattleGroundWS.cpp') diff --git a/src/game/BattleGroundWS.cpp b/src/game/BattleGroundWS.cpp index 0071e2c615c..a3a1dd61c98 100644 --- a/src/game/BattleGroundWS.cpp +++ b/src/game/BattleGroundWS.cpp @@ -67,32 +67,31 @@ BattleGroundWS::~BattleGroundWS() void BattleGroundWS::Update(uint32 diff) { BattleGround::Update(diff); - + if (GetStatus() == STATUS_IN_PROGRESS) { - if( GetStartTime() >= 25*MINUTE*1000 ) // Таймер тикать начинает после 25 минут + if (GetStartTime() >= 25*MINUTE*IN_MILISECONDS) // Таймер тикать начинает после 25 минут { - if( GetTeamScore(ALLIANCE) == 0 ) + if (GetTeamScore(ALLIANCE) == 0) { - if ( GetTeamScore(HORDE) == 0 ) // No one scored - result is tie + if (GetTeamScore(HORDE) == 0) // No one scored - result is tie EndBattleGround(NULL); - else // Horde has more points and thus wins EndBattleGround(HORDE); } - - else if( GetTeamScore(HORDE) == 0 ) - EndBattleGround(ALLIANCE); // Alliance has >0, Horde has 0, alliance wins - - else if( GetTeamScore(HORDE) == GetTeamScore(ALLIANCE) ) // Team score equal, winner is team that scored the first flag + + else if (GetTeamScore(HORDE) == 0) + EndBattleGround(ALLIANCE); // Alliance has > 0, Horde has 0, alliance wins + + else if (GetTeamScore(HORDE) == GetTeamScore(ALLIANCE)) // Team score equal, winner is team that scored the first flag EndBattleGround(m_FirstFlagCaptureTeam); - - else if( GetTeamScore(HORDE) > GetTeamScore(ALLIANCE) ) // Last but not least, check who has the higher score + + else if (GetTeamScore(HORDE) > GetTeamScore(ALLIANCE)) // Last but not least, check who has the higher score EndBattleGround(HORDE); else EndBattleGround(ALLIANCE); } - + if (m_FlagState[BG_TEAM_ALLIANCE] == BG_WS_FLAG_STATE_WAIT_RESPAWN) { m_FlagsTimer[BG_TEAM_ALLIANCE] -= diff; @@ -317,7 +316,7 @@ void BattleGroundWS::EventPlayerCapturedFlag(Player *Source) UpdateTeamScore(Source->GetTeam()); // only flag capture should be updated UpdatePlayerScore(Source, SCORE_FLAG_CAPTURES, 1); // +1 flag captures - + if(!m_FirstFlagCaptureTeam) SetFirstFlagCapture(Source->GetTeam()); -- cgit v1.2.3