mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Scripts/EoE: Malygos does not fly always.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user