Last active
December 12, 2015 03:38
-
-
Save krofna/4708462 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | |
index af5131a..3a350e7 100644 | |
--- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | |
+++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | |
@@ -238,50 +238,48 @@ enum Texts | |
}; | |
#define MAX_RANGE_HOVER_DISK_WAYPOINTS 18 | |
-Position const FirstScionHoverDiskSpawnPos = { 773.3994f, 1281.108f, 285.0521f }; | |
-Position const SecondScionHoverDiskSpawnPos = { 773.5685f, 1322.686f, 285.0522f }; | |
-Position const ThirdScionHoverDiskSpawnPos = { 735.6907f, 1322.281f, 285.0522f }; | |
-Position const ForthScionHoverDiskSpawnPos = { 754.2831f, 1329.629f, 285.0522f }; | |
-Position const FifthScionHoverDiskSpawnPos = { 782.5959f, 1301.626f, 285.0522f }; | |
-Position const SixthScionHoverDiskSpawnPos = { 726.1581f, 1301.761f, 285.0522f }; | |
-Position const SeventhScionHoverDiskSpawnPos = { 734.7434f, 1281.214f, 285.0522f }; | |
-Position const EightScionHoverDiskSpawnPos = { 754.3865f, 1273.441f, 285.0522f }; | |
+Position const ScionHoverDiskSpawnPos[] = | |
+{ | |
+ { 773.3994f, 1281.108f, 285.0521f }, | |
+ { 773.5685f, 1322.686f, 285.0522f }, | |
+ { 735.6907f, 1322.281f, 285.0522f }, | |
+ { 754.2831f, 1329.629f, 285.0522f }, | |
+ { 782.5959f, 1301.626f, 285.0522f }, | |
+ { 726.1581f, 1301.761f, 285.0522f }, | |
+ { 734.7434f, 1281.214f, 285.0522f }, | |
+ { 754.3865f, 1273.441f, 285.0522f } | |
+}; | |
#define MAX_MELEE_HOVER_DISK_WAYPOINTS 4 | |
-Position const FirstNexusHoverDiskSpawnPos = { 754.4617f, 1283.859f, 285.0522f }; | |
-Position const FirstNexusHoverWaypoints[MAX_MELEE_HOVER_DISK_WAYPOINTS] = | |
+Position const NexusHoverWaypoints[][MAX_MELEE_HOVER_DISK_WAYPOINTS] = | |
{ | |
{ 766.2931f, 1312.904f, 277.0551f }, | |
{ 754.3397f, 1319.759f, 274.0536f }, | |
{ 742.1018f, 1312.714f, 270.1367f }, | |
{ 735.6851f, 1301.422f, 266.7208f }, | |
-}; | |
- | |
-Position const SecondNexusHoverDiskSpawnPos = { 771.7864f, 1301.853f, 285.0522f }; | |
-Position const SecondNexusHoverWaypoints[MAX_MELEE_HOVER_DISK_WAYPOINTS] = | |
-{ | |
+ | |
{ 742.6257f, 1313.471f, 275.9713f }, | |
{ 736.8845f, 1301.921f, 274.0264f }, | |
{ 742.6632f, 1289.951f, 269.8603f }, | |
{ 754.3682f, 1283.942f, 266.6098f }, | |
-}; | |
- | |
-Position const ThirdNexusHoverDiskSpawnPos = { 753.9635f, 1319.003f, 285.0522f }; | |
-Position const ThirdNexusHoverWaypoints[MAX_MELEE_HOVER_DISK_WAYPOINTS] = | |
-{ | |
+ | |
{ 742.2078f, 1290.518f, 276.2484f }, | |
{ 754.5398f, 1284.311f, 273.5815f }, | |
{ 766.5588f, 1290.345f, 269.6655f }, | |
{ 773.4768f, 1301.474f, 266.5821f }, | |
-}; | |
-Position const ForthNexusHoverDiskSpawnPos = { 736.4914f, 1301.683f, 285.0522f }; | |
-Position const ForthNexusHoverWaypoints[MAX_MELEE_HOVER_DISK_WAYPOINTS] = | |
-{ | |
{ 766.1189f, 1290.197f, 276.9436f }, | |
{ 771.9507f, 1301.602f, 273.9712f }, | |
{ 766.1253f, 1313.451f, 270.4991f }, | |
- { 754.5378f, 1319.399f, 266.6653f }, | |
+ { 754.5378f, 1319.399f, 266.6653f } | |
+}; | |
+ | |
+Position const NexusHoverDiskSpawnPos[] = | |
+{ | |
+ { 754.4617f, 1283.859f, 285.0522f }, | |
+ { 771.7864f, 1301.853f, 285.0522f }, | |
+ { 753.9635f, 1319.003f, 285.0522f }, | |
+ { 736.4914f, 1301.683f, 285.0522f } | |
}; | |
#define MAX_SUMMONS_PHASE_TWO_10MAN 4 | |
@@ -822,26 +820,7 @@ public: | |
{ | |
for (uint8 rangeDisks = 0; rangeDisks < GetDifficulty() == RAID_DIFFICULTY_10MAN_NORMAL ? 4 : 5; rangeDisks++) | |
{ | |
- Creature* scionSummon = 0; | |
- | |
- switch (rangeDisks) | |
- { | |
- case 0: | |
- scionSummon = me->SummonCreature(NPC_HOVER_DISK_CASTER, FirstScionHoverDiskSpawnPos); | |
- break; | |
- case 1: | |
- scionSummon = me->SummonCreature(NPC_HOVER_DISK_CASTER, SecondScionHoverDiskSpawnPos); | |
- break; | |
- case 2: | |
- scionSummon = me->SummonCreature(NPC_HOVER_DISK_CASTER, ThirdScionHoverDiskSpawnPos); | |
- break; | |
- case 3: | |
- scionSummon = me->SummonCreature(NPC_HOVER_DISK_CASTER, ForthScionHoverDiskSpawnPos); | |
- break; | |
- case 4: | |
- scionSummon = me->SummonCreature(NPC_HOVER_DISK_CASTER, FifthScionHoverDiskSpawnPos); | |
- break; | |
- } | |
+ Creature* scionSummon = me->SummonCreature(NPC_HOVER_DISK_CASTER, ScionHoverDiskSpawnPos[rangeDisks]); | |
if (scionSummon->IsAIEnabled) | |
scionSummon->AI()->DoAction(rangeDisks); | |
@@ -849,17 +828,7 @@ public: | |
for (uint8 meleeDisks = 0; meleeDisks < 2; meleeDisks++) | |
{ | |
- Creature* lordSummon = 0; | |
- | |
- switch (meleeDisks) | |
- { | |
- case 0: | |
- lordSummon = me->SummonCreature(NPC_HOVER_DISK_MELEE, FirstNexusHoverDiskSpawnPos); | |
- break; | |
- case 1: | |
- lordSummon = me->SummonCreature(NPC_HOVER_DISK_MELEE, SecondNexusHoverDiskSpawnPos); | |
- break; | |
- } | |
+ Creature* lordSummon = me->SummonCreature(NPC_HOVER_DISK_MELEE, NexusHoverDiskSpawnPos[meleeDisks]); | |
if (lordSummon->IsAIEnabled) | |
lordSummon->AI()->DoAction(meleeDisks + 8); | |
@@ -873,20 +842,7 @@ public: | |
case EVENT_DELAYED_REINFORCEMENTS: | |
for (uint8 rangeDisks = 5; rangeDisks < 8; rangeDisks++) | |
{ | |
- Creature* scionSummon = 0; | |
- | |
- switch (rangeDisks) | |
- { | |
- case 5: | |
- scionSummon = me->SummonCreature(NPC_HOVER_DISK_CASTER, SixthScionHoverDiskSpawnPos); | |
- break; | |
- case 6: | |
- scionSummon = me->SummonCreature(NPC_HOVER_DISK_CASTER, SeventhScionHoverDiskSpawnPos); | |
- break; | |
- case 7: | |
- scionSummon = me->SummonCreature(NPC_HOVER_DISK_CASTER, EightScionHoverDiskSpawnPos); | |
- break; | |
- } | |
+ Creature* scionSummon = me->SummonCreature(NPC_HOVER_DISK_CASTER, ScionHoverDiskSpawnPos[rangeDisks]); | |
if (scionSummon->IsAIEnabled) | |
scionSummon->AI()->DoAction(rangeDisks); | |
@@ -894,17 +850,7 @@ public: | |
for (uint8 meleeDisks = 2; meleeDisks < 4; meleeDisks++) | |
{ | |
- Creature* lordSummon = 0; | |
- | |
- switch (meleeDisks) | |
- { | |
- case 2: | |
- lordSummon = me->SummonCreature(NPC_HOVER_DISK_MELEE, ThirdNexusHoverDiskSpawnPos); | |
- break; | |
- case 3: | |
- lordSummon = me->SummonCreature(NPC_HOVER_DISK_MELEE, ForthNexusHoverDiskSpawnPos); | |
- break; | |
- } | |
+ Creature* lordSummon = me->SummonCreature(NPC_HOVER_DISK_MELEE, NexusHoverDiskSpawnPos[meleeDisks]); | |
if (lordSummon->IsAIEnabled) | |
lordSummon->AI()->DoAction(meleeDisks + 8); | |
@@ -1225,6 +1171,14 @@ public: | |
void DoAction(int32 const action) | |
{ | |
+ if (action >= ACTION_START_MELEE_HOVER_DISK_WP_0) | |
+ { | |
+ for (uint8 i = 0; i < MAX_MELEE_HOVER_DISK_WAYPOINTS; i++) | |
+ AddWaypoint(i, NexusHoverWaypoints[action - ACTION_START_MELEE_HOVER_DISK_WP_0][i].GetPositionX(), | |
+ NexusHoverWaypoints[action - ACTION_START_MELEE_HOVER_DISK_WP_0][i].GetPositionY(), | |
+ NexusHoverWaypoints[action - ACTION_START_MELEE_HOVER_DISK_WP_0][i].GetPositionZ()); | |
+ return; | |
+ } | |
switch (action) | |
{ | |
case ACTION_START_RANGE_HOVER_DISK_WP_0: | |
@@ -1299,22 +1253,6 @@ public: | |
init.Launch(); | |
} | |
break; | |
- case ACTION_START_MELEE_HOVER_DISK_WP_0: | |
- for (uint8 i = 0; i < MAX_MELEE_HOVER_DISK_WAYPOINTS; i++) | |
- AddWaypoint(i, FirstNexusHoverWaypoints[i].GetPositionX(), FirstNexusHoverWaypoints[i].GetPositionY(), FirstNexusHoverWaypoints[i].GetPositionZ()); | |
- break; | |
- case ACTION_START_MELEE_HOVER_DISK_WP_1: | |
- for (uint8 i = 0; i < MAX_MELEE_HOVER_DISK_WAYPOINTS; i++) | |
- AddWaypoint(i, SecondNexusHoverWaypoints[i].GetPositionX(), SecondNexusHoverWaypoints[i].GetPositionY(), SecondNexusHoverWaypoints[i].GetPositionZ()); | |
- break; | |
- case ACTION_START_MELEE_HOVER_DISK_WP_2: | |
- for (uint8 i = 0; i < MAX_MELEE_HOVER_DISK_WAYPOINTS; i++) | |
- AddWaypoint(i, ThirdNexusHoverWaypoints[i].GetPositionX(), ThirdNexusHoverWaypoints[i].GetPositionY(), ThirdNexusHoverWaypoints[i].GetPositionZ()); | |
- break; | |
- case ACTION_START_MELEE_HOVER_DISK_WP_3: | |
- for (uint8 i = 0; i < MAX_MELEE_HOVER_DISK_WAYPOINTS; i++) | |
- AddWaypoint(i, ForthNexusHoverWaypoints[i].GetPositionX(), ForthNexusHoverWaypoints[i].GetPositionY(), ForthNexusHoverWaypoints[i].GetPositionZ()); | |
- break; | |
} | |
if (me->GetEntry() == NPC_HOVER_DISK_MELEE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment