diff options
Diffstat (limited to 'src/server/scripts/Northrend')
7 files changed, 58 insertions, 51 deletions
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp index 03de3d374ef..1966e26b128 100755 --- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp +++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp @@ -105,7 +105,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript bool IsEncounterInProgress() const { - for (uint8 i = 0; i < MAX_ENCOUNTERS ; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) if (EncounterStatus[i] == IN_PROGRESS) return true; return false; diff --git a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp index 1a51f424dc8..93f4b58120f 100644 --- a/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp +++ b/src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp @@ -457,7 +457,7 @@ public: { if (HealthBelowPct(45)) { - Phase = 3 ; + Phase = 3; DoScriptText(SAY_REQUEST_AID, me); //here Lich King should respond to KelThuzad but I don't know which Creature to make talk //so for now just make Kelthuzad says it. diff --git a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp index c05d9a21850..50eb52cc4c2 100644 --- a/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp +++ b/src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp @@ -465,7 +465,6 @@ public: playerDied = buff2; } }; - }; void AddSC_instance_naxxramas() diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp index 357b0bad13c..b96d7c4aa84 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp @@ -203,7 +203,7 @@ public: if (!instance || instance->GetData(DATA_UROM_PLATAFORM) > 2) return; - for (uint8 i = 0; i < 4 ; i++) + for (uint8 i = 0; i < 4; i++) { SetPosition(i); me->SummonCreature(Group[group[instance->GetData(DATA_UROM_PLATAFORM)]].entry[i], x, y, me->GetPositionZ(), me->GetOrientation()); diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp index 7ebaac1e938..19a84fdae84 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp @@ -308,7 +308,7 @@ class spell_varos_energize_core_area_enemy : public SpellScriptLoader float orientation = CAST_AI(boss_varos::boss_varosAI, varos->AI())->GetCoreEnergizeOrientation(); - for (std::list<Unit*>::iterator itr = targetList.begin() ; itr != targetList.end();) + for (std::list<Unit*>::iterator itr = targetList.begin(); itr != targetList.end();) { Position pos; (*itr)->GetPosition(&pos); @@ -355,7 +355,7 @@ class spell_varos_energize_core_area_entry : public SpellScriptLoader float orientation = CAST_AI(boss_varos::boss_varosAI, varos->AI())->GetCoreEnergizeOrientation(); - for (std::list<Unit*>::iterator itr = targetList.begin() ; itr != targetList.end();) + for (std::list<Unit*>::iterator itr = targetList.begin(); itr != targetList.end();) { Position pos; (*itr)->GetPosition(&pos); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp index 50417b0ac07..95d2cb1709e 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp @@ -48,65 +48,77 @@ public: void Reset() { - if (fm_Type == 0) fm_Type = GetForgeMasterType(); + if (fm_Type == 0) + fm_Type = GetForgeMasterType(); + CheckForge(); } void CheckForge() { - if (instance) + if (instance) { switch (fm_Type) { - case 1: - instance->SetData(EVENT_FORGE_1, me->isAlive() ? NOT_STARTED : DONE); - break; - case 2: - instance->SetData(EVENT_FORGE_2, me->isAlive() ? NOT_STARTED : DONE); - break; - case 3: - instance->SetData(EVENT_FORGE_3, me->isAlive() ? NOT_STARTED : DONE); - break; + case 1: + instance->SetData(EVENT_FORGE_1, me->isAlive() ? NOT_STARTED : DONE); + break; + + case 2: + instance->SetData(EVENT_FORGE_2, me->isAlive() ? NOT_STARTED : DONE); + break; + + case 3: + instance->SetData(EVENT_FORGE_3, me->isAlive() ? NOT_STARTED : DONE); + break; } } } void JustDied(Unit* /*killer*/) { - if (fm_Type == 0) fm_Type = GetForgeMasterType(); + if (fm_Type == 0) + fm_Type = GetForgeMasterType(); + if (instance) { switch (fm_Type) { - case 1: - instance->SetData(EVENT_FORGE_1, DONE); - break; - case 2: - instance->SetData(EVENT_FORGE_2, DONE); - break; - case 3: - instance->SetData(EVENT_FORGE_3, DONE); - break; + case 1: + instance->SetData(EVENT_FORGE_1, DONE); + break; + + case 2: + instance->SetData(EVENT_FORGE_2, DONE); + break; + + case 3: + instance->SetData(EVENT_FORGE_3, DONE); + break; } } } void EnterCombat(Unit* /*who*/) { - if (fm_Type == 0) fm_Type = GetForgeMasterType(); + if (fm_Type == 0) + fm_Type = GetForgeMasterType(); + if (instance) { switch (fm_Type) { - case 1: - instance->SetData(EVENT_FORGE_1, IN_PROGRESS); - break; - case 2: - instance->SetData(EVENT_FORGE_2, IN_PROGRESS); - break; - case 3: - instance->SetData(EVENT_FORGE_3, IN_PROGRESS); - break; + case 1: + instance->SetData(EVENT_FORGE_1, IN_PROGRESS); + break; + + case 2: + instance->SetData(EVENT_FORGE_2, IN_PROGRESS); + break; + + case 3: + instance->SetData(EVENT_FORGE_3, IN_PROGRESS); + break; } } me->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE); @@ -115,29 +127,26 @@ public: uint8 GetForgeMasterType() { float diff = 30.0f; - int near_f = 0; + uint8 near_f = 0; - for (uint8 i = 0; i < 3 ; ++i) + for (uint8 i = 0; i < 3; ++i) { - GameObject* temp; - temp = me->FindNearestGameObject(entry_search[i], 30); - if (temp) + if (GameObject* go = me->FindNearestGameObject(entry_search[i], 30)) { - if (me->IsWithinDist(temp, diff, false)) + if (me->IsWithinDist(go, diff, false)) { near_f = i + 1; - diff = me->GetDistance2d(temp); - + diff = me->GetDistance2d(go); } } } switch (near_f) { - case 1: return 1; - case 2: return 2; - case 3: return 3; - default: return 0; + case 1: return 1; + case 2: return 2; + case 3: return 3; + default: return 0; } } @@ -152,7 +161,6 @@ public: DoMeleeAttackIfReady(); } }; - }; void AddSC_utgarde_keep() diff --git a/src/server/scripts/Northrend/zuldrak.cpp b/src/server/scripts/Northrend/zuldrak.cpp index 33d295e5970..f0e8ce9b2c1 100644 --- a/src/server/scripts/Northrend/zuldrak.cpp +++ b/src/server/scripts/Northrend/zuldrak.cpp @@ -1071,7 +1071,7 @@ public: SummonList.clear(); - for (uint8 uiI = 0; uiI < 16 ; uiI++) + for (uint8 uiI = 0; uiI < 16; uiI++) { if (Creature* summon = me->SummonCreature(Boss[uiBossRandom].uiAdd, AddSpawnPosition[uiI])) { |
