diff options
author | Manuel Carrasco <manue.l@live.com.ar> | 2011-11-27 14:52:28 -0300 |
---|---|---|
committer | Manuel Carrasco <manue.l@live.com.ar> | 2011-11-27 14:52:28 -0300 |
commit | df3f11dc805a552e9e2ac781adcd8f4c6ac9a075 (patch) | |
tree | 97db22c780064d1ef933e8f8c74979990b0d489e /src | |
parent | 015e4596165fa435bb966bbc9ad55157508bb265 (diff) |
Scripts/EoE: Malygos does not fly always.
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp index 282e6b3eb98..f28cd537e03 100644 --- a/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp +++ b/src/server/scripts/Northrend/Nexus/EyeOfEternity/boss_malygos.cpp @@ -240,6 +240,8 @@ public: me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); _cannotMove = true; + + me->SetFlying(true); } uint32 GetData(uint32 data) @@ -351,6 +353,8 @@ public: _EnterCombat(); me->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + me->SetFlying(false); + me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); Talk(SAY_AGGRO_P_ONE); @@ -404,6 +408,7 @@ public: void PrepareForVortex() { me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + me->SetFlying(true); me->GetMotionMaster()->MovementExpired(); me->GetMotionMaster()->MovePoint(MOVE_VORTEX, MalygosPositions[1].GetPositionX(), MalygosPositions[1].GetPositionY(), MalygosPositions[1].GetPositionZ()); @@ -439,6 +444,7 @@ public: me->SetInCombatWithZone(); break; case MOVE_CENTER_PLATFORM: + // Malygos is already flying here, there is no need to set it again. _cannotMove = false; // malygos will move into center of platform and then he does not chase dragons, he just turns to his current target. me->GetMotionMaster()->MoveIdle(); @@ -451,22 +457,21 @@ public: SetPhase(PHASE_TWO, true); me->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + me->SetFlying(true); me->GetMotionMaster()->MoveIdle(); me->GetMotionMaster()->MovePoint(MOVE_DEEP_BREATH_ROTATION, MalygosPhaseTwoWaypoints[0]); - Creature* summon = me->SummonCreature(NPC_HOVER_DISK_CASTER, HoverDiskWaypoints[MAX_HOVER_DISK_WAYPOINTS-1]); - if (summon && summon->IsAIEnabled) - summon->AI()->DoAction(ACTION_HOVER_DISK_START_WP_2); - summon = me->SummonCreature(NPC_HOVER_DISK_CASTER, HoverDiskWaypoints[0]); - if (summon && summon->IsAIEnabled) - summon->AI()->DoAction(ACTION_HOVER_DISK_START_WP_1); - for (uint8 i = 0; i < 2; i++) { + // Starting position. One starts from the first waypoint and another from the last. + uint8 pos = !i ? MAX_HOVER_DISK_WAYPOINTS-1 : 0; + if (Creature* summon = me->SummonCreature(NPC_HOVER_DISK_CASTER, HoverDiskWaypoints[pos])) + if (summon->IsAIEnabled) + summon->AI()->DoAction(ACTION_HOVER_DISK_START_WP_1+i); + // not sure about its position. - summon = me->SummonCreature(NPC_HOVER_DISK_MELEE, HoverDiskWaypoints[0]); - if (summon) + if (Creature* summon = me->SummonCreature(NPC_HOVER_DISK_MELEE, HoverDiskWaypoints[0])) summon->SetInCombatWithZone(); } } @@ -695,6 +700,7 @@ class spell_malygos_vortex_visual : public SpellScriptLoader malygos->SetInCombatWithZone(); malygos->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); + malygos->SetFlying(false); malygos->GetMotionMaster()->MoveChase(caster->getVictim()); malygos->RemoveAura(SPELL_VORTEX_1); |