diff options
author | maximius <none@none> | 2009-10-17 16:20:24 -0700 |
---|---|---|
committer | maximius <none@none> | 2009-10-17 16:20:24 -0700 |
commit | 3f338cc1c328c7280957583b50598292cd8fb64b (patch) | |
tree | ca209c2cd024e3902b7844b3224bceff7c5bb570 /src/game/BattleGroundEY.cpp | |
parent | e585187b248f48b3c6e9247b49fa07c6565d65e5 (diff) |
*Massive cleanup redux.
--HG--
branch : trunk
Diffstat (limited to 'src/game/BattleGroundEY.cpp')
-rw-r--r-- | src/game/BattleGroundEY.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/game/BattleGroundEY.cpp b/src/game/BattleGroundEY.cpp index 0c7ea66388b..55c745525dc 100644 --- a/src/game/BattleGroundEY.cpp +++ b/src/game/BattleGroundEY.cpp @@ -107,7 +107,7 @@ void BattleGroundEY::StartingEventCloseDoors() SpawnBGObject(BG_EY_OBJECT_DOOR_A, RESPAWN_IMMEDIATELY); SpawnBGObject(BG_EY_OBJECT_DOOR_H, RESPAWN_IMMEDIATELY); - for(uint32 i = BG_EY_OBJECT_A_BANNER_FEL_REALVER_CENTER; i < BG_EY_OBJECT_MAX; ++i) + for (uint32 i = BG_EY_OBJECT_A_BANNER_FEL_REALVER_CENTER; i < BG_EY_OBJECT_MAX; ++i) SpawnBGObject(i, RESPAWN_ONE_DAY); } @@ -116,9 +116,9 @@ void BattleGroundEY::StartingEventOpenDoors() SpawnBGObject(BG_EY_OBJECT_DOOR_A, RESPAWN_ONE_DAY); SpawnBGObject(BG_EY_OBJECT_DOOR_H, RESPAWN_ONE_DAY); - for(uint32 i = BG_EY_OBJECT_N_BANNER_FEL_REALVER_CENTER; i <= BG_EY_OBJECT_FLAG_NETHERSTORM; ++i) + for (uint32 i = BG_EY_OBJECT_N_BANNER_FEL_REALVER_CENTER; i <= BG_EY_OBJECT_FLAG_NETHERSTORM; ++i) SpawnBGObject(i, RESPAWN_IMMEDIATELY); - for(uint32 i = 0; i < EY_POINTS_MAX; ++i) + for (uint32 i = 0; i < EY_POINTS_MAX; ++i) { //randomly spawn buff uint8 buff = urand(0, 2); @@ -182,7 +182,7 @@ void BattleGroundEY::CheckSomeoneLeftPoint() for (uint8 i = 0; i < 2*EY_POINTS_MAX; ++i) m_CurrentPointPlayersCount[i] = 0; GameObject *obj = NULL; - for(uint8 i = 0; i < EY_POINTS_MAX; ++i) + for (uint8 i = 0; i < EY_POINTS_MAX; ++i) { obj = HashMapHolder<GameObject>::Find(m_BgObjects[BG_EY_OBJECT_TOWER_CAP_FEL_REALVER + i]); if (obj) @@ -220,7 +220,7 @@ void BattleGroundEY::CheckSomeoneLeftPoint() void BattleGroundEY::UpdatePointStatuses() { - for(uint8 point = 0; point < EY_POINTS_MAX; ++point) + for (uint8 point = 0; point < EY_POINTS_MAX; ++point) { if (m_PlayersNearPoint[point].empty()) continue; @@ -350,7 +350,7 @@ void BattleGroundEY::RemovePlayer(Player *plr, uint64 guid) // sometimes flag aura not removed :( for (int j = EY_POINTS_MAX; j >= 0; --j) { - for(size_t i = 0; i < m_PlayersNearPoint[j].size(); ++i) + for (size_t i = 0; i < m_PlayersNearPoint[j].size(); ++i) if (m_PlayersNearPoint[j][i] == guid) m_PlayersNearPoint[j].erase(m_PlayersNearPoint[j].begin() + i); } @@ -532,7 +532,7 @@ void BattleGroundEY::Reset() bool isBGWeekend = sBattleGroundMgr.IsBGWeekend(GetTypeID()); m_HonorTics = (isBGWeekend) ? BG_EY_EYWeekendHonorTicks : BG_EY_NotEYWeekendHonorTicks; - for(uint8 i = 0; i < EY_POINTS_MAX; ++i) + for (uint8 i = 0; i < EY_POINTS_MAX; ++i) { m_PointOwnedByTeam[i] = EY_POINT_NO_OWNER; m_PointState[i] = EY_POINT_STATE_UNCONTROLLED; @@ -881,11 +881,10 @@ WorldSafeLocsEntry const *BattleGroundEY::GetClosestGraveYard(Player* player) float plr_y = player->GetPositionY(); float plr_z = player->GetPositionZ(); - distance = (entry->x - plr_x)*(entry->x - plr_x) + (entry->y - plr_y)*(entry->y - plr_y) + (entry->z - plr_z)*(entry->z - plr_z); nearestDistance = distance; - for(uint8 i = 0; i < EY_POINTS_MAX; ++i) + for (uint8 i = 0; i < EY_POINTS_MAX; ++i) { if (m_PointOwnedByTeam[i]==player->GetTeam() && m_PointState[i]==EY_POINT_UNDER_CONTROL) { @@ -910,7 +909,7 @@ WorldSafeLocsEntry const *BattleGroundEY::GetClosestGraveYard(Player* player) bool BattleGroundEY::IsAllNodesConrolledByTeam(uint32 team) const { uint32 count = 0; - for(int i = 0; i < EY_POINTS_MAX; ++i) + for (int i = 0; i < EY_POINTS_MAX; ++i) if (m_PointOwnedByTeam[i] == team && m_PointState[i] == EY_POINT_UNDER_CONTROL) ++count; |