aboutsummaryrefslogtreecommitdiff
path: root/src/scripts/eastern_kingdoms
diff options
context:
space:
mode:
Diffstat (limited to 'src/scripts/eastern_kingdoms')
-rw-r--r--src/scripts/eastern_kingdoms/alterac_valley/alterac_valley.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp8
-rw-r--r--src/scripts/eastern_kingdoms/alterac_valley/boss_drekthar.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/alterac_valley/boss_galvangar.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/alterac_valley/boss_vanndar.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp4
-rw-r--r--src/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp4
-rw-r--r--src/scripts/eastern_kingdoms/duskwood.cpp6
-rw-r--r--src/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp8
-rw-r--r--src/scripts/eastern_kingdoms/karazhan/boss_curator.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp4
-rw-r--r--src/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp36
-rw-r--r--src/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp10
-rw-r--r--src/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp28
-rw-r--r--src/scripts/eastern_kingdoms/scarlet_enclave/chapter2.cpp18
-rw-r--r--src/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp8
-rw-r--r--src/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/silverpine_forest.cpp10
-rw-r--r--src/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp12
-rw-r--r--src/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp4
-rw-r--r--src/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp4
-rw-r--r--src/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp46
-rw-r--r--src/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp8
-rw-r--r--src/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp2
-rw-r--r--src/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp4
29 files changed, 122 insertions, 122 deletions
diff --git a/src/scripts/eastern_kingdoms/alterac_valley/alterac_valley.cpp b/src/scripts/eastern_kingdoms/alterac_valley/alterac_valley.cpp
index bdaeb4aa949..c908d0ace49 100644
--- a/src/scripts/eastern_kingdoms/alterac_valley/alterac_valley.cpp
+++ b/src/scripts/eastern_kingdoms/alterac_valley/alterac_valley.cpp
@@ -154,7 +154,7 @@ struct mob_av_marshal_or_warmasterAI : public ScriptedAI
// check if creature is not outside of building
- if(uiResetTimer <= diff)
+ if (uiResetTimer <= diff)
{
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
EnterEvadeMode();
diff --git a/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp b/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp
index 6b0f5bb7e60..5da4bacb371 100644
--- a/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp
+++ b/src/scripts/eastern_kingdoms/alterac_valley/boss_balinda.cpp
@@ -59,14 +59,14 @@ struct mob_water_elementalAI : public ScriptedAI
if (!UpdateVictim())
return;
- if(uiWaterBoltTimer < diff)
+ if (uiWaterBoltTimer < diff)
{
DoCast(m_creature->getVictim(), SPELL_WATERBOLT);
uiWaterBoltTimer = 5*IN_MILISECONDS;
} else uiWaterBoltTimer -= diff;
// check if creature is not outside of building
- if(uiResetTimer < diff)
+ if (uiResetTimer < diff)
{
if (Creature *pBalinda = Unit::GetCreature(*m_creature, uiBalindaGUID))
if (m_creature->GetDistance2d(pBalinda->GetHomePosition().GetPositionX(), pBalinda->GetHomePosition().GetPositionY()) > 50)
@@ -133,7 +133,7 @@ struct boss_balindaAI : public ScriptedAI
if (uiWaterElementalTimer < diff)
{
- if(Summons.empty())
+ if (Summons.empty())
m_creature->SummonCreature(NPC_WATER_ELEMENTAL, 0, 0, 0, 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 45*IN_MILISECONDS);
uiWaterElementalTimer = 50*IN_MILISECONDS;
} else uiWaterElementalTimer -= diff;
@@ -164,7 +164,7 @@ struct boss_balindaAI : public ScriptedAI
// check if creature is not outside of building
- if(uiResetTimer < diff)
+ if (uiResetTimer < diff)
{
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
{
diff --git a/src/scripts/eastern_kingdoms/alterac_valley/boss_drekthar.cpp b/src/scripts/eastern_kingdoms/alterac_valley/boss_drekthar.cpp
index 0f1346af927..5b611666347 100644
--- a/src/scripts/eastern_kingdoms/alterac_valley/boss_drekthar.cpp
+++ b/src/scripts/eastern_kingdoms/alterac_valley/boss_drekthar.cpp
@@ -108,7 +108,7 @@ struct boss_drektharAI : public ScriptedAI
} else uiYellTimer -= diff;
// check if creature is not outside of building
- if(uiResetTimer <= diff)
+ if (uiResetTimer <= diff)
{
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
{
diff --git a/src/scripts/eastern_kingdoms/alterac_valley/boss_galvangar.cpp b/src/scripts/eastern_kingdoms/alterac_valley/boss_galvangar.cpp
index 063cf356fda..ac0f39d6eac 100644
--- a/src/scripts/eastern_kingdoms/alterac_valley/boss_galvangar.cpp
+++ b/src/scripts/eastern_kingdoms/alterac_valley/boss_galvangar.cpp
@@ -100,7 +100,7 @@ struct boss_galvangarAI : public ScriptedAI
} else uiMortalStrikeTimer -= diff;
// check if creature is not outside of building
- if(uiResetTimer <= diff)
+ if (uiResetTimer <= diff)
{
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
{
diff --git a/src/scripts/eastern_kingdoms/alterac_valley/boss_vanndar.cpp b/src/scripts/eastern_kingdoms/alterac_valley/boss_vanndar.cpp
index 43b674ff4c0..959e548f76f 100644
--- a/src/scripts/eastern_kingdoms/alterac_valley/boss_vanndar.cpp
+++ b/src/scripts/eastern_kingdoms/alterac_valley/boss_vanndar.cpp
@@ -100,7 +100,7 @@ struct boss_vanndarAI : public ScriptedAI
} else uiYellTimer -= diff;
// check if creature is not outside of building
- if(uiResetTimer <= diff)
+ if (uiResetTimer <= diff)
{
if (m_creature->GetDistance2d(m_creature->GetHomePosition().GetPositionX(), m_creature->GetHomePosition().GetPositionY()) > 50)
{
diff --git a/src/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/src/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp
index 9d255893927..df93b22541c 100644
--- a/src/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp
+++ b/src/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp
@@ -53,9 +53,9 @@ bool GOHello_go_shadowforge_brazier(Player* pPlayer, GameObject* pGo)
else
pInstance->SetData(TYPE_LYCEUM, IN_PROGRESS);
// If used brazier open linked doors (North or South)
- if(pGo->GetGUID() == pInstance->GetData64(DATA_SF_BRAZIER_N))
+ if (pGo->GetGUID() == pInstance->GetData64(DATA_SF_BRAZIER_N))
pInstance->HandleGameObject(pInstance->GetData64(DATA_GOLEM_DOOR_N), true);
- else if(pGo->GetGUID() == pInstance->GetData64(DATA_SF_BRAZIER_S))
+ else if (pGo->GetGUID() == pInstance->GetData64(DATA_SF_BRAZIER_S))
pInstance->HandleGameObject(pInstance->GetData64(DATA_GOLEM_DOOR_S), true);
}
return false;
diff --git a/src/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp b/src/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp
index 1854a7b2adc..fd654c2bdc9 100644
--- a/src/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp
+++ b/src/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp
@@ -79,7 +79,7 @@ struct boss_magmusAI : public ScriptedAI
// When he die open door to last chamber
void JustDied(Unit *who)
{
- if(ScriptedInstance* pInstance = who->GetInstanceData())
+ if (ScriptedInstance* pInstance = who->GetInstanceData())
pInstance->HandleGameObject(pInstance->GetData64(DATA_THRONE_DOOR), true);
}
};
diff --git a/src/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/src/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp
index 87ec1023b58..5564634f344 100644
--- a/src/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp
+++ b/src/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp
@@ -166,7 +166,7 @@ struct instance_blackrock_depths : public ScriptedInstance
case NPC_ANGERREL: TombBossGUIDs[6] = pCreature->GetGUID(); break;
case NPC_MAGMUS:
MagmusGUID = pCreature->GetGUID();
- if(!pCreature->isAlive())
+ if (!pCreature->isAlive())
HandleGameObject(GetData64(DATA_THRONE_DOOR), true); // if Magmus is dead open door to last boss
break;
}
diff --git a/src/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/src/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp
index a81ca4c9640..f946e17b2d5 100644
--- a/src/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp
+++ b/src/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp
@@ -108,9 +108,9 @@ struct boss_nefarianAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
- if( DespawnTimer <= diff)
+ if ( DespawnTimer <= diff)
{
- if(!UpdateVictim())
+ if (!UpdateVictim())
m_creature->ForcedDespawn();
DespawnTimer = 5000;
} else DespawnTimer -= diff;
diff --git a/src/scripts/eastern_kingdoms/duskwood.cpp b/src/scripts/eastern_kingdoms/duskwood.cpp
index d9aa69a4545..77cd1a3bc08 100644
--- a/src/scripts/eastern_kingdoms/duskwood.cpp
+++ b/src/scripts/eastern_kingdoms/duskwood.cpp
@@ -31,12 +31,12 @@ bool AreaTrigger_at_twilight_grove(Player* pPlayer, const AreaTriggerEntry *at)
{
if (pPlayer->HasQuestForItem(21149))
{
- if(Unit* TCorrupter = pPlayer->SummonCreature(15625,-10328.16,-489.57,49.95,0,TEMPSUMMON_MANUAL_DESPAWN,60000))
+ if (Unit* TCorrupter = pPlayer->SummonCreature(15625,-10328.16,-489.57,49.95,0,TEMPSUMMON_MANUAL_DESPAWN,60000))
{
TCorrupter->setFaction(14);
TCorrupter->SetMaxHealth(832750);
}
- if(Unit* CorrupterSpeaker = pPlayer->SummonCreature(1,pPlayer->GetPositionX(),pPlayer->GetPositionY(),pPlayer->GetPositionZ()-1,0,TEMPSUMMON_TIMED_DESPAWN,15000))
+ if (Unit* CorrupterSpeaker = pPlayer->SummonCreature(1,pPlayer->GetPositionX(),pPlayer->GetPositionY(),pPlayer->GetPositionZ()-1,0,TEMPSUMMON_TIMED_DESPAWN,15000))
{
CorrupterSpeaker->SetName("Twilight Corrupter");
CorrupterSpeaker->SetVisibility(VISIBILITY_ON);
@@ -90,7 +90,7 @@ struct boss_twilight_corrupterAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
- if(!UpdateVictim())
+ if (!UpdateVictim())
return;
if (SoulCorruption_Timer <= diff)
{
diff --git a/src/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/src/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp
index b4948c2132f..465ed5da357 100644
--- a/src/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp
+++ b/src/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp
@@ -209,17 +209,17 @@ struct npc_blastmaster_emi_shortfuseAI : public npc_escortAI
{
Map::PlayerList const &PlList = m_creature->GetMap()->GetPlayers();
- if(PlList.isEmpty())
+ if (PlList.isEmpty())
return;
for (Map::PlayerList::const_iterator i = PlList.begin(); i != PlList.end(); ++i)
{
- if(Player* pPlayer = i->getSource())
+ if (Player* pPlayer = i->getSource())
{
- if(pPlayer->isGameMaster())
+ if (pPlayer->isGameMaster())
continue;
- if(pPlayer->isAlive())
+ if (pPlayer->isAlive())
{
pTemp->SetInCombatWith(pPlayer);
pPlayer->SetInCombatWith(pTemp);
diff --git a/src/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/src/scripts/eastern_kingdoms/karazhan/boss_curator.cpp
index d723cb3e678..f27203b8c75 100644
--- a/src/scripts/eastern_kingdoms/karazhan/boss_curator.cpp
+++ b/src/scripts/eastern_kingdoms/karazhan/boss_curator.cpp
@@ -147,7 +147,7 @@ struct boss_curatorAI : public ScriptedAI
}
else
{
- if(urand(0,1) == 0)
+ if (urand(0,1) == 0)
{
DoScriptText(RAND(SAY_SUMMON1,SAY_SUMMON2), m_creature);
}
diff --git a/src/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/src/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp
index 010d59b319a..90fbfc95d9c 100644
--- a/src/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp
+++ b/src/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp
@@ -134,7 +134,7 @@ struct boss_moroesAI : public ScriptedAI
DeSpawnAdds();
//remove aura from spell Garrote when Moroes dies
- if(pInstance)
+ if (pInstance)
pInstance->DoRemoveAurasDueToSpellOnPlayers(SPELL_GARROTE);
}
@@ -275,7 +275,7 @@ struct boss_moroesAI : public ScriptedAI
std::list<Unit*> pTargets;
SelectTargetList(pTargets, 5, SELECT_TARGET_RANDOM, m_creature->GetMeleeReach()*5, true);
for (std::list<Unit*>::const_iterator i = pTargets.begin(); i != pTargets.end(); ++i)
- if(!m_creature->IsWithinMeleeRange(*i))
+ if (!m_creature->IsWithinMeleeRange(*i))
{
DoCast(*i, SPELL_BLIND);
break;
diff --git a/src/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/src/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp
index 40f6f2bdab8..575f7db1552 100644
--- a/src/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp
+++ b/src/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp
@@ -71,7 +71,7 @@ struct boss_netherspiteAI : public ScriptedAI
// need core fix
for (int i=0; i<3; ++i)
{
- if(SpellEntry *spell = (SpellEntry*)GetSpellStore()->LookupEntry(PlayerBuff[i]))
+ if (SpellEntry *spell = (SpellEntry*)GetSpellStore()->LookupEntry(PlayerBuff[i]))
spell->AttributesEx |= SPELL_ATTR_EX_NEGATIVE;
}
}
@@ -92,7 +92,7 @@ struct boss_netherspiteAI : public ScriptedAI
bool IsBetween(WorldObject* u1, WorldObject *pTarget, WorldObject* u2) // the in-line checker
{
- if(!u1 || !u2 || !pTarget)
+ if (!u1 || !u2 || !pTarget)
return false;
float xn, yn, xp, yp, xh, yh;
@@ -104,7 +104,7 @@ struct boss_netherspiteAI : public ScriptedAI
yh = pTarget->GetPositionY();
// check if target is between (not checking distance from the beam yet)
- if(dist(xn,yn,xh,yh)>=dist(xn,yn,xp,yp) || dist(xp,yp,xh,yh)>=dist(xn,yn,xp,yp))
+ if (dist(xn,yn,xh,yh)>=dist(xn,yn,xp,yp) || dist(xp,yp,xh,yh)>=dist(xn,yn,xp,yp))
return false;
// check distance from the beam
return (abs((xn-xp)*yh+(yp-yn)*xh-xn*yp+xp*yn)/dist(xn,yn,xp,yp) < 1.5f);
@@ -135,7 +135,7 @@ struct boss_netherspiteAI : public ScriptedAI
pos[BLUE_PORTAL] = (r>1 ? 1: 2); // Blue Portal not on the left side (0)
for (int i=0; i<3; ++i)
- if(Creature *portal = m_creature->SummonCreature(PortalID[i],PortalCoord[pos[i]][0],PortalCoord[pos[i]][1],PortalCoord[pos[i]][2],0,TEMPSUMMON_TIMED_DESPAWN,60000))
+ if (Creature *portal = m_creature->SummonCreature(PortalID[i],PortalCoord[pos[i]][0],PortalCoord[pos[i]][1],PortalCoord[pos[i]][2],0,TEMPSUMMON_TIMED_DESPAWN,60000))
{
PortalGUID[i] = portal->GetGUID();
portal->AddAura(PortalVisual[i], portal);
@@ -146,9 +146,9 @@ struct boss_netherspiteAI : public ScriptedAI
{
for (int i=0; i<3; ++i)
{
- if(Creature *portal = Unit::GetCreature(*m_creature, PortalGUID[i]))
+ if (Creature *portal = Unit::GetCreature(*m_creature, PortalGUID[i]))
portal->DisappearAndDie();
- if(Creature *portal = Unit::GetCreature(*m_creature, BeamerGUID[i]))
+ if (Creature *portal = Unit::GetCreature(*m_creature, BeamerGUID[i]))
portal->DisappearAndDie();
PortalGUID[i] = 0;
BeamTarget[i] = 0;
@@ -158,14 +158,14 @@ struct boss_netherspiteAI : public ScriptedAI
void UpdatePortals() // Here we handle the beams' behavior
{
for (int j=0; j<3; ++j) // j = color
- if(Creature *portal = Unit::GetCreature(*m_creature, PortalGUID[j]))
+ if (Creature *portal = Unit::GetCreature(*m_creature, PortalGUID[j]))
{
// the one who's been casted upon before
Unit *current = Unit::GetUnit(*portal, BeamTarget[j]);
// temporary store for the best suitable beam reciever
Unit *pTarget = m_creature;
- if(Map* map = m_creature->GetMap())
+ if (Map* map = m_creature->GetMap())
{
Map::PlayerList const& players = map->GetPlayers();
@@ -173,7 +173,7 @@ struct boss_netherspiteAI : public ScriptedAI
for (Map::PlayerList::const_iterator i = players.begin(); i!=players.end(); ++i)
{
Player* p = i->getSource();
- if(p && p->isAlive() // alive
+ if (p && p->isAlive() // alive
&& (!pTarget || pTarget->GetDistance2d(portal)>p->GetDistance2d(portal)) // closer than current best
&& !p->HasAura(PlayerDebuff[j],0) // not exhausted
&& !p->HasAura(PlayerBuff[(j+1)%3],0) // not on another beam
@@ -183,31 +183,31 @@ struct boss_netherspiteAI : public ScriptedAI
}
}
// buff the target
- if(pTarget->GetTypeId() == TYPEID_PLAYER)
+ if (pTarget->GetTypeId() == TYPEID_PLAYER)
pTarget->AddAura(PlayerBuff[j], pTarget);
else
pTarget->AddAura(NetherBuff[j], pTarget);
// cast visual beam on the chosen target if switched
// simple target switching isn't working -> using BeamerGUID to cast (workaround)
- if(!current || pTarget != current)
+ if (!current || pTarget != current)
{
BeamTarget[j] = pTarget->GetGUID();
// remove currently beaming portal
- if(Creature *beamer = Unit::GetCreature(*portal, BeamerGUID[j]))
+ if (Creature *beamer = Unit::GetCreature(*portal, BeamerGUID[j]))
{
beamer->CastSpell(pTarget, PortalBeam[j], false);
beamer->DisappearAndDie();
BeamerGUID[j] = 0;
}
// create new one and start beaming on the target
- if(Creature *beamer = portal->SummonCreature(PortalID[j],portal->GetPositionX(),portal->GetPositionY(),portal->GetPositionZ(),portal->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,60000))
+ if (Creature *beamer = portal->SummonCreature(PortalID[j],portal->GetPositionX(),portal->GetPositionY(),portal->GetPositionZ(),portal->GetOrientation(),TEMPSUMMON_TIMED_DESPAWN,60000))
{
beamer->CastSpell(pTarget, PortalBeam[j], false);
BeamerGUID[j] = beamer->GetGUID();
}
}
// aggro target if Red Beam
- if(j==RED_PORTAL && m_creature->getVictim() != pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
+ if (j==RED_PORTAL && m_creature->getVictim() != pTarget && pTarget->GetTypeId() == TYPEID_PLAYER)
m_creature->getThreatManager().addThreat(pTarget, 100000.0f+DoGetThreat(m_creature->getVictim()));
}
}
@@ -241,7 +241,7 @@ struct boss_netherspiteAI : public ScriptedAI
void HandleDoors(bool open) // Massive Door switcher
{
- if(GameObject *Door = GameObject::GetGameObject(*m_creature, pInstance ? pInstance->GetData64(DATA_GO_MASSIVE_DOOR) : 0))
+ if (GameObject *Door = GameObject::GetGameObject(*m_creature, pInstance ? pInstance->GetData64(DATA_GO_MASSIVE_DOOR) : 0))
Door->SetGoState(open ? GO_STATE_ACTIVE : GO_STATE_READY);
}
@@ -259,7 +259,7 @@ struct boss_netherspiteAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
- if(!UpdateVictim())
+ if (!UpdateVictim())
return;
// Void Zone
@@ -277,7 +277,7 @@ struct boss_netherspiteAI : public ScriptedAI
Berserk = true;
} else NetherInfusionTimer -= diff;
- if(PortalPhase) // PORTAL PHASE
+ if (PortalPhase) // PORTAL PHASE
{
// Distribute beams and buffs
if (PortalTimer <= diff)
@@ -308,7 +308,7 @@ struct boss_netherspiteAI : public ScriptedAI
// Netherbreath
if (NetherbreathTimer <= diff)
{
- if(Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0,40,true))
+ if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM,0,40,true))
DoCast(pTarget, SPELL_NETHERBREATH);
NetherbreathTimer = urand(5000,7000);
} else NetherbreathTimer -= diff;
diff --git a/src/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/src/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp
index d90c0f74e7d..5554e6d700c 100644
--- a/src/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp
+++ b/src/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp
@@ -135,7 +135,7 @@ struct boss_nightbaneAI : public ScriptedAI
void HandleTerraceDoors(bool open)
{
- if(pInstance)
+ if (pInstance)
{
pInstance->HandleGameObject(pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_1), open);
pInstance->HandleGameObject(pInstance->GetData64(DATA_MASTERS_TERRACE_DOOR_2), open);
diff --git a/src/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/src/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp
index 3e5b888d211..df7a5b8b2d5 100644
--- a/src/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp
+++ b/src/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp
@@ -215,9 +215,9 @@ struct boss_terestianAI : public ScriptedAI
m_creature->RemoveAurasDueToSpell(SPELL_BROKEN_PACT);
- if(Minion* Kilrek = m_creature->GetFirstMinion())
+ if (Minion* Kilrek = m_creature->GetFirstMinion())
{
- if(!Kilrek->isAlive())
+ if (!Kilrek->isAlive())
{
Kilrek->UnSummon();
DoCast(m_creature, SPELL_SUMMON_IMP, true);
@@ -301,13 +301,13 @@ struct boss_terestianAI : public ScriptedAI
if (SummonTimer <= diff)
{
- if(!PortalGUID[0])
+ if (!PortalGUID[0])
DoCast(m_creature->getVictim(), SPELL_FIENDISH_PORTAL, false);
- if(!PortalGUID[1])
+ if (!PortalGUID[1])
DoCast(m_creature->getVictim(), SPELL_FIENDISH_PORTAL_1, false);
- if(PortalGUID[0] && PortalGUID[1])
+ if (PortalGUID[0] && PortalGUID[1])
{
if (Creature* pPortal = Unit::GetCreature(*m_creature, PortalGUID[urand(0,1)]))
pPortal->CastSpell(m_creature->getVictim(), SPELL_SUMMON_FIENDISIMP, false);
diff --git a/src/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp b/src/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
index 394d25e5632..d1a1888b224 100644
--- a/src/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
+++ b/src/scripts/eastern_kingdoms/scarlet_enclave/chapter1.cpp
@@ -139,7 +139,7 @@ struct npc_unworthy_initiateAI : public ScriptedAI
wait_timer = 5000;
me->CastSpell(me, SPELL_DK_INITIATE_VISUAL, true);
- if(Player* starter = Unit::GetPlayer(playerGUID))
+ if (Player* starter = Unit::GetPlayer(playerGUID))
DoScriptText(say_event_attack[rand()%9], me, starter);
phase = PHASE_TO_ATTACK;
@@ -192,7 +192,7 @@ void npc_unworthy_initiateAI::UpdateAI(const uint32 diff)
case PHASE_CHAINED:
if (!anchorGUID)
{
- if(Creature *anchor = me->FindNearestCreature(29521, 30))
+ if (Creature *anchor = me->FindNearestCreature(29521, 30))
{
anchor->AI()->SetGUID(me->GetGUID());
anchor->CastSpell(me, SPELL_SOUL_PRISON_CHAIN, true);
@@ -611,7 +611,7 @@ struct npc_salanar_the_horsemanAI : public ScriptedAI
if (charmer->GetTypeId() == TYPEID_PLAYER)
{
// for quest Into the Realm of Shadows(12687)
- if(me->GetEntry() == 28788 && CAST_PLR(charmer)->GetQuestStatus(12687) == QUEST_STATUS_INCOMPLETE)
+ if (me->GetEntry() == 28788 && CAST_PLR(charmer)->GetQuestStatus(12687) == QUEST_STATUS_INCOMPLETE)
{
CAST_PLR(charmer)->GroupEventHappens(12687, me);
charmer->RemoveAurasDueToSpell(SPELL_EFFECT_OVERTAKE);
@@ -817,7 +817,7 @@ struct npc_scarlet_miner_cartAI : public PassiveAI
void DoAction(const int32 param)
{
- if(Creature *miner = Unit::GetCreature(*me, minerGUID))
+ if (Creature *miner = Unit::GetCreature(*me, minerGUID))
{
// very bad visual effect
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
@@ -829,8 +829,8 @@ struct npc_scarlet_miner_cartAI : public PassiveAI
void PassengerBoarded(Unit *who, int8 seatId, bool apply)
{
- if(!apply)
- if(Creature *miner = Unit::GetCreature(*me, minerGUID))
+ if (!apply)
+ if (Creature *miner = Unit::GetCreature(*me, minerGUID))
miner->DisappearAndDie();
}
};
@@ -880,7 +880,7 @@ struct npc_scarlet_minerAI : public npc_escortAI
AddWaypoint(11, 2202.595947, -6061.325684, 5.882018 );
AddWaypoint(12, 2188.974609, -6080.866699, 3.370027 );
- if(urand(0,1))
+ if (urand(0,1))
{
AddWaypoint(13, 2176.483887, -6110.407227, 1.855181 );
AddWaypoint(14, 2172.516602, -6146.752441, 1.074235 );
@@ -911,7 +911,7 @@ struct npc_scarlet_minerAI : public npc_escortAI
switch (i)
{
case 1:
- if(Unit *car = Unit::GetCreature(*me, carGUID))
+ if (Unit *car = Unit::GetCreature(*me, carGUID))
{
me->SetInFront(car);
me->SendMovementFlagUpdate();
@@ -922,7 +922,7 @@ struct npc_scarlet_minerAI : public npc_escortAI
IntroPhase = 1;
break;
case 17:
- if(Unit *car = Unit::GetCreature(*me, carGUID))
+ if (Unit *car = Unit::GetCreature(*me, carGUID))
{
me->SetInFront(car);
me->SendMovementFlagUpdate();
@@ -947,14 +947,14 @@ struct npc_scarlet_minerAI : public npc_escortAI
{
if (IntroPhase == 1)
{
- if(Creature *car = Unit::GetCreature(*me, carGUID))
+ if (Creature *car = Unit::GetCreature(*me, carGUID))
DoCast(car, SPELL_CART_DRAG);
IntroTimer = 800;
IntroPhase = 2;
}
else
{
- if(Creature *car = Unit::GetCreature(*me, carGUID))
+ if (Creature *car = Unit::GetCreature(*me, carGUID))
car->AI()->DoAction();
IntroPhase = 0;
}
@@ -980,12 +980,12 @@ bool GOHello_go_inconspicuous_mine_car(Player* pPlayer, GameObject* pGO)
if (pPlayer->GetQuestStatus(12701) == QUEST_STATUS_INCOMPLETE)
{
// Hack Why Trinity Dont Support Custom Summon Location
- if(Creature *miner = pPlayer->SummonCreature(28841, 2383.869629, -5900.312500, 107.996086, pPlayer->GetOrientation(),TEMPSUMMON_DEAD_DESPAWN, 1))
+ if (Creature *miner = pPlayer->SummonCreature(28841, 2383.869629, -5900.312500, 107.996086, pPlayer->GetOrientation(),TEMPSUMMON_DEAD_DESPAWN, 1))
{
pPlayer->CastSpell(pPlayer, SPELL_CART_SUMM, true);
- if(Creature *car = pPlayer->GetVehicleCreatureBase())
+ if (Creature *car = pPlayer->GetVehicleCreatureBase())
{
- if(car->GetEntry() == 28817)
+ if (car->GetEntry() == 28817)
{
car->AI()->SetGUID(miner->GetGUID());
CAST_AI(npc_scarlet_minerAI, miner->AI())->InitCartQuest(pPlayer);
diff --git a/src/scripts/eastern_kingdoms/scarlet_enclave/chapter2.cpp b/src/scripts/eastern_kingdoms/scarlet_enclave/chapter2.cpp
index 45300e9fb1c..fbc17d2a6dd 100644
--- a/src/scripts/eastern_kingdoms/scarlet_enclave/chapter2.cpp
+++ b/src/scripts/eastern_kingdoms/scarlet_enclave/chapter2.cpp
@@ -66,7 +66,7 @@ struct npc_crusade_persuadedAI : public ScriptedAI
{
if (spell->Id == SPELL_PERSUASIVE_STRIKE && caster->GetTypeId() == TYPEID_PLAYER && me->isAlive() && !uiSpeech_counter)
{
- if(CAST_PLR(caster)->GetQuestStatus(12720) == QUEST_STATUS_INCOMPLETE)
+ if (CAST_PLR(caster)->GetQuestStatus(12720) == QUEST_STATUS_INCOMPLETE)
{
uiPlayerGUID = caster->GetGUID();
uiSpeech_timer = 1000;
@@ -94,7 +94,7 @@ struct npc_crusade_persuadedAI : public ScriptedAI
if (uiSpeech_timer <= diff)
{
Player* pPlayer = Unit::GetPlayer(uiPlayerGUID);
- if(!pPlayer)
+ if (!pPlayer)
{
EnterEvadeMode();
return;
@@ -123,7 +123,7 @@ struct npc_crusade_persuadedAI : public ScriptedAI
return;
}
- if(!UpdateVictim())
+ if (!UpdateVictim())
return;
DoMeleeAttackIfReady();
@@ -361,16 +361,16 @@ struct mob_scarlet_courierAI : public ScriptedAI
void MovementInform(uint32 type, uint32 id)
{
- if(type != POINT_MOTION_TYPE)
+ if (type != POINT_MOTION_TYPE)
return;
- if(id == 1)
+ if (id == 1)
uiStage = 2;
}
void UpdateAI(const uint32 diff)
{
- if(uiStage && !me->isInCombat())
+ if (uiStage && !me->isInCombat())
{
if (uiStage_timer <= diff)
{
@@ -388,7 +388,7 @@ struct mob_scarlet_courierAI : public ScriptedAI
break;
case 2:
if (GameObject* tree = me->FindNearestGameObject(GO_INCONSPICUOUS_TREE, 40.0f))
- if(Unit *unit = tree->GetOwner())
+ if (Unit *unit = tree->GetOwner())
AttackStart(unit);
break;
}
@@ -397,7 +397,7 @@ struct mob_scarlet_courierAI : public ScriptedAI
} else uiStage_timer -= diff;
}
- if(!UpdateVictim())
+ if (!UpdateVictim())
return;
DoMeleeAttackIfReady();
@@ -474,7 +474,7 @@ struct mob_high_inquisitor_valrothAI : public ScriptedAI
void Shout()
{
- if(rand()%100 < 15)
+ if (rand()%100 < 15)
DoScriptText(RAND(SAY_VALROTH3,SAY_VALROTH4,SAY_VALROTH5), me);
}
diff --git a/src/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp b/src/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp
index 4561ec48212..9965c273cc1 100644
--- a/src/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp
+++ b/src/scripts/eastern_kingdoms/scarlet_enclave/chapter5.cpp
@@ -579,7 +579,7 @@ struct npc_highlord_darion_mograineAI : public npc_escortAI
void EnterEvadeMode()
{
- if(!bIsBattle)//do not reset self if we are in battle
+ if (!bIsBattle)//do not reset self if we are in battle
npc_escortAI::EnterEvadeMode();
}
diff --git a/src/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp b/src/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp
index 62bbe42ab82..c59e73d6dc1 100644
--- a/src/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp
+++ b/src/scripts/eastern_kingdoms/scarlet_enclave/the_scarlet_enclave.cpp
@@ -52,12 +52,12 @@ struct npc_valkyr_battle_maidenAI : public PassiveAI
if (FlyBackTimer <= diff)
{
Player *plr = NULL;
- if(me->isSummon())
- if(Unit *summoner = CAST_SUM(me)->GetSummoner())
- if(summoner->GetTypeId() == TYPEID_PLAYER)
+ if (me->isSummon())
+ if (Unit *summoner = CAST_SUM(me)->GetSummoner())
+ if (summoner->GetTypeId() == TYPEID_PLAYER)
plr = CAST_PLR(summoner);
- if(!plr)
+ if (!plr)
phase = 3;
switch(phase)
diff --git a/src/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/src/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp
index 563224c7384..dcc4b4dc3ec 100644
--- a/src/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp
+++ b/src/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp
@@ -824,7 +824,7 @@ bool GOHello_go_loosely_turned_soil(Player* pPlayer, GameObject* soil)
ScriptedInstance* pInstance = pPlayer->GetInstanceData();
if (pInstance)
{
- if(pInstance->GetData(DATA_HORSEMAN_EVENT) != NOT_STARTED)
+ if (pInstance->GetData(DATA_HORSEMAN_EVENT) != NOT_STARTED)
return true;
pInstance->SetData(DATA_HORSEMAN_EVENT, IN_PROGRESS);
}
diff --git a/src/scripts/eastern_kingdoms/silverpine_forest.cpp b/src/scripts/eastern_kingdoms/silverpine_forest.cpp
index d7319a6e290..b897db3138f 100644
--- a/src/scripts/eastern_kingdoms/silverpine_forest.cpp
+++ b/src/scripts/eastern_kingdoms/silverpine_forest.cpp
@@ -280,12 +280,12 @@ struct pyrewood_ambushAI : public ScriptedAI
{
//sLog.outString("DEBUG: p(%i) k(%i) d(%u) W(%i)", Phase, KillCount, diff, WaitTimer);
- if(!QuestInProgress)
+ if (!QuestInProgress)
return;
- if(KillCount && Phase < 6)
+ if (KillCount && Phase < 6)
{
- if(!UpdateVictim()) //reset() on target Despawn...
+ if (!UpdateVictim()) //reset() on target Despawn...
return;
DoMeleeAttackIfReady();
@@ -295,10 +295,10 @@ struct pyrewood_ambushAI : public ScriptedAI
switch (Phase)
{
case 0:
- if(WaitTimer == WAIT_SECS)
+ if (WaitTimer == WAIT_SECS)
m_creature->MonsterSay(NPCSAY_INIT, LANG_UNIVERSAL, 0); //no blizzlike
- if(WaitTimer <= diff)
+ if (WaitTimer <= diff)
{
WaitTimer -= diff;
return;
diff --git a/src/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/src/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp
index 6d040ed4885..8285e92c69e 100644
--- a/src/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp
+++ b/src/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp
@@ -100,7 +100,7 @@ struct instance_sunken_temple : public ScriptedInstance
switch(State)
{
case GO_ATALAI_STATUE1:
- if(!s1 && !s2 && !s3 && !s4 && !s5 && !s6)
+ if (!s1 && !s2 && !s3 && !s4 && !s5 && !s6)
{
if (GameObject *pAtalaiStatue1 = instance->GetGameObject(GOAtalaiStatue1))
UseStatue(pAtalaiStatue1);
@@ -109,7 +109,7 @@ struct instance_sunken_temple : public ScriptedInstance
};
break;
case GO_ATALAI_STATUE2:
- if(s1 && !s2 && !s3 && !s4 && !s5 && !s6)
+ if (s1 && !s2 && !s3 && !s4 && !s5 && !s6)
{
if (GameObject *pAtalaiStatue2 = instance->GetGameObject(GOAtalaiStatue2))
UseStatue(pAtalaiStatue2);
@@ -118,7 +118,7 @@ struct instance_sunken_temple : public ScriptedInstance
};
break;
case GO_ATALAI_STATUE3:
- if(s1 && s2 && !s3 && !s4 && !s5 && !s6)
+ if (s1 && s2 && !s3 && !s4 && !s5 && !s6)
{
if (GameObject *pAtalaiStatue3 = instance->GetGameObject(GOAtalaiStatue3))
UseStatue(pAtalaiStatue3);
@@ -127,7 +127,7 @@ struct instance_sunken_temple : public ScriptedInstance
};
break;
case GO_ATALAI_STATUE4:
- if(s1 && s2 && s3 && !s4 && !s5 && !s6)
+ if (s1 && s2 && s3 && !s4 && !s5 && !s6)
{
if (GameObject *pAtalaiStatue4 = instance->GetGameObject(GOAtalaiStatue4))
UseStatue(pAtalaiStatue4);
@@ -136,7 +136,7 @@ struct instance_sunken_temple : public ScriptedInstance
}
break;
case GO_ATALAI_STATUE5:
- if(s1 && s2 && s3 && s4 && !s5 && !s6)
+ if (s1 && s2 && s3 && s4 && !s5 && !s6)
{
if (GameObject *pAtalaiStatue5 = instance->GetGameObject(GOAtalaiStatue5))
UseStatue(pAtalaiStatue5);
@@ -145,7 +145,7 @@ struct instance_sunken_temple : public ScriptedInstance
}
break;
case GO_ATALAI_STATUE6:
- if(s1 && s2 && s3 && s4 && s5 && !s6)
+ if (s1 && s2 && s3 && s4 && s5 && !s6)
{
if (GameObject *pAtalaiStatue6 = instance->GetGameObject(GOAtalaiStatue6))
UseStatue(pAtalaiStatue6);
diff --git a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp
index 8debcb9068f..48074a45a3e 100644
--- a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp
+++ b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_brutallus.cpp
@@ -265,7 +265,7 @@ struct boss_brutallusAI : public ScriptedAI
if (Intro && !IsIntro)
StartIntro();
- if(!Intro)
+ if (!Intro)
ScriptedAI::MoveInLineOfSight(who);
}
@@ -314,7 +314,7 @@ struct boss_brutallusAI : public ScriptedAI
std::list<Unit*> pTargets;
SelectTargetList(pTargets, 10, SELECT_TARGET_RANDOM, 100, true);
for (std::list<Unit*>::const_iterator i = pTargets.begin(); i != pTargets.end(); ++i)
- if(!(*i)->HasAura(SPELL_BURN))
+ if (!(*i)->HasAura(SPELL_BURN))
{
(*i)->CastSpell((*i), SPELL_BURN, true);
break;
diff --git a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp
index 103b008c8d9..cbc1d861ec5 100644
--- a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp
+++ b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_eredar_twins.cpp
@@ -575,9 +575,9 @@ struct boss_alythessAI : public Scripted_NoMovementAI
}
}
}
- if(!m_creature->getVictim())
+ if (!m_creature->getVictim())
{
- if(pInstance)
+ if (pInstance)
{
Creature* sisiter = Unit::GetCreature((*m_creature),pInstance->GetData64(DATA_SACROLASH));
if (sisiter && !sisiter->isDead() && sisiter->getVictim())
diff --git a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp
index 8b873e7fdd3..f1906ce3bbf 100644
--- a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp
+++ b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_kalecgos.cpp
@@ -149,11 +149,11 @@ struct boss_kalecgosAI : public ScriptedAI
pInstance->SetData(DATA_KALECGOS_EVENT, NOT_STARTED);
}
- if(Creature *Sath = Unit::GetCreature(*me, SathGUID))
+ if (Creature *Sath = Unit::GetCreature(*me, SathGUID))
Sath->AI()->EnterEvadeMode();
me->setFaction(14);
- if(!JustReseted)//first reset at create
+ if (!JustReseted)//first reset at create
{
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE + UNIT_FLAG_NOT_SELECTABLE);
me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
@@ -223,7 +223,7 @@ struct boss_kalecgosAI : public ScriptedAI
}
else
{
- if(JustReseted)
+ if (JustReseted)
{
if (ResetTimer <= diff)
{
@@ -241,20 +241,20 @@ struct boss_kalecgosAI : public ScriptedAI
if (CheckTimer <= diff)
{
- if(me->GetDistance(CENTER_X, CENTER_Y, DRAGON_REALM_Z) >= 75)
+ if (me->GetDistance(CENTER_X, CENTER_Y, DRAGON_REALM_Z) >= 75)
{
me->AI()->EnterEvadeMode();
return;
}
if (HealthBelowPct(10) && !isEnraged)
{
- if(Creature* Sath = Unit::GetCreature(*me, SathGUID))
+ if (Creature* Sath = Unit::GetCreature(*me, SathGUID))
Sath->AI()->DoAction(DO_ENRAGE);
DoAction(DO_ENRAGE);
}
if (!isBanished && HealthBelowPct(1))
{
- if(Creature* Sath = Unit::GetCreature(*me, SathGUID))
+ if (Creature* Sath = Unit::GetCreature(*me, SathGUID))
{
if (Sath->HasAura(SPELL_BANISH))
{
@@ -303,16 +303,16 @@ struct boss_kalecgosAI : public ScriptedAI
std::list<HostileReference*> &m_threatlist = me->getThreatManager().getThreatList();
std::list<Unit*> targetList;
for (std::list<HostileReference*>::const_iterator itr = m_threatlist.begin(); itr!= m_threatlist.end(); ++itr)
- if((*itr)->getTarget() && (*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER && (*itr)->getTarget()->GetGUID() != me->getVictim()->GetGUID() && !(*itr)->getTarget()->HasAura(AURA_SPECTRAL_EXHAUSTION) && (*itr)->getTarget()->GetPositionZ() > me->GetPositionZ()-5)
+ if ((*itr)->getTarget() && (*itr)->getTarget()->GetTypeId() == TYPEID_PLAYER && (*itr)->getTarget()->GetGUID() != me->getVictim()->GetGUID() && !(*itr)->getTarget()->HasAura(AURA_SPECTRAL_EXHAUSTION) && (*itr)->getTarget()->GetPositionZ() > me->GetPositionZ()-5)
targetList.push_back((*itr)->getTarget());
- if(targetList.empty())
+ if (targetList.empty())
{
SpectralBlastTimer = 1000;
return;
}
std::list<Unit*>::const_iterator i = targetList.begin();
advance(i, rand()%targetList.size());
- if((*i))
+ if ((*i))
{
(*i)->CastSpell((*i), SPELL_SPECTRAL_BLAST,true);
SpectralBlastTimer = 20000+rand()%5000;
@@ -325,7 +325,7 @@ struct boss_kalecgosAI : public ScriptedAI
void MoveInLineOfSight(Unit *who)
{
- if(JustReseted)//boss is invisible, don't attack
+ if (JustReseted)//boss is invisible, don't attack
return;
if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who)))
{
@@ -360,7 +360,7 @@ struct boss_kalecgosAI : public ScriptedAI
void MovementInform(uint32 type,uint32 id)
{
- if(type != POINT_MOTION_TYPE)
+ if (type != POINT_MOTION_TYPE)
return;
me->SetVisibility(VISIBILITY_OFF);
if (isFriendly)
@@ -482,7 +482,7 @@ struct boss_sathrovarrAI : public ScriptedAI
void EnterCombat(Unit* who)
{
- if(Creature *Kalec = me->SummonCreature(MOB_KALEC, me->GetPositionX() + 10, me->GetPositionY() + 5, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0))
+ if (Creature *Kalec = me->SummonCreature(MOB_KALEC, me->GetPositionX() + 10, me->GetPositionY() + 5, me->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 0))
{
KalecGUID = Kalec->GetGUID();
me->CombatStart(Kalec);
@@ -536,7 +536,7 @@ struct boss_sathrovarrAI : public ScriptedAI
Map::PlayerList const &PlayerList = pMap->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
- if(i->getSource()->GetPositionZ() <= DRAGON_REALM_Z-5)
+ if (i->getSource()->GetPositionZ() <= DRAGON_REALM_Z-5)
{
i->getSource()->RemoveAura(AURA_SPECTRAL_REALM);
i->getSource()->TeleportTo(me->GetMap()->GetId(),i->getSource()->GetPositionX(),i->getSource()->GetPositionY(),DRAGON_REALM_Z+5,i->getSource()->GetOrientation());
@@ -561,7 +561,7 @@ struct boss_sathrovarrAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
- if(!me->HasAura(AURA_SPECTRAL_INVISIBILITY))
+ if (!me->HasAura(AURA_SPECTRAL_INVISIBILITY))
me->CastSpell(me, AURA_SPECTRAL_INVISIBILITY, true);
if (!UpdateVictim())
return;
@@ -569,7 +569,7 @@ struct boss_sathrovarrAI : public ScriptedAI
if (CheckTimer <= diff)
{
Creature *Kalec = Unit::GetCreature(*me, KalecGUID);
- if(!Kalec || (Kalec && !Kalec->isAlive()))
+ if (!Kalec || (Kalec && !Kalec->isAlive()))
{
if (Creature *Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
Kalecgos->AI()->EnterEvadeMode();
@@ -577,14 +577,14 @@ struct boss_sathrovarrAI : public ScriptedAI
}
if (HealthBelowPct(10) && !isEnraged)
{
- if(Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
+ if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
Kalecgos->AI()->DoAction(DO_ENRAGE);
DoAction(DO_ENRAGE);
}
Creature *Kalecgos = Unit::GetCreature(*me, KalecgosGUID);
if (Kalecgos)
{
- if(!Kalecgos->isInCombat())
+ if (!Kalecgos->isInCombat())
{
me->AI()->EnterEvadeMode();
return;
@@ -616,9 +616,9 @@ struct boss_sathrovarrAI : public ScriptedAI
{
for (std::list<HostileReference*>::const_iterator itr = me->getThreatManager().getThreatList().begin(); itr != me->getThreatManager().getThreatList().end(); ++itr)
{
- if(Unit* pUnit = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()))
+ if (Unit* pUnit = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid()))
{
- if(pUnit->GetPositionZ() > me->GetPositionZ()+5)
+ if (pUnit->GetPositionZ() > me->GetPositionZ()+5)
{
me->getThreatManager().modifyThreatPercent(pUnit,-100);
}
@@ -629,7 +629,7 @@ struct boss_sathrovarrAI : public ScriptedAI
if (ShadowBoltTimer <= diff)
{
- if(!(rand()%5))DoScriptText(SAY_SATH_SPELL1, me);
+ if (!(rand()%5))DoScriptText(SAY_SATH_SPELL1, me);
DoCast(me, SPELL_SHADOW_BOLT);
ShadowBoltTimer = 7000+(rand()%3000);
} else ShadowBoltTimer -= diff;
@@ -644,7 +644,7 @@ struct boss_sathrovarrAI : public ScriptedAI
if (CorruptionStrikeTimer <= diff)
{
- if(!(rand()%5))DoScriptText(SAY_SATH_SPELL2, me);
+ if (!(rand()%5))DoScriptText(SAY_SATH_SPELL2, me);
DoCast(me->getVictim(), SPELL_CORRUPTION_STRIKE);
CorruptionStrikeTimer = 13000;
} else CorruptionStrikeTimer -= diff;
@@ -694,7 +694,7 @@ struct boss_kalecAI : public ScriptedAI
void UpdateAI(const uint32 diff)
{
- if(!me->HasAura(AURA_SPECTRAL_INVISIBILITY))
+ if (!me->HasAura(AURA_SPECTRAL_INVISIBILITY))
me->CastSpell(me, AURA_SPECTRAL_INVISIBILITY, true);
if (!UpdateVictim())
return;
@@ -751,7 +751,7 @@ bool GOkalecgos_teleporter(Player* pPlayer, GameObject* pGo)
Map::PlayerList const &PlayerList = pMap->GetPlayers();
for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i)
{
- if(i->getSource() && i->getSource()->GetPositionZ() < DEMON_REALM_Z + 5)
+ if (i->getSource() && i->getSource()->GetPositionZ() < DEMON_REALM_Z + 5)
++SpectralPlayers;
}
if (pPlayer->HasAura(AURA_SPECTRAL_EXHAUSTION) || (MAX_PLAYERS_IN_SPECTRAL_REALM && SpectralPlayers >= MAX_PLAYERS_IN_SPECTRAL_REALM))
diff --git a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp
index b6711917f56..c2fcce96cdc 100644
--- a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp
+++ b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_kiljaeden.cpp
@@ -275,7 +275,7 @@ bool GOHello_go_orb_of_the_blue_flight(Player* pPlayer, GameObject* pGo)
pGo->SummonCreature(CREATURE_POWER_OF_THE_BLUE_DRAGONFLIGHT, pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 0.0f, TEMPSUMMON_TIMED_DESPAWN, 121000);
pPlayer->CastSpell(pPlayer, SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT, true);
pGo->SetUInt32Value(GAMEOBJECT_FACTION, 0);
- if(pInstance)
+ if (pInstance)
Creature* Kalec = Unit::GetCreature(*pPlayer, pInstance->GetData64(DATA_KALECGOS_KJ));
//Kalec->RemoveDynObject(SPELL_RING_OF_BLUE_FLAMES);
pGo->GetPosition(x,y,z);
@@ -397,7 +397,7 @@ struct boss_kalecgos_kjAI : public ScriptedAI
}
}
}*/
- if(OrbGUID[random])
+ if (OrbGUID[random])
{
if (GameObject* pOrb = m_creature->GetMap()->GetGameObject(OrbGUID[random]))
{
@@ -548,7 +548,7 @@ struct boss_kiljaedenAI : public Scripted_NoMovementAI
// Reset the controller
if (pInstance)
- if(Creature* Control = CAST_CRE(Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KILJAEDEN_CONTROLLER))))
+ if (Creature* Control = CAST_CRE(Unit::GetUnit(*m_creature, pInstance->GetData64(DATA_KILJAEDEN_CONTROLLER))))
CAST_AI(Scripted_NoMovementAI, Control->AI())->Reset();
}
@@ -768,7 +768,7 @@ struct boss_kiljaedenAI : public Scripted_NoMovementAI
{
Phase = PHASE_SACRIFICE;
if (pInstance)
- if(Creature* Anveena = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ANVEENA)))
+ if (Creature* Anveena = Unit::GetCreature(*m_creature, pInstance->GetData64(DATA_ANVEENA)))
Anveena->CastSpell(m_creature, SPELL_SACRIFICE_OF_ANVEENA, false);
OrbActivated = false;
ChangeTimers(true, 10000); // He shouldn't cast spells for ~10 seconds after Anveena's sacrifice. This will be done within Anveena's script
diff --git a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp
index d7d70fa6919..d2d3e55b285 100644
--- a/src/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp
+++ b/src/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp
@@ -287,7 +287,7 @@ struct boss_muruAI : public Scripted_NoMovementAI
{
if (Timer[TIMER_PHASE] <= diff)
{
- if(!pInstance)
+ if (!pInstance)
return;
switch(pInstance->GetData(DATA_MURU_EVENT))
{
diff --git a/src/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp b/src/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp
index cb472e32bdd..cfc64ba18cd 100644
--- a/src/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp
+++ b/src/scripts/eastern_kingdoms/sunwell_plateau/instance_sunwell_plateau.cpp
@@ -200,13 +200,13 @@ struct instance_sunwell_plateau : public ScriptedInstance
{
case DATA_KALECGOS_EVENT:
{
- if(data == NOT_STARTED || data == DONE)
+ if (data == NOT_STARTED || data == DONE)
{
HandleGameObject(ForceField,true);
HandleGameObject(KalecgosWall[0],true);
HandleGameObject(KalecgosWall[1],true);
}
- else if(data == IN_PROGRESS)
+ else if (data == IN_PROGRESS)
{
HandleGameObject(ForceField,false);
HandleGameObject(KalecgosWall[0],false);