diff options
Diffstat (limited to 'src/scripts/outland')
9 files changed, 44 insertions, 44 deletions
diff --git a/src/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/src/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 346970b86b6..8ff0ee6aa78 100644 --- a/src/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/src/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -89,7 +89,7 @@ struct mob_voidtravelerAI : public ScriptedAI if (move <= diff) { Creature *Vorpil = Unit::GetCreature(*m_creature, VorpilGUID); - if(!Vorpil) + if (!Vorpil) { VorpilGUID = 0; return; diff --git a/src/scripts/outland/black_temple/boss_illidan.cpp b/src/scripts/outland/black_temple/boss_illidan.cpp index 54e2139c4ca..8ee901f41dc 100644 --- a/src/scripts/outland/black_temple/boss_illidan.cpp +++ b/src/scripts/outland/black_temple/boss_illidan.cpp @@ -1003,7 +1003,7 @@ struct npc_akama_illidanAI : public ScriptedAI DoorGUID[0] = pInstance->GetData64(DATA_GAMEOBJECT_ILLIDAN_DOOR_R); DoorGUID[1] = pInstance->GetData64(DATA_GAMEOBJECT_ILLIDAN_DOOR_L); - if(JustCreated)//close all doors at create + if (JustCreated)//close all doors at create { pInstance->HandleGameObject(GateGUID, false); @@ -1058,7 +1058,7 @@ struct npc_akama_illidanAI : public ScriptedAI void MovementInform(uint32 MovementType, uint32 Data) { - if(MovementType == POINT_MOTION_TYPE) + if (MovementType == POINT_MOTION_TYPE) Timer = 1; } @@ -1107,7 +1107,7 @@ struct npc_akama_illidanAI : public ScriptedAI { m_creature->setActive(true); m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - if(!JustCreated) + if (!JustCreated) return; float x, y, z; if (GETGO(Gate, GateGUID)) @@ -1259,7 +1259,7 @@ struct npc_akama_illidanAI : public ScriptedAI m_creature->InterruptNonMeleeSpells(true); Spirit[0]->InterruptNonMeleeSpells(true); Spirit[1]->InterruptNonMeleeSpells(true); - if(pInstance) + if (pInstance) pInstance->HandleGameObject(GateGUID, true); Timer = 2000; break; @@ -1290,7 +1290,7 @@ struct npc_akama_illidanAI : public ScriptedAI { case 6: for (uint8 i = 0; i < 2; ++i) - if(pInstance) + if (pInstance) pInstance->HandleGameObject(DoorGUID[i], true); break; case 8: @@ -1314,11 +1314,11 @@ struct npc_akama_illidanAI : public ScriptedAI void UpdateAI(const uint32 diff) { - if(m_creature->GetVisibility() == VISIBILITY_OFF) + if (m_creature->GetVisibility() == VISIBILITY_OFF) { if (Check_Timer <= diff) { - if(pInstance && pInstance->GetData(DATA_ILLIDARICOUNCILEVENT) == DONE) + if (pInstance && pInstance->GetData(DATA_ILLIDARICOUNCILEVENT) == DONE) m_creature->SetVisibility(VISIBILITY_ON); Check_Timer = 5000; @@ -1337,7 +1337,7 @@ struct npc_akama_illidanAI : public ScriptedAI switch(Phase) { case PHASE_CHANNEL: - if(JustCreated) + if (JustCreated) HandleChannelSequence(); else{ EnterPhase(PHASE_WALK); diff --git a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp index 658c9316a67..9e783d4c1eb 100644 --- a/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp +++ b/src/scripts/outland/coilfang_resevoir/serpent_shrine/boss_lurker_below.cpp @@ -98,7 +98,7 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI bool CheckCanStart()//check if players fished { - if(pInstance && pInstance->GetData(DATA_STRANGE_POOL) == NOT_STARTED) + if (pInstance && pInstance->GetData(DATA_STRANGE_POOL) == NOT_STARTED) return false; return true; } @@ -151,7 +151,7 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI void MoveInLineOfSight(Unit *who) { - if(!CanStartEvent)//boss is invisible, don't attack + if (!CanStartEvent)//boss is invisible, don't attack return; if (!m_creature->getVictim() && who->isTargetableForAttack() && (m_creature->IsHostileTo(who))) { @@ -165,17 +165,17 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI void MovementInform(uint32 type, uint32 id) { - if(type == ROTATE_MOTION_TYPE) + if (type == ROTATE_MOTION_TYPE) me->SetReactState(REACT_AGGRESSIVE); } void UpdateAI(const uint32 diff) { - if(!CanStartEvent)//boss is invisible, don't attack + if (!CanStartEvent)//boss is invisible, don't attack { - if(CheckCanStart()) + if (CheckCanStart()) { - if(Submerged) + if (Submerged) { m_creature->SetVisibility(VISIBILITY_ON); Submerged = false; @@ -201,9 +201,9 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI return; } - if(m_creature->getThreatManager().getThreatList().empty())//check if should evade + if (m_creature->getThreatManager().getThreatList().empty())//check if should evade { - if(m_creature->isInCombat()) + if (m_creature->isInCombat()) EnterEvadeMode(); return; } @@ -244,14 +244,14 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI { for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) { - if(m_creature->IsWithinMeleeRange(i->getSource())) + if (m_creature->IsWithinMeleeRange(i->getSource())) InRange = true; } } CheckTimer = 2000; } else CheckTimer -= diff; - if(RotTimer) + if (RotTimer) { Map* pMap = m_creature->GetMap(); if (pMap->IsDungeon()) @@ -287,7 +287,7 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI GeyserTimer = rand()%5000 + 15000; } else GeyserTimer -= diff; - if(!InRange)//if on players in melee range cast Waterbolt + if (!InRange)//if on players in melee range cast Waterbolt { if (WaterboltTimer <= diff) { @@ -321,7 +321,7 @@ struct boss_the_lurker_belowAI : public Scripted_NoMovementAI return; } else PhaseTimer-=diff; - if(m_creature->getThreatManager().getThreatList().empty())//check if should evade + if (m_creature->getThreatManager().getThreatList().empty())//check if should evade { EnterEvadeMode(); return; diff --git a/src/scripts/outland/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp b/src/scripts/outland/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp index 7f4d7e84739..9f1263aa5b9 100644 --- a/src/scripts/outland/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/src/scripts/outland/coilfang_resevoir/serpent_shrine/instance_serpent_shrine.cpp @@ -131,7 +131,7 @@ struct instance_serpentshrine_cavern : public ScriptedInstance void Update (uint32 diff) { //Lurker Fishing event - if(LurkerSubEvent == LURKER_FISHING) + if (LurkerSubEvent == LURKER_FISHING) { if (FishingTimer <= diff) { @@ -142,7 +142,7 @@ struct instance_serpentshrine_cavern : public ScriptedInstance //Water checks if (WaterCheckTimer <= diff) { - if(TrashCount >= MIN_KILLS) + if (TrashCount >= MIN_KILLS) Water = WATERSTATE_SCALDING; else Water = WATERSTATE_FRENZY; @@ -156,19 +156,19 @@ struct instance_serpentshrine_cavern : public ScriptedInstance { if (pPlayer->isAlive() && /*i->getSource()->GetPositionZ() <= -21.434931f*/pPlayer->IsInWater()) { - if(Water == WATERSTATE_SCALDING) + if (Water == WATERSTATE_SCALDING) { - if(!pPlayer->HasAura(SPELL_SCALDINGWATER)) + if (!pPlayer->HasAura(SPELL_SCALDINGWATER)) { pPlayer->CastSpell(pPlayer, SPELL_SCALDINGWATER,true); } - } else if(Water == WATERSTATE_FRENZY) + } else if (Water == WATERSTATE_FRENZY) { //spawn frenzy - if(DoSpawnFrenzy) + if (DoSpawnFrenzy) { - if(Creature* frenzy = pPlayer->SummonCreature(MOB_COILFANG_FRENZY,pPlayer->GetPositionX(),pPlayer->GetPositionY(),pPlayer->GetPositionZ(),pPlayer->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,2000)) + if (Creature* frenzy = pPlayer->SummonCreature(MOB_COILFANG_FRENZY,pPlayer->GetPositionX(),pPlayer->GetPositionY(),pPlayer->GetPositionZ(),pPlayer->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,2000)) { frenzy->Attack(pPlayer,false); frenzy->AddUnitMovementFlag(MOVEMENTFLAG_SWIMMING | MOVEMENTFLAG_LEVITATING); @@ -177,7 +177,7 @@ struct instance_serpentshrine_cavern : public ScriptedInstance } } } - if(!pPlayer->IsInWater()) + if (!pPlayer->IsInWater()) pPlayer->RemoveAurasDueToSpell(SPELL_SCALDINGWATER); } @@ -215,7 +215,7 @@ struct instance_serpentshrine_cavern : public ScriptedInstance pGo->setActive(true); break; case GAMEOBJECT_FISHINGNODE_ENTRY://no way checking if fish is hooked, so we create a timed event - if(LurkerSubEvent == LURKER_NOT_STARTED) + if (LurkerSubEvent == LURKER_NOT_STARTED) { FishingTimer = 10000+rand()%30000;//random time before lurker emerges LurkerSubEvent = LURKER_FISHING; @@ -237,7 +237,7 @@ struct instance_serpentshrine_cavern : public ScriptedInstance case 21215: LeotherasTheBlind = pCreature->GetGUID(); break; /*case TRASHMOB_COILFANG_PRIESTESS: case TRASHMOB_COILFANG_SHATTERER: - if(pCreature->isAlive()) + if (pCreature->isAlive()) ++TrashCount; break;*/ } @@ -275,7 +275,7 @@ struct instance_serpentshrine_cavern : public ScriptedInstance case DATA_STRANGE_POOL: { StrangePool = data; - if(data == NOT_STARTED) + if (data == NOT_STARTED) LurkerSubEvent = LURKER_NOT_STARTED; } break; @@ -289,7 +289,7 @@ struct instance_serpentshrine_cavern : public ScriptedInstance ControlConsole = data;break; case DATA_TRASH : { - if(data == 1 && TrashCount < MIN_KILLS) + if (data == 1 && TrashCount < MIN_KILLS) ++TrashCount;//+1 died SaveToDB(); break; diff --git a/src/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/src/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index 2af55ffa15e..8984c1759d2 100644 --- a/src/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/src/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -181,7 +181,7 @@ struct boss_high_king_maulgarAI : public ScriptedAI void GetCouncil() { - if(pInstance) + if (pInstance) { //get council member's guid to respawn them if needed Council[0] = pInstance->GetData64(DATA_KIGGLERTHECRAZED); diff --git a/src/scripts/outland/netherstorm.cpp b/src/scripts/outland/netherstorm.cpp index 6e339890707..587f432c6bb 100644 --- a/src/scripts/outland/netherstorm.cpp +++ b/src/scripts/outland/netherstorm.cpp @@ -711,7 +711,7 @@ struct mob_phase_hunterAI : public ScriptedAI ManaBurnTimer = 5000 + (rand() % 3 * 1000); // 5-8 sec cd - if(m_creature->GetEntry() == NPC_DRAINED_PHASE_HUNTER_ENTRY) + if (m_creature->GetEntry() == NPC_DRAINED_PHASE_HUNTER_ENTRY) m_creature->UpdateEntry(NPC_PHASE_HUNTER_ENTRY); } @@ -748,13 +748,13 @@ struct mob_phase_hunterAI : public ScriptedAI for (std::list<HostileReference*>::const_iterator itr = AggroList.begin(); itr != AggroList.end(); ++itr) { - if(Unit *pUnit = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid())) + if (Unit *pUnit = Unit::GetUnit(*m_creature, (*itr)->getUnitGuid())) { - if(pUnit->GetCreateMana() > 0) + if (pUnit->GetCreateMana() > 0) UnitsWithMana.push_back(pUnit); } } - if(!UnitsWithMana.empty()) + if (!UnitsWithMana.empty()) { std::list<Unit*>::const_iterator it = UnitsWithMana.begin(); std::advance(it, rand() % UnitsWithMana.size()); diff --git a/src/scripts/outland/shadowmoon_valley.cpp b/src/scripts/outland/shadowmoon_valley.cpp index 3a6a86613f9..f37b833515c 100644 --- a/src/scripts/outland/shadowmoon_valley.cpp +++ b/src/scripts/outland/shadowmoon_valley.cpp @@ -281,7 +281,7 @@ struct mob_enslaved_netherwing_drakeAI : public ScriptedAI dz += 20; // so it's in the air, not ground*/ Position pos; - if(Unit* EscapeDummy = me->FindNearestCreature(CREATURE_ESCAPE_DUMMY, 30)) + if (Unit* EscapeDummy = me->FindNearestCreature(CREATURE_ESCAPE_DUMMY, 30)) EscapeDummy->GetPosition(&pos); else { diff --git a/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index 148e174bed2..fcc76c4eec3 100644 --- a/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/src/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -214,7 +214,7 @@ struct boss_high_astromancer_solarianAI : public ScriptedAI if (Wrath_Timer <= diff) { m_creature->InterruptNonMeleeSpells(false); - if(Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true)) + if (Unit *pTarget = SelectTarget(SELECT_TARGET_RANDOM, 1, 100, true)) DoCast(pTarget, SPELL_WRATH_OF_THE_ASTROMANCER, true); Wrath_Timer = 20000+rand()%5000; } else Wrath_Timer -= diff; diff --git a/src/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/src/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index 2f56606a031..26a744e6ff4 100644 --- a/src/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/src/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -613,7 +613,7 @@ struct boss_kaelthasAI : public ScriptedAI if (Advisor && (Advisor->getStandState() == UNIT_STAND_STATE_DEAD)) { Phase = 2; - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(DATA_KAELTHASEVENT, 2); DoScriptText(SAY_PHASE2_WEAPON, m_creature); @@ -656,7 +656,7 @@ struct boss_kaelthasAI : public ScriptedAI if (Phase_Timer <= diff) { DoScriptText(SAY_PHASE3_ADVANCE, m_creature); - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(DATA_KAELTHASEVENT, 3); Phase = 3; PhaseSubphase = 0; @@ -692,7 +692,7 @@ struct boss_kaelthasAI : public ScriptedAI DoScriptText(SAY_PHASE4_INTRO2, m_creature); Phase = 4; - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(DATA_KAELTHASEVENT, 4); // Sometimes people can collect Aggro in Phase 1-3. Reset threat before releasing Kael. @@ -785,7 +785,7 @@ struct boss_kaelthasAI : public ScriptedAI { if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 50) { - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(DATA_KAELTHASEVENT, 4); Phase = 5; Phase_Timer = 10000; |