aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
author_manuel_ <manue.l@live.com.ar>2010-03-05 14:43:19 -0300
committer_manuel_ <manue.l@live.com.ar>2010-03-05 14:43:19 -0300
commit1a4c7c34fe5b6687a57657263cb842c361e52424 (patch)
treeab886d570cc05a0fee7b7316c853f6eebfb4b716 /src
parent9dd9096d574ebd8c165fc2b81d4039b9077d5c41 (diff)
Fix SoTA draw game by Gyullo.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/BattleGroundSA.cpp84
1 files changed, 43 insertions, 41 deletions
diff --git a/src/game/BattleGroundSA.cpp b/src/game/BattleGroundSA.cpp
index a92fa2094b8..2e95f01f937 100644
--- a/src/game/BattleGroundSA.cpp
+++ b/src/game/BattleGroundSA.cpp
@@ -244,51 +244,53 @@ void BattleGroundSA::Update(uint32 diff)
TotalTime += diff;
if(status == BG_SA_WARMUP || status == BG_SA_SECOND_WARMUP)
- {
- if(TotalTime >= BG_SA_WARMUPLENGTH)
- {
- TotalTime = 0;
- ToggleTimer();
- status = (status == BG_SA_WARMUP) ? BG_SA_ROUND_ONE : BG_SA_ROUND_TWO;
- }
- if(TotalTime >= BG_SA_BOAT_START)
- StartShips();
- return;
- }
+ {
+ if(TotalTime >= BG_SA_WARMUPLENGTH)
+ {
+ TotalTime = 0;
+ ToggleTimer();
+ status = (status == BG_SA_WARMUP) ? BG_SA_ROUND_ONE : BG_SA_ROUND_TWO;
+ }
+ if(TotalTime >= BG_SA_BOAT_START)
+ StartShips();
+
+ return;
+ }
else if(status == BG_SA_ROUND_ONE)
- {
- if(TotalTime >= BG_SA_ROUNDLENGTH)
- {
- RoundScores[0].time = TotalTime;
- TotalTime = 0;
- status = BG_SA_SECOND_WARMUP;
- attackers = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
- RoundScores[0].winner = attackers;
- status = BG_SA_SECOND_WARMUP;
- ToggleTimer();
- ResetObjs();
- return;
- }
-
- }
+ {
+ if(TotalTime >= BG_SA_ROUNDLENGTH)
+ {
+ RoundScores[0].time = TotalTime;
+ TotalTime = 0;
+ status = BG_SA_SECOND_WARMUP;
+ attackers = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
+ RoundScores[0].winner = attackers;
+ status = BG_SA_SECOND_WARMUP;
+ ToggleTimer();
+ ResetObjs();
+ return;
+ }
+ }
else if(status == BG_SA_ROUND_TWO)
- {
- if(TotalTime >= BG_SA_ROUNDLENGTH)
- {
- RoundScores[1].time = TotalTime;
- RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
-
- if(RoundScores[0].time < RoundScores[1].time)
- EndBattleGround(RoundScores[0].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
- else
- EndBattleGround(RoundScores[1].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
-
- return;
- }
- }
+ {
+ if(TotalTime >= BG_SA_ROUNDLENGTH)
+ {
+ RoundScores[1].time = TotalTime;
+ RoundScores[1].winner = (attackers == TEAM_ALLIANCE) ? TEAM_HORDE : TEAM_ALLIANCE;
+
+ if (RoundScores[0].time == RoundScores[1].time)
+ EndBattleGround(NULL);
+ else if(RoundScores[0].time < RoundScores[1].time)
+ EndBattleGround(RoundScores[0].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
+ else
+ EndBattleGround(RoundScores[1].winner == TEAM_ALLIANCE ? ALLIANCE : HORDE);
+
+ return;
+ }
+ }
if(status == BG_SA_ROUND_ONE || status == BG_SA_ROUND_TWO)
- SendTime();
+ SendTime();
}
void BattleGroundSA::StartingEventCloseDoors()