From 747350a0bcffaa4ef2b5d3317bb75fac78c64472 Mon Sep 17 00:00:00 2001 From: joschiwald Date: Sun, 26 Oct 2014 01:46:28 +0200 Subject: Scripts: replaced various Location struct defines with proper Position or G3D::Vector3 --- .../scripts/Outland/BlackTemple/boss_illidan.cpp | 19 +++++++------------ .../Outland/BlackTemple/boss_mother_shahraz.cpp | 7 +------ .../Outland/BlackTemple/boss_reliquary_of_souls.cpp | 7 +------ .../Outland/BlackTemple/boss_shade_of_akama.cpp | 9 ++------- src/server/scripts/Outland/zone_shadowmoon_valley.cpp | 14 ++------------ 5 files changed, 13 insertions(+), 43 deletions(-) (limited to 'src/server/scripts/Outland') diff --git a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp index 8e7df5f1c3f..6b11d8715b8 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_illidan.cpp @@ -298,12 +298,7 @@ static const Yells Conversation[22] = {0, "", EMPTY, 1000, 0, false} // 21 }; -struct Locations -{ - float x, y, z; -}; - -static const Locations HoverPosition[4]= +G3D::Vector3 const HoverPosition[4]= { {657.0f, 340.0f, 355.0f}, {657.0f, 275.0f, 355.0f}, @@ -311,7 +306,7 @@ static const Locations HoverPosition[4]= {705.0f, 340.0f, 355.0f} }; -static const Locations GlaivePosition[4]= +G3D::Vector3 const GlaivePosition[4]= { {695.105f, 305.303f, 354.256f}, {659.338f, 305.303f, 354.256f}, // the distance between two glaives is 36 @@ -319,13 +314,13 @@ static const Locations GlaivePosition[4]= {664.338f, 305.303f, 354.256f} }; -static const Locations EyeBlast[2]= +G3D::Vector3 const EyeBlast[2]= { {677.0f, 350.0f, 354.0f}, // start point, pass through glaive point {677.0f, 260.0f, 354.0f} }; -static const Locations AkamaWP[13]= +G3D::Vector3 const AkamaWP[13]= { {770.01f, 304.50f, 312.29f}, // Bottom of the first stairs, at the doors {780.66f, 304.50f, 319.74f}, // Top of the first stairs @@ -342,7 +337,7 @@ static const Locations AkamaWP[13]= {782.01f, 304.55f, 319.76f} // Final location - back at the initial gates. This is where he will fight the minions! (12) }; // 755.762f, 304.0747f, 312.1769f -- This is where Akama should be spawned -static const Locations SpiritSpawns[2]= +G3D::Vector3 const SpiritSpawns[2]= { {755.5426f, 309.9156f, 312.2129f}, {755.5426f, 298.7923f, 312.0834f} @@ -734,14 +729,14 @@ public: disty = EyeBlast[i].y - HoverPosition[HoverPoint].y; dist[i] = distx * distx + disty * disty; } - Locations initial = EyeBlast[dist[0] < dist[1] ? 0 : 1]; + G3D::Vector3 initial = EyeBlast[dist[0] < dist[1] ? 0 : 1]; for (uint8 i = 0; i < 2; ++i) { distx = GlaivePosition[i].x - HoverPosition[HoverPoint].x; disty = GlaivePosition[i].y - HoverPosition[HoverPoint].y; dist[i] = distx * distx + disty * disty; } - Locations final = GlaivePosition[dist[0] < dist[1] ? 0 : 1]; + G3D::Vector3 final = GlaivePosition[dist[0] < dist[1] ? 0 : 1]; final.x = 2 * final.x - initial.x; final.y = 2 * final.y - initial.y; diff --git a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp index ed145045131..24d6eb6c831 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_mother_shahraz.cpp @@ -82,12 +82,7 @@ uint32 PrismaticAuras[]= 40897, // Holy }; -struct Locations -{ - float x, y, z; -}; - -static Locations TeleportPoint[]= +G3D::Vector3 const TeleportPoint[]= { {959.996f, 212.576f, 193.843f}, {932.537f, 231.813f, 193.838f}, diff --git a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp index 6c15784c35e..d49a23c85dd 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_reliquary_of_souls.cpp @@ -84,12 +84,7 @@ enum ReliquaryOfSouls NUMBER_ENSLAVED_SOUL = 8 }; -struct Position2d -{ - float x, y; -}; - -static Position2d Coords[]= +G3D::Vector2 const Coords[]= { {450.4f, 212.3f}, {542.1f, 212.3f}, diff --git a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp index ecc4457e454..6ff865cfcd0 100644 --- a/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp +++ b/src/server/scripts/Outland/BlackTemple/boss_shade_of_akama.cpp @@ -141,14 +141,9 @@ enum Events EVENT_SPIRIT_HEAL = 24 }; -struct Location -{ - float x, y, z; -}; - -static Location ShadeWP = { 512.4877f, 400.7993f, 112.7837f }; +G3D::Vector3 const ShadeWP = { 512.4877f, 400.7993f, 112.7837f }; -static Location AkamaWP[] = +G3D::Vector3 const AkamaWP[] = { { 517.4877f, 400.7993f, 112.7837f }, { 468.4435f, 401.1062f, 118.5379f } diff --git a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp index b37adae3fe9..2dd5c81a2ee 100644 --- a/src/server/scripts/Outland/zone_shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/zone_shadowmoon_valley.cpp @@ -1213,13 +1213,8 @@ static TorlothCinematic TorlothAnim[]= {0, 0} }; -struct Location -{ - float x, y, z, o; -}; - //Cordinates for Spawns -static Location SpawnLocation[]= +static Position SpawnLocation[]= { //Cords used for: {-4615.8556f, 1342.2532f, 139.9f, 1.612f}, //Illidari Soldier @@ -1727,12 +1722,7 @@ void npc_lord_illidan_stormrage::npc_lord_illidan_stormrageAI::SummonNextWave() for (uint8 i = 0; i < count; ++i) { - Creature* Spawn = NULL; - float X = SpawnLocation[locIndex + i].x; - float Y = SpawnLocation[locIndex + i].y; - float Z = SpawnLocation[locIndex + i].z; - float O = SpawnLocation[locIndex + i].o; - Spawn = me->SummonCreature(WavesInfo[WaveCount].CreatureId, X, Y, Z, O, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); + Creature* Spawn = me->SummonCreature(WavesInfo[WaveCount].CreatureId, SpawnLocation[locIndex + i], TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 60000); ++LiveCount; if (Spawn) -- cgit v1.2.3