fix(Scripts/SunwellPlateau): Fix Felmyst death event (#21425)
This commit is contained in:
parent
75388c7538
commit
98a8a1306a
@ -0,0 +1,24 @@
|
||||
--
|
||||
DELETE FROM `creature_text` WHERE `CreatureID` = 24844 AND `GroupID` = 1;
|
||||
INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
|
||||
(24844, 1, 0, 'Madrigosa deserved a far better fate. You did what had to be done, but this battle is far from over!', 14, 0, 100, 25261, 3, 'Kalecgos (SWP) - SAY_KALECGOS_MADRIGOSA');
|
||||
|
||||
DELETE FROM `smart_scripts` WHERE (`source_type` = 0 AND `entryorguid` = 24844);
|
||||
INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `event_param5`, `event_param6`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_param4`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES
|
||||
(24844, 0, 0, 1, 34, 0, 100, 0, 0, 6, 0, 0, 0, 0, 5, 293, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Reached Point 6 - Play Emote 293'),
|
||||
(24844, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 207, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Reached Point 6 - Set hover 0'),
|
||||
(24844, 0, 2, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 67, 0, 2000, 2000, 0, 0, 100, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Reached Point 6 - Create Timed Event'),
|
||||
(24844, 0, 3, 4, 59, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 44762, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Timed Event 0 Triggered - Cast \'Camera Shake - Med\''),
|
||||
(24844, 0, 4, 5, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 227, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Timed Event 0 Triggered - Set Scale to 1%'),
|
||||
(24844, 0, 5, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 67, 1, 1000, 1000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Timed Event 0 Triggered - Create Timed Event'),
|
||||
(24844, 0, 6, 7, 59, 0, 100, 0, 1, 0, 0, 0, 0, 0, 11, 46307, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Timed Event 1 Triggered - Cast \'Scrying Orb Kill Credit\''),
|
||||
(24844, 0, 7, 8, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 24085, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Timed Event 1 Triggered - Cast \'Transform Visual\''),
|
||||
(24844, 0, 8, 9, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 11, 44670, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Timed Event 1 Triggered - Cast \'KalecgosTransform into Kalec\''),
|
||||
(24844, 0, 9, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 36, 24848, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Timed Event 1 Triggered - Update Template To \'Kalecgos\''),
|
||||
(24844, 0, 10, 11, 34, 0, 100, 0, 8, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Reached Point 1 - Say Line 1'),
|
||||
(24844, 0, 11, 0, 61, 0, 100, 1, 0, 0, 0, 0, 0, 0, 67, 2, 4000, 4000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Reached Point 1 - Create Timed Event'),
|
||||
(24844, 0, 12, 0, 59, 0, 100, 0, 2, 0, 0, 0, 0, 0, 69, 2, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1511.65, 550.702, 25.5101, 0, 'Kalecgos - On Timed Event 2 Triggered - Move To Self'),
|
||||
(24844, 0, 13, 14, 34, 0, 100, 0, 8, 2, 0, 0, 0, 0, 11, 46650, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Reached Point 2 - Cast \'Open Brutallus Back Door\''),
|
||||
(24844, 0, 14, 0, 61, 0, 100, 0, 0, 0, 0, 0, 0, 0, 67, 3, 4000, 4000, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Reached Point 2 - Create Timed Event'),
|
||||
(24844, 0, 15, 0, 59, 0, 100, 0, 3, 0, 0, 0, 0, 0, 69, 3, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1648.26, 519.377, 165.848, 0, 'Kalecgos - On Timed Event 3 Triggered - Move To Self'),
|
||||
(24844, 0, 16, 0, 34, 0, 100, 0, 8, 3, 0, 0, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Kalecgos - On Reached Point 3 - Despawn Instant');
|
||||
@ -79,7 +79,10 @@ public:
|
||||
scheduler.Schedule(1min, 1min, DATA_KALECGOS,[this](TaskContext)
|
||||
{
|
||||
if (Creature* kalecgos = instance->SummonCreature(NPC_KALECGOS, KalecgosSpawnPos))
|
||||
{
|
||||
kalecgos->GetMotionMaster()->MovePath(PATH_KALECGOS_FLIGHT, false);
|
||||
kalecgos->AI()->Talk(SAY_KALECGOS_SPAWN);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,6 +69,11 @@ enum MovementData
|
||||
PATH_KALECGOS_FLIGHT = 248440
|
||||
};
|
||||
|
||||
enum CreatureTexts
|
||||
{
|
||||
SAY_KALECGOS_SPAWN = 0
|
||||
};
|
||||
|
||||
template <class AI, class T>
|
||||
inline AI* GetMagistersTerraceAI(T* obj)
|
||||
{
|
||||
|
||||
@ -73,10 +73,13 @@ enum Misc
|
||||
POINT_AIR_BREATH_END2 = 6,
|
||||
POINT_MISC = 7,
|
||||
|
||||
POINT_KALECGOS = 1,
|
||||
|
||||
GROUP_START_INTRO = 0,
|
||||
GROUP_BREATH = 1,
|
||||
|
||||
NPC_FOG_TRIGGER = 23472
|
||||
NPC_FOG_TRIGGER = 23472,
|
||||
NPC_KALECGOS_FELMYST = 24844 // Same as Magister's Terrace
|
||||
};
|
||||
|
||||
class CorruptTriggers : public BasicEvent
|
||||
@ -159,7 +162,8 @@ struct boss_felmyst : public BossAI
|
||||
instance->DoRemoveAurasDueToSpellOnPlayers(SPELL_FOG_OF_CORRUPTION_CHARM);
|
||||
|
||||
// Summon Kalecgos (human form of kalecgos fight)
|
||||
me->SummonCreature(NPC_KALEC, 1526.28f, 700.10f, 60.0f, 4.33f);
|
||||
if (Creature* kalec = me->SummonCreature(NPC_KALECGOS_FELMYST, 1573.1461f, 755.20245f, 99.524956f, 3.595378f))
|
||||
kalec->GetMotionMaster()->MovePoint(POINT_KALECGOS, 1474.2347f, 624.0703f, 29.32589f, false, true);
|
||||
}
|
||||
|
||||
void MovementInform(uint32 type, uint32 point) override
|
||||
@ -472,14 +476,26 @@ class spell_felmyst_open_brutallus_back_doors : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_felmyst_open_brutallus_back_doors);
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
return GetCaster()->GetInstanceScript();
|
||||
}
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& unitList)
|
||||
{
|
||||
unitList.remove_if(DoorsGuidCheck());
|
||||
}
|
||||
|
||||
void HandleAfterCast()
|
||||
{
|
||||
GetCaster()->GetInstanceScript()->SetBossState(DATA_FELMYST_DOORS, NOT_STARTED);
|
||||
GetCaster()->GetInstanceScript()->SetBossState(DATA_FELMYST_DOORS, DONE);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_felmyst_open_brutallus_back_doors::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
|
||||
AfterCast += SpellCastFn(spell_felmyst_open_brutallus_back_doors::HandleAfterCast);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@ -246,7 +246,9 @@ struct boss_kalecgos : public BossAI
|
||||
|
||||
scheduler.Schedule(16s, [this](TaskContext)
|
||||
{
|
||||
me->SummonCreature(NPC_KALEC, 1702.21f, 931.7f, -74.56f, 5.07f, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
if (Creature* kalec = me->SummonCreature(NPC_KALEC, 1702.21f, 931.7f, -74.56f, 5.07f, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
kalec->CastSpell(kalec, SPELL_SPECTRAL_INVISIBILITY, true);
|
||||
|
||||
me->SummonCreature(NPC_SATHROVARR, 1704.62f, 927.78f, -73.9f, 2.0f, TEMPSUMMON_MANUAL_DESPAWN);
|
||||
});
|
||||
|
||||
@ -264,49 +266,10 @@ struct boss_kalecgos : public BossAI
|
||||
bool _sathBanished;
|
||||
};
|
||||
|
||||
enum Kalec
|
||||
{
|
||||
SPELL_OPEN_BRUTALLUS_BACK_DOOR = 46650,
|
||||
MODEL_KALECGOS_DRAGON = 23487,
|
||||
|
||||
EVENT_KALEC_SCENE_1 = 101,
|
||||
EVENT_KALEC_SCENE_2 = 102,
|
||||
EVENT_KALEC_SCENE_3 = 103
|
||||
};
|
||||
|
||||
struct boss_kalec : public ScriptedAI
|
||||
{
|
||||
boss_kalec(Creature* creature) : ScriptedAI(creature) { }
|
||||
|
||||
void Reset() override
|
||||
{
|
||||
if (me->GetPositionY() < 750.0f)
|
||||
{
|
||||
me->SetSpeed(MOVE_RUN, 2.4f);
|
||||
me->SetDisplayId(MODEL_KALECGOS_DRAGON);
|
||||
me->SetDisableGravity(true);
|
||||
me->GetMotionMaster()->MovePoint(0, 1483.30f, 657.99f, 28.0f, false, true);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
Talk(SAY_GOOD_MADRIGOSA);
|
||||
me->GetMotionMaster()->MovePoint(0, 1509.0f, 560.0f, 30.0f, false, true);
|
||||
}, 9s);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
DoCastAOE(SPELL_OPEN_BRUTALLUS_BACK_DOOR, true);
|
||||
me->GetInstanceScript()->SetBossState(DATA_FELMYST_DOORS, NOT_STARTED);
|
||||
me->GetInstanceScript()->SetBossState(DATA_FELMYST_DOORS, DONE);
|
||||
}, 16s);
|
||||
|
||||
me->m_Events.AddEventAtOffset([&] {
|
||||
me->GetMotionMaster()->MovePoint(0, 1400.0f, 630.0f, 90.0f, false, true);
|
||||
me->DespawnOrUnsummon(6000);
|
||||
}, 22s);
|
||||
}
|
||||
else
|
||||
DoCastSelf(SPELL_SPECTRAL_INVISIBILITY, true);
|
||||
}
|
||||
|
||||
void JustEngagedWith(Unit*) override
|
||||
{
|
||||
ScheduleTimedEvent(5s, [&] {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user