aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Northrend
diff options
context:
space:
mode:
authorGyx <2359980687@qq.com>2012-03-28 11:13:37 +0800
committerGyx <2359980687@qq.com>2012-03-28 11:13:37 +0800
commite050945c91f6ff5764b336df790198b59323e65e (patch)
treee722796be35bb4b460c696c824683ae105ef3360 /src/server/scripts/Northrend
parent63c4d2b96eda0f7f3e7fba2a6a009b52be01cbbd (diff)
Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
Diffstat (limited to 'src/server/scripts/Northrend')
-rwxr-xr-xsrc/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/instance_trial_of_the_crusader.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_kelthuzad.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/instance_naxxramas.cpp1
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_urom.cpp2
-rw-r--r--src/server/scripts/Northrend/Nexus/Oculus/boss_varos.cpp4
-rw-r--r--src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp96
-rw-r--r--src/server/scripts/Northrend/zuldrak.cpp2
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]))
{