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
@@ -188,21 +188,21 @@ static Location AcolyteofVesperon = { 3145.68f, 520.71f, 89.7f };
static Location AcolyteofVesperon2 = { 3246.57f, 551.263f, 58.6164f };
Locations TwilightEggs[] =
{
{3219.28f, 669.121f , 88.5549f},
{3221.55f, 682.852f , 90.5361f},
{3239.77f, 685.94f , 90.3168f},
{3250.33f, 669.749f , 88.7637f},
{3246.6f, 642.365f , 84.8752f},
{3233.68f, 653.117f , 85.7051f}
{3219.28f, 669.121f, 88.5549f},
{3221.55f, 682.852f, 90.5361f},
{3239.77f, 685.94f, 90.3168f},
{3250.33f, 669.749f, 88.7637f},
{3246.6f, 642.365f, 84.8752f},
{3233.68f, 653.117f, 85.7051f}
};
Locations TwilightEggsSarth[] =
{
{3252.73f, 515.762f , 58.5501f},
{3256.56f, 521.119f , 58.6061f},
{3255.63f, 527.513f , 58.7568f},
{3264.90f, 525.865f , 58.6436f},
{3264.26f, 516.364f , 58.8011f},
{3257.54f, 502.285f , 58.2077f}
{3252.73f, 515.762f, 58.5501f},
{3256.56f, 521.119f, 58.6061f},
{3255.63f, 527.513f, 58.7568f},
{3264.90f, 525.865f, 58.6436f},
{3264.26f, 516.364f, 58.8011f},
{3257.54f, 502.285f, 58.2077f}
};
#define TWILIGHT_ACHIEVEMENTS 1
@@ -290,14 +290,14 @@ public:
if (pTenebron)
{
pTenebron->SetHomePosition(3239.07f, 657.235f, 86.8775f, 4.74729f);
if(pTenebron->isAlive())
if (pTenebron->isAlive())
{
if (pTenebron->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
pTenebron->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pTenebron->GetMotionMaster()->MoveTargetedHome();
}else
{
if(pInstance->GetData(TYPE_TENEBRON_PREKILLED) == false)
if (pInstance->GetData(TYPE_TENEBRON_PREKILLED) == false)
{
pTenebron->Respawn();
pTenebron->GetMotionMaster()->MoveTargetedHome();
@@ -308,14 +308,14 @@ public:
if (pShadron)
{
pShadron->SetHomePosition(3363.06f, 525.28f, 98.362f, 4.76475f);
if(pShadron->isAlive())
if (pShadron->isAlive())
{
if (pShadron->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
pShadron->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pShadron->GetMotionMaster()->MoveTargetedHome();
}else
{
if(pInstance->GetData(TYPE_SHADRON_PREKILLED) == false)
if (pInstance->GetData(TYPE_SHADRON_PREKILLED) == false)
{
pShadron->Respawn();
pShadron->GetMotionMaster()->MoveTargetedHome();
@@ -326,14 +326,14 @@ public:
if (pVesperon)
{
pVesperon->SetHomePosition(3145.68f, 520.71f, 89.7f, 4.64258f);
if(pVesperon->isAlive())
if (pVesperon->isAlive())
{
if (pVesperon->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE))
pVesperon->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pVesperon->GetMotionMaster()->MoveTargetedHome();
}else
{
if(pInstance->GetData(TYPE_VESPERON_PREKILLED) == false)
if (pInstance->GetData(TYPE_VESPERON_PREKILLED) == false)
{
pVesperon->Respawn();
pVesperon->GetMotionMaster()->MoveTargetedHome();
@@ -484,7 +484,7 @@ public:
int32 iTextId = 0;
switch(pTemp->GetEntry())
switch (pTemp->GetEntry())
{
case NPC_TENEBRON:
iTextId = SAY_SARTHARION_CALL_TENEBRON;
@@ -532,13 +532,13 @@ public:
Trinity::CreatureListSearcher<Trinity::AllCreaturesOfEntryInRange> searcher(me, pFireCyclonesList, checker);
me->VisitNearbyObject(200.0f, searcher);
if(pFireCyclonesList.empty())
if (pFireCyclonesList.empty())
return;
std::list<Creature*>::iterator itr = pFireCyclonesList.begin();
uint32 rnd = rand()%pFireCyclonesList.size();
for(uint32 i = 0; i < rnd; ++i)
for (uint32 i = 0; i < rnd; ++i)
++itr;
(*itr)->CastSpell(target, SPELL_LAVA_STRIKE, true);
@@ -586,13 +586,13 @@ public:
if (m_uiFlameTsunamiTimer <= uiDiff)
{
SendFlameTsunami();
switch(urand(0, 1))
switch (urand(0, 1))
{
case 0:
{
Creature* Right1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight1Spawn.x, FlameRight1Spawn.y , FlameRight1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN, 12000);
Creature* Right2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight2Spawn.x, FlameRight2Spawn.y , FlameRight2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN, 12000);
Creature* Right3 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight3Spawn.x, FlameRight3Spawn.y , FlameRight3Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN, 12000);
Creature* Right1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight1Spawn.x, FlameRight1Spawn.y, FlameRight1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN, 12000);
Creature* Right2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight2Spawn.x, FlameRight2Spawn.y, FlameRight2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN, 12000);
Creature* Right3 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameRight3Spawn.x, FlameRight3Spawn.y, FlameRight3Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN, 12000);
Right1->GetMotionMaster()->MovePoint(0, FlameRight1Direction.x, FlameRight1Direction.y, FlameRight1Direction.z);
Right2->GetMotionMaster()->MovePoint(0, FlameRight2Direction.x, FlameRight2Direction.y, FlameRight2Direction.z);
Right3->GetMotionMaster()->MovePoint(0, FlameRight3Direction.x, FlameRight3Direction.y, FlameRight3Direction.z);
@@ -600,8 +600,8 @@ public:
}
case 1:
{
Creature* Left1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft1Spawn.x, FlameLeft1Spawn.y , FlameLeft1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN, 12000);
Creature* Left2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft2Spawn.x, FlameLeft2Spawn.y , FlameLeft2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN, 12000);
Creature* Left1 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft1Spawn.x, FlameLeft1Spawn.y, FlameLeft1Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN, 12000);
Creature* Left2 = me->SummonCreature(NPC_FLAME_TSUNAMI, FlameLeft2Spawn.x, FlameLeft2Spawn.y, FlameLeft2Spawn.z, 0, TEMPSUMMON_TIMED_DESPAWN, 12000);
Left1->GetMotionMaster()->MovePoint(0, FlameLeft1Direction.x, FlameLeft1Direction.y, FlameLeft1Direction.z);
Left2->GetMotionMaster()->MovePoint(0, FlameLeft2Direction.x, FlameLeft2Direction.y, FlameLeft2Direction.z);
break;
@@ -648,7 +648,7 @@ public:
{
CastLavaStrikeOnTarget(target);
if(urand(0, 5) == 0)
if (urand(0, 5) == 0)
DoScriptText(RAND(SAY_SARTHARION_SPECIAL_1, SAY_SARTHARION_SPECIAL_2, SAY_SARTHARION_SPECIAL_3), me);
}
m_uiLavaStrikeTimer = (m_bIsSoftEnraged ? urand(1400, 2000) : urand(5000, 20000));
@@ -780,7 +780,7 @@ struct dummy_dragonAI : public ScriptedAI
{
me->GetMotionMaster()->Clear();
me->SetInCombatWithZone();
if(Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0, true))
{
me->AddThreat(target, 1.0f);
me->Attack(target, true);
@@ -837,19 +837,19 @@ struct dummy_dragonAI : public ScriptedAI
//in instance script and calculate range to each.
GameObject* pPortal = me->FindNearestGameObject(GO_TWILIGHT_PORTAL, 50.0f);
switch(me->GetEntry())
switch (me->GetEntry())
{
case NPC_TENEBRON:
{
iTextId = WHISPER_HATCH_EGGS;
if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
{
for(uint32 i = 0; i < 6; ++i)
for (uint32 i = 0; i < 6; ++i)
me->SummonCreature(NPC_TWILIGHT_EGG, TwilightEggs[i].x, TwilightEggs[i].y, TwilightEggs[i].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
}
else
{
for(uint32 i = 0; i < 6; ++i)
for (uint32 i = 0; i < 6; ++i)
me->SummonCreature(NPC_SARTHARION_TWILIGHT_EGG, TwilightEggsSarth[i].x, TwilightEggsSarth[i].y, TwilightEggsSarth[i].z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000);
}
break;
@@ -857,10 +857,10 @@ struct dummy_dragonAI : public ScriptedAI
case NPC_SHADRON:
{
iTextId = WHISPER_OPEN_PORTAL;
if(pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron.x, AcolyteofShadron.y , AcolyteofShadron.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron.x, AcolyteofShadron.y, AcolyteofShadron.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
else
me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron2.x, AcolyteofShadron2.y , AcolyteofShadron2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
me->SummonCreature(NPC_ACOLYTE_OF_SHADRON, AcolyteofShadron2.x, AcolyteofShadron2.y, AcolyteofShadron2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 28000);
break;
}
@@ -869,7 +869,7 @@ struct dummy_dragonAI : public ScriptedAI
iTextId = WHISPER_OPEN_PORTAL;
if (pInstance && !pInstance->GetData(TYPE_SARTHARION_EVENT) == IN_PROGRESS)
{
if(Creature* Acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon.x, AcolyteofVesperon.y , AcolyteofVesperon.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
if (Creature* Acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon.x, AcolyteofVesperon.y, AcolyteofVesperon.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
{
me->InterruptNonMeleeSpells(true);
Acolyte->InterruptNonMeleeSpells(true);
@@ -878,7 +878,7 @@ struct dummy_dragonAI : public ScriptedAI
}
else
{
if(Creature* Acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon2.x, AcolyteofVesperon2.y , AcolyteofVesperon2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
if (Creature* Acolyte = me->SummonCreature(NPC_ACOLYTE_OF_VESPERON, AcolyteofVesperon2.x, AcolyteofVesperon2.y, AcolyteofVesperon2.z, 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 20000))
{
me->InterruptNonMeleeSpells(true);
Acolyte->InterruptNonMeleeSpells(true);
@@ -909,20 +909,20 @@ struct dummy_dragonAI : public ScriptedAI
int32 iTextId = 0;
uint32 uiSpellId = 0;
switch(me->GetEntry())
switch (me->GetEntry())
{
case NPC_TENEBRON:
iTextId = SAY_TENEBRON_DEATH;
uiSpellId = SPELL_POWER_OF_TENEBRON;
if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
if (pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
pInstance->SetData(TYPE_TENEBRON_PREKILLED, 1);
break;
case NPC_SHADRON:
iTextId = SAY_SHADRON_DEATH;
uiSpellId = SPELL_POWER_OF_SHADRON;
if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
if (pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
pInstance->SetData(TYPE_SHADRON_PREKILLED, 1);
if(Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_SHADRON, 100.0f))
if (Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_SHADRON, 100.0f))
{
pAcolyte->Kill(pAcolyte);
}
@@ -930,9 +930,9 @@ struct dummy_dragonAI : public ScriptedAI
case NPC_VESPERON:
iTextId = SAY_VESPERON_DEATH;
uiSpellId = SPELL_POWER_OF_VESPERON;
if(pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
if (pInstance && pInstance->GetData(TYPE_SARTHARION_EVENT) != IN_PROGRESS)
pInstance->SetData(TYPE_VESPERON_PREKILLED, 1);
if(Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_VESPERON, 100.0f))
if (Creature* pAcolyte = me->FindNearestCreature(NPC_ACOLYTE_OF_VESPERON, 100.0f))
{
pAcolyte->Kill(pAcolyte);
}
@@ -967,7 +967,7 @@ struct dummy_dragonAI : public ScriptedAI
{
if (m_uiMoveNextTimer <= uiDiff)
{
if(m_uiWaypointId < MAX_WAYPOINT)
if (m_uiWaypointId < MAX_WAYPOINT)
me->GetMotionMaster()->MovePoint(m_uiWaypointId,
m_aDragonCommon[m_uiWaypointId].m_fX, m_aDragonCommon[m_uiWaypointId].m_fY, m_aDragonCommon[m_uiWaypointId].m_fZ);
@@ -1144,7 +1144,7 @@ public:
// Portal Event
if (m_uiAcolyteShadronTimer <= uiDiff)
{
if(m_bHasPortalOpen)
if (m_bHasPortalOpen)
m_uiAcolyteShadronTimer = 10000;
else
{
@@ -1243,7 +1243,7 @@ public:
// Portal Event
if (m_uiAcolyteVesperonTimer <= uiDiff)
{
if(m_bHasPortalOpen)
if (m_bHasPortalOpen)
m_uiAcolyteVesperonTimer = 10000;
else
{
@@ -1324,7 +1324,7 @@ public:
if (pInstance)
{
Creature* Shadron = pInstance->instance->GetCreature(pInstance->GetData64(DATA_SHADRON));
if(Shadron)
if (Shadron)
{
(CAST_AI(mob_shadron::mob_shadronAI, Shadron->AI()))->m_bHasPortalOpen = false;
}
@@ -1364,7 +1364,7 @@ public:
void UpdateAI(const uint32 uiDiff)
{
if(uiDespawnTimer < uiDiff)
if (uiDespawnTimer < uiDiff)
{
me->SetVisible(false);
me->Kill(me);
@@ -1459,7 +1459,7 @@ public:
void UpdateAI(const uint32 uiDiff)
{
if(uiDespawnTimer < uiDiff)
if (uiDespawnTimer < uiDiff)
{
me->SetVisible(false);
me->Kill(me);
@@ -1504,7 +1504,7 @@ public:
void Reset()
{
if(pInstance)
if (pInstance)
{
me->AddAura(SPELL_TWILIGHT_SHIFT_ENTER, me);
}
@@ -1533,7 +1533,7 @@ public:
if (m_uiHatchEggTimer <= uiDiff)
{
Creature* Tenebron = pInstance->instance->GetCreature(pInstance->GetData64(DATA_TENEBRON));
if(Tenebron)
if (Tenebron)
(CAST_AI(mob_tenebron::mob_tenebronAI, Tenebron->AI()))->m_bHasPortalOpen = false;
SpawnWhelps();
}
@@ -1590,7 +1590,7 @@ public:
Tsunami_Timer = 500;
}else Tsunami_Timer -= diff;
if(TsunamiBuff_timer <= diff)
if (TsunamiBuff_timer <= diff)
{
if (Unit* LavaBlaze = GetClosestCreatureWithEntry(me, NPC_LAVA_BLAZE, 10.0f, true))
LavaBlaze->CastSpell(LavaBlaze, SPELL_FLAME_TSUNAMI_BUFF, true);
@@ -1625,8 +1625,8 @@ public:
{
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
me->AddAura( 46265 , me ); // Wrong, can't find proper visual
me->AddAura( 69422 , me );
me->AddAura( 46265, me ); // Wrong, can't find proper visual
me->AddAura( 69422, me );
VoidBlast_Timer = 5000;
}
@@ -73,7 +73,7 @@ public:
void OnCreatureCreate(Creature* creature)
{
switch(creature->GetEntry())
switch (creature->GetEntry())
{
case NPC_SARTHARION:
m_uiSartharionGUID = creature->GetGUID();
@@ -99,11 +99,11 @@ public:
{
if (uiType == TYPE_SARTHARION_EVENT)
m_auiEncounter[0] = uiData;
else if(uiType == TYPE_TENEBRON_PREKILLED)
else if (uiType == TYPE_TENEBRON_PREKILLED)
m_bTenebronKilled = true;
else if(uiType == TYPE_SHADRON_PREKILLED)
else if (uiType == TYPE_SHADRON_PREKILLED)
m_bShadronKilled = true;
else if(uiType == TYPE_VESPERON_PREKILLED)
else if (uiType == TYPE_VESPERON_PREKILLED)
m_bVesperonKilled = true;
}
@@ -111,11 +111,11 @@ public:
{
if (uiType == TYPE_SARTHARION_EVENT)
return m_auiEncounter[0];
else if(uiType == TYPE_TENEBRON_PREKILLED)
else if (uiType == TYPE_TENEBRON_PREKILLED)
return m_bTenebronKilled;
else if(uiType == TYPE_SHADRON_PREKILLED)
else if (uiType == TYPE_SHADRON_PREKILLED)
return m_bShadronKilled;
else if(uiType == TYPE_VESPERON_PREKILLED)
else if (uiType == TYPE_VESPERON_PREKILLED)
return m_bVesperonKilled;
return 0;
@@ -123,7 +123,7 @@ public:
uint64 GetData64(uint32 uiData)
{
switch(uiData)
switch (uiData)
{
case DATA_SARTHARION:
return m_uiSartharionGUID;
@@ -89,7 +89,7 @@ class boss_baltharus_the_warborn : public CreatureScript
void DoAction(int32 const action)
{
switch(action)
switch (action)
{
case ACTION_INTRO_BALTHARUS:
if (_introDone)
@@ -203,7 +203,7 @@ class spell_saviana_conflagration_init : public SpellScriptLoader
void FilterTargets(std::list<Unit*>& unitList)
{
unitList.remove_if(ConflagrationTargetSelector());
unitList.remove_if (ConflagrationTargetSelector());
uint8 maxSize = uint8(GetCaster()->GetMap()->GetSpawnMode() & 1 ? 6 : 3);
if (unitList.size() > maxSize)
Trinity::RandomResizeList(unitList, maxSize);