aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/EasternKingdoms
diff options
context:
space:
mode:
authorSpp <none@none>2010-12-06 02:07:53 +0100
committerSpp <none@none>2010-12-06 02:07:53 +0100
commit408fce1de69249b82cc042cb31f3fd16983c7e81 (patch)
treef4b99f386821e70f155d9aa61b70cfb1f2d3d825 /src/server/scripts/EasternKingdoms
parente226c4ac344d06c7abbd6f04725ced2b33606349 (diff)
Core: Some optimizations
- Declare some functions const - Fix some mem leak - Fix some resource leak - Remove unused variables and functions - Remove duplicate functions - Reduce the scope of some variables - Remove unused file --HG-- branch : trunk
Diffstat (limited to 'src/server/scripts/EasternKingdoms')
-rw-r--r--src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp3
-rw-r--r--src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp65
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp2
-rw-r--r--src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp2
4 files changed, 34 insertions, 38 deletions
diff --git a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
index 74462736992..e633c748146 100644
--- a/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
+++ b/src/server/scripts/EasternKingdoms/MagistersTerrace/boss_priestess_delrissa.cpp
@@ -299,14 +299,11 @@ public:
if (DispelTimer <= diff)
{
Unit *pTarget = NULL;
- bool friendly = false;
if (urand(0,1))
pTarget = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
else
{
- friendly = true;
-
if (urand(0,1))
pTarget = me;
else
diff --git a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
index 69ea27b46cc..ed990b9684c 100644
--- a/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
+++ b/src/server/scripts/EasternKingdoms/ScarletEnclave/chapter5.cpp
@@ -229,10 +229,9 @@ enum mograine
SPELL_THUNDER = 53630
};
-struct Locations
+struct Location
{
float x, y, z, o;
- uint32 id;
};
void UpdateWorldState(Map *map, uint32 id, uint32 state)
@@ -249,38 +248,38 @@ void UpdateWorldState(Map *map, uint32 id, uint32 state)
}
}
-static Locations LightofDawnLoc[]=
+static Location LightofDawnLoc[]=
{
- {2281.335f, -5300.409f, 85.170f, 0 ,0}, // 0 Tirion Fordring loc
- {2283.896f, -5287.914f, 83.066f, 1.55f ,0}, // 1 Tirion Fordring loc2
- {2281.461f, -5263.014f, 81.164f, 0 ,0}, // 2 Tirion charges
- {2262.277f, -5293.477f, 82.167f, 0 ,0}, // 3 Tirion run
- {2270.286f, -5287.73f, 82.262f, 0 ,0}, // 4 Tirion relocate
- {2269.511f, -5288.289f, 82.225f, 0 ,0}, // 5 Tirion forward
- {2262.277f, -5293.477f, 82.167f, 0 ,0}, // 6 Tirion runs to Darion
- {2270.286f, -5287.73f, 82.262f, 0 ,0},
- {2269.511f, -5288.289f, 82.225f, 0 ,0},
- {2273.205f, -5288.848f, 82.617f, 0 ,0}, // 9 Korfax loc1
- {2274.739f, -5287.926f, 82.684f, 0 ,0}, // 10 Korfax loc2
- {2253.673f, -5318.004f, 81.724f, 0 ,0}, // 11 Korfax kicked
- {2287.028f, -5309.644f, 87.253f, 0 ,0}, // 12 Maxwell loc1
- {2286.978f, -5308.025f, 86.83f, 0 ,0}, // 13 Maxwell loc2
- {2248.877f, -5307.586f, 82.166f, 0 ,0}, // 14 maxwell kicked
- {2278.58f, -5316.933f, 88.319f, 0 ,0}, // 15 Eligor loc1
- {2278.535f, -5315.479f, 88.08f, 0 ,0}, // 16 Eligor loc2
- {2259.416f, -5304.505f, 82.149f, 0 ,0}, // 17 eligor kicked
- {2289.259f, -5280.355f, 82.112f, 0 ,0}, // 18 Koltira loc1
- {2289.02f, -5281.985f, 82.207f, 0 ,0}, // 19 Koltira loc2
- {2273.289f, -5273.675f, 81.701f, 0 ,0}, // 20 Thassarian loc1
- {2273.332f, -5275.544f, 81.849f, 0 ,0}, // 21 Thassarian loc2
- {2281.198f, -5257.397f, 80.224f, 4.66f ,0}, // 22 Alexandros loc1
- {2281.156f, -5259.934f, 80.647f, 0 ,0}, // 23 Alexandros loc2
- {2281.294f, -5281.895f, 82.445f, 1.35f ,0}, // 24 Darion loc1
- {2281.093f, -5263.013f, 81.125f, 0 ,0}, // 25 Darion loc1
- {2281.313f, -5250.282f, 79.322f, 4.69f ,0}, // 26 Lich King spawns
- {2281.523f, -5261.058f, 80.877f, 0 ,0}, // 27 Lich king move forwards
- {2272.709f, -5255.552f, 78.226f, 0 ,0}, // 28 Lich king kicked
- {2273.972f, -5257.676f, 78.862f, 0, 0}, // 29 Lich king moves forward
+ {2281.335f, -5300.409f, 85.170f, 0}, // 0 Tirion Fordring loc
+ {2283.896f, -5287.914f, 83.066f, 1.55f}, // 1 Tirion Fordring loc2
+ {2281.461f, -5263.014f, 81.164f, 0}, // 2 Tirion charges
+ {2262.277f, -5293.477f, 82.167f, 0}, // 3 Tirion run
+ {2270.286f, -5287.73f, 82.262f, 0}, // 4 Tirion relocate
+ {2269.511f, -5288.289f, 82.225f, 0}, // 5 Tirion forward
+ {2262.277f, -5293.477f, 82.167f, 0}, // 6 Tirion runs to Darion
+ {2270.286f, -5287.73f, 82.262f, 0},
+ {2269.511f, -5288.289f, 82.225f, 0},
+ {2273.205f, -5288.848f, 82.617f, 0}, // 9 Korfax loc1
+ {2274.739f, -5287.926f, 82.684f, 0}, // 10 Korfax loc2
+ {2253.673f, -5318.004f, 81.724f, 0}, // 11 Korfax kicked
+ {2287.028f, -5309.644f, 87.253f, 0}, // 12 Maxwell loc1
+ {2286.978f, -5308.025f, 86.83f, 0}, // 13 Maxwell loc2
+ {2248.877f, -5307.586f, 82.166f, 0}, // 14 maxwell kicked
+ {2278.58f, -5316.933f, 88.319f, 0}, // 15 Eligor loc1
+ {2278.535f, -5315.479f, 88.08f, 0}, // 16 Eligor loc2
+ {2259.416f, -5304.505f, 82.149f, 0}, // 17 eligor kicked
+ {2289.259f, -5280.355f, 82.112f, 0}, // 18 Koltira loc1
+ {2289.02f, -5281.985f, 82.207f, 0}, // 19 Koltira loc2
+ {2273.289f, -5273.675f, 81.701f, 0}, // 20 Thassarian loc1
+ {2273.332f, -5275.544f, 81.849f, 0}, // 21 Thassarian loc2
+ {2281.198f, -5257.397f, 80.224f, 4.66f}, // 22 Alexandros loc1
+ {2281.156f, -5259.934f, 80.647f, 0}, // 23 Alexandros loc2
+ {2281.294f, -5281.895f, 82.445f, 1.35f}, // 24 Darion loc1
+ {2281.093f, -5263.013f, 81.125f, 0}, // 25 Darion loc1
+ {2281.313f, -5250.282f, 79.322f, 4.69f}, // 26 Lich King spawns
+ {2281.523f, -5261.058f, 80.877f, 0}, // 27 Lich king move forwards
+ {2272.709f, -5255.552f, 78.226f, 0}, // 28 Lich king kicked
+ {2273.972f, -5257.676f, 78.862f, 0}, // 29 Lich king moves forward
};
class npc_highlord_darion_mograine : public CreatureScript
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
index 2e7598284d3..eb0cd759bb1 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_hexlord.cpp
@@ -128,7 +128,7 @@ struct PlayerAbilityStruct
{
uint32 spell;
AbilityTarget target;
- uint32 cooldown;
+ uint32 cooldown; //FIXME - it's never used
};
static PlayerAbilityStruct PlayerAbility[][3] =
diff --git a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
index 63eed3267bc..3b14f247792 100644
--- a/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
+++ b/src/server/scripts/EasternKingdoms/ZulAman/instance_zulaman.cpp
@@ -38,7 +38,7 @@ EndScriptData */
// But we cannot add loots to gameobject, so we have to use the fixed loot_template
struct SHostageInfo
{
- uint32 npc, go;
+ uint32 npc, go; // FIXME go Not used
float x, y, z, o;
};