*Cleanup, proper indentation, and remove some wrong/irrelevant comments copied from custom patches..

--HG--
branch : trunk
This commit is contained in:
maximius
2009-12-18 13:41:30 -08:00
parent 89464472a9
commit dc1207139a
30 changed files with 195 additions and 199 deletions
+13 -14
View File
@@ -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());