aboutsummaryrefslogtreecommitdiff
path: root/src/game/BattleGroundWS.cpp
diff options
context:
space:
mode:
authormaximius <none@none>2009-12-18 13:41:30 -0800
committermaximius <none@none>2009-12-18 13:41:30 -0800
commitdc1207139ac3a6bccd918ddb5d291df98ac1cf33 (patch)
treefc13f86b6c09f449ccc319c3d321f1e87dafa8d6 /src/game/BattleGroundWS.cpp
parent89464472a97fcba60e4ad7682a44f8106cc64ecd (diff)
*Cleanup, proper indentation, and remove some wrong/irrelevant comments copied from custom patches..
--HG-- branch : trunk
Diffstat (limited to 'src/game/BattleGroundWS.cpp')
-rw-r--r--src/game/BattleGroundWS.cpp27
1 files changed, 13 insertions, 14 deletions
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());