Cosmetic: Multiple cosmetic changes

- Added missing space to 'if', 'for', 'while' and 'switch' when it's followed by '('
- Added missing space after a comma and remove space before comma (with some exceptions)
- Remove trailing spaces
- Convert tab to spaces

Note: Only affects files with extension "cpp" and "h" under /src/server
This commit is contained in:
Spp
2011-09-29 12:43:05 +02:00
parent 8b820baa73
commit b16d2245bb
390 changed files with 1545 additions and 1545 deletions
+22 -22
View File
@@ -120,11 +120,11 @@ void OPvPCapturePointEP_EWT::FillInitialWorldStates(WorldPacket &data)
void OPvPCapturePointEP_EWT::UpdateTowerState()
{
m_PvP->SendUpdateWorldState(EP_EWT_A , bool(m_TowerState & EP_TS_A));
m_PvP->SendUpdateWorldState(EP_EWT_H , bool(m_TowerState & EP_TS_H));
m_PvP->SendUpdateWorldState(EP_EWT_N_A , bool(m_TowerState & EP_TS_N_A));
m_PvP->SendUpdateWorldState(EP_EWT_N_H , bool(m_TowerState & EP_TS_N_H));
m_PvP->SendUpdateWorldState(EP_EWT_N , bool(m_TowerState & EP_TS_N));
m_PvP->SendUpdateWorldState(EP_EWT_A, bool(m_TowerState & EP_TS_A));
m_PvP->SendUpdateWorldState(EP_EWT_H, bool(m_TowerState & EP_TS_H));
m_PvP->SendUpdateWorldState(EP_EWT_N_A, bool(m_TowerState & EP_TS_N_A));
m_PvP->SendUpdateWorldState(EP_EWT_N_H, bool(m_TowerState & EP_TS_N_H));
m_PvP->SendUpdateWorldState(EP_EWT_N, bool(m_TowerState & EP_TS_N));
}
bool OPvPCapturePointEP_EWT::HandlePlayerEnter(Player* player)
@@ -269,11 +269,11 @@ void OPvPCapturePointEP_NPT::FillInitialWorldStates(WorldPacket &data)
void OPvPCapturePointEP_NPT::UpdateTowerState()
{
m_PvP->SendUpdateWorldState(EP_NPT_A , bool(m_TowerState & EP_TS_A));
m_PvP->SendUpdateWorldState(EP_NPT_H , bool(m_TowerState & EP_TS_H));
m_PvP->SendUpdateWorldState(EP_NPT_N_A , bool(m_TowerState & EP_TS_N_A));
m_PvP->SendUpdateWorldState(EP_NPT_N_H , bool(m_TowerState & EP_TS_N_H));
m_PvP->SendUpdateWorldState(EP_NPT_N , bool(m_TowerState & EP_TS_N));
m_PvP->SendUpdateWorldState(EP_NPT_A, bool(m_TowerState & EP_TS_A));
m_PvP->SendUpdateWorldState(EP_NPT_H, bool(m_TowerState & EP_TS_H));
m_PvP->SendUpdateWorldState(EP_NPT_N_A, bool(m_TowerState & EP_TS_N_A));
m_PvP->SendUpdateWorldState(EP_NPT_N_H, bool(m_TowerState & EP_TS_N_H));
m_PvP->SendUpdateWorldState(EP_NPT_N, bool(m_TowerState & EP_TS_N));
}
bool OPvPCapturePointEP_NPT::HandlePlayerEnter(Player* player)
@@ -319,7 +319,7 @@ OPvPCapturePointEP_CGT::OPvPCapturePointEP_CGT(OutdoorPvP* pvp)
void OPvPCapturePointEP_CGT::ChangeState()
{
// if changing from controlling alliance to horde or vice versa
if( m_OldState == OBJECTIVESTATE_ALLIANCE && m_OldState != m_State )
if ( m_OldState == OBJECTIVESTATE_ALLIANCE && m_OldState != m_State )
{
sWorld->SendZoneText(EP_GraveYardZone, sObjectMgr->GetTrinityStringForDBCLocale(LANG_OPVP_EP_LOSE_CGT_A));
((OutdoorPvPEP*)m_PvP)->SetControlledState(EP_CGT, 0);
@@ -401,11 +401,11 @@ void OPvPCapturePointEP_CGT::FillInitialWorldStates(WorldPacket &data)
void OPvPCapturePointEP_CGT::UpdateTowerState()
{
m_PvP->SendUpdateWorldState(EP_CGT_A , bool(m_TowerState & EP_TS_A));
m_PvP->SendUpdateWorldState(EP_CGT_H , bool(m_TowerState & EP_TS_H));
m_PvP->SendUpdateWorldState(EP_CGT_N_A , bool(m_TowerState & EP_TS_N_A));
m_PvP->SendUpdateWorldState(EP_CGT_N_H , bool(m_TowerState & EP_TS_N_H));
m_PvP->SendUpdateWorldState(EP_CGT_N , bool(m_TowerState & EP_TS_N));
m_PvP->SendUpdateWorldState(EP_CGT_A, bool(m_TowerState & EP_TS_A));
m_PvP->SendUpdateWorldState(EP_CGT_H, bool(m_TowerState & EP_TS_H));
m_PvP->SendUpdateWorldState(EP_CGT_N_A, bool(m_TowerState & EP_TS_N_A));
m_PvP->SendUpdateWorldState(EP_CGT_N_H, bool(m_TowerState & EP_TS_N_H));
m_PvP->SendUpdateWorldState(EP_CGT_N, bool(m_TowerState & EP_TS_N));
}
bool OPvPCapturePointEP_CGT::HandlePlayerEnter(Player* player)
@@ -540,11 +540,11 @@ void OPvPCapturePointEP_PWT::FillInitialWorldStates(WorldPacket &data)
void OPvPCapturePointEP_PWT::UpdateTowerState()
{
m_PvP->SendUpdateWorldState(EP_PWT_A , bool(m_TowerState & EP_TS_A));
m_PvP->SendUpdateWorldState(EP_PWT_H , bool(m_TowerState & EP_TS_H));
m_PvP->SendUpdateWorldState(EP_PWT_N_A , bool(m_TowerState & EP_TS_N_A));
m_PvP->SendUpdateWorldState(EP_PWT_N_H , bool(m_TowerState & EP_TS_N_H));
m_PvP->SendUpdateWorldState(EP_PWT_N , bool(m_TowerState & EP_TS_N));
m_PvP->SendUpdateWorldState(EP_PWT_A, bool(m_TowerState & EP_TS_A));
m_PvP->SendUpdateWorldState(EP_PWT_H, bool(m_TowerState & EP_TS_H));
m_PvP->SendUpdateWorldState(EP_PWT_N_A, bool(m_TowerState & EP_TS_N_A));
m_PvP->SendUpdateWorldState(EP_PWT_N_H, bool(m_TowerState & EP_TS_N_H));
m_PvP->SendUpdateWorldState(EP_PWT_N, bool(m_TowerState & EP_TS_N));
}
bool OPvPCapturePointEP_PWT::HandlePlayerEnter(Player* player)
@@ -579,7 +579,7 @@ void OPvPCapturePointEP_PWT::SummonFlightMaster(uint32 team)
Creature* c = HashMapHolder<Creature>::Find(m_Creatures[EP_PWT_FLIGHTMASTER]);
//Spawn flight master as friendly to capturing team
c->SetUInt32Value(GAMEOBJECT_FACTION, (team == ALLIANCE ? 55 : 68));
if(c)
if (c)
{
GossipOption gso;
gso.Action = GOSSIP_OPTION_OUTDOORPVP;
@@ -166,7 +166,7 @@ void OutdoorPvPHP::FillInitialWorldStates(WorldPacket &data)
void OPvPCapturePointHP::ChangeState()
{
uint32 field = 0;
switch(m_OldState)
switch (m_OldState)
{
case OBJECTIVESTATE_NEUTRAL:
field = HP_MAP_N[m_TowerType];
@@ -205,7 +205,7 @@ void OPvPCapturePointHP::ChangeState()
}
uint32 artkit = 21;
uint32 artkit2 = HP_TowerArtKit_N[m_TowerType];
switch(m_State)
switch (m_State)
{
case OBJECTIVESTATE_NEUTRAL:
field = HP_MAP_N[m_TowerType];
@@ -282,7 +282,7 @@ void OPvPCapturePointHP::SendChangePhase()
void OPvPCapturePointHP::FillInitialWorldStates(WorldPacket &data)
{
switch(m_State)
switch (m_State)
{
case OBJECTIVESTATE_ALLIANCE:
case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE:
+10 -10
View File
@@ -46,7 +46,7 @@ uint32 OPvPCapturePointNA::GetAliveGuardsCount()
uint32 cnt = 0;
for (std::map<uint32, uint64>::iterator itr = m_Creatures.begin(); itr != m_Creatures.end(); ++itr)
{
switch(itr->first)
switch (itr->first)
{
case NA_NPC_GUARD_01:
case NA_NPC_GUARD_02:
@@ -335,7 +335,7 @@ bool OPvPCapturePointNA::HandleCustomSpell(Player* player, uint32 spellId, GameO
std::vector<uint32> nodes;
nodes.resize(2);
bool retval = false;
switch(spellId)
switch (spellId)
{
case NA_SPELL_FLY_NORTH:
nodes[0] = FlightPathStartNodes[NA_ROOST_N];
@@ -423,7 +423,7 @@ int32 OPvPCapturePointNA::HandleOpenGo(Player* player, uint64 guid)
int32 add = -1;
int32 add2 = -1;
switch(retval)
switch (retval)
{
case NA_DESTROYED_ROOST_S:
del = NA_DESTROYED_ROOST_S;
@@ -569,7 +569,7 @@ bool OPvPCapturePointNA::Update(uint32 diff)
void OPvPCapturePointNA::ChangeState()
{
uint32 artkit = 21;
switch(m_State)
switch (m_State)
{
case OBJECTIVESTATE_NEUTRAL:
m_HalaaState = HALAA_N;
@@ -621,16 +621,16 @@ void OPvPCapturePointNA::SendChangePhase()
void OPvPCapturePointNA::UpdateHalaaWorldState()
{
m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEUTRAL , uint32(bool(m_HalaaState & HALAA_N)));
m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEU_A , uint32(bool(m_HalaaState & HALAA_N_A)));
m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEU_H , uint32(bool(m_HalaaState & HALAA_N_H)));
m_PvP->SendUpdateWorldState(NA_MAP_HALAA_HORDE , uint32(bool(m_HalaaState & HALAA_H)));
m_PvP->SendUpdateWorldState(NA_MAP_HALAA_ALLIANCE , uint32(bool(m_HalaaState & HALAA_A)));
m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEUTRAL, uint32(bool(m_HalaaState & HALAA_N)));
m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEU_A, uint32(bool(m_HalaaState & HALAA_N_A)));
m_PvP->SendUpdateWorldState(NA_MAP_HALAA_NEU_H, uint32(bool(m_HalaaState & HALAA_N_H)));
m_PvP->SendUpdateWorldState(NA_MAP_HALAA_HORDE, uint32(bool(m_HalaaState & HALAA_H)));
m_PvP->SendUpdateWorldState(NA_MAP_HALAA_ALLIANCE, uint32(bool(m_HalaaState & HALAA_A)));
}
void OPvPCapturePointNA::UpdateWyvernRoostWorldState(uint32 roost)
{
switch(roost)
switch (roost)
{
case NA_ROOST_S:
m_PvP->SendUpdateWorldState(NA_MAP_WYVERN_SOUTH_NEU_H, uint32(bool(m_WyvernStateSouth & WYVERN_NEU_HORDE)));
@@ -83,7 +83,7 @@ void OutdoorPvPSI::HandlePlayerLeaveZone(Player* player, uint32 zone)
bool OutdoorPvPSI::HandleAreaTrigger(Player* player, uint32 trigger)
{
switch(trigger)
switch (trigger)
{
case SI_AREATRIGGER_A:
if (player->GetTeam() == ALLIANCE && player->HasAura(SI_SILITHYST_FLAG))
@@ -144,7 +144,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
if (spellId == SI_SILITHYST_FLAG)
{
// if it was dropped away from the player's turn-in point, then create a silithyst mound, if it was dropped near the areatrigger, then it was dispelled by the outdoorpvp, so do nothing
switch(player->GetTeam())
switch (player->GetTeam())
{
case ALLIANCE:
{
@@ -192,7 +192,7 @@ bool OutdoorPvPSI::HandleDropFlag(Player* player, uint32 spellId)
delete go;
return true;
}
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), SI_SILITHYST_MOUND, map, player->GetPhaseMask() , player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 0, 0, 0, 0, 100, GO_STATE_READY))
if (!go->Create(sObjectMgr->GenerateLowGuid(HIGHGUID_GAMEOBJECT), SI_SILITHYST_MOUND, map, player->GetPhaseMask(), player->GetPositionX(), player->GetPositionY(), player->GetPositionZ(), player->GetOrientation(), 0, 0, 0, 0, 100, GO_STATE_READY))
{
delete go;
}
@@ -287,7 +287,7 @@ void OPvPCapturePointTF::ChangeState()
uint32 artkit = 21;
switch(m_State)
switch (m_State)
{
case OBJECTIVESTATE_ALLIANCE:
{
@@ -88,7 +88,7 @@ void OPvPCapturePointZM_Beacon::ChangeState()
sWorld->SendZoneText(ZM_GRAVEYARD_ZONE, sObjectMgr->GetTrinityStringForDBCLocale(ZMBeaconLoseH[m_TowerType]));
}
switch(m_State)
switch (m_State)
{
case OBJECTIVESTATE_ALLIANCE:
{
@@ -294,7 +294,7 @@ void OPvPCapturePointZM_GraveYard::SetBeaconState(uint32 controlling_faction)
return;
m_BothControllingFaction = controlling_faction;
switch(controlling_faction)
switch (controlling_faction)
{
case ALLIANCE:
// if ally already controls the gy and taken back both beacons, return, nothing to do for us
@@ -376,7 +376,7 @@ bool OPvPCapturePointZM_GraveYard::HandleGossipOption(Player* player, uint64 gui
bool OPvPCapturePointZM_GraveYard::HandleDropFlag(Player* /*player*/, uint32 spellId)
{
switch(spellId)
switch (spellId)
{
case ZM_BATTLE_STANDARD_A:
m_FlagCarrierGUID = 0;