fix(Scripts/Sunwell): Kalecgos movement during Kil'jaeden encounter (#26037)

This commit is contained in:
Crow
2026-06-10 18:12:26 -05:00
committed by GitHub
parent deaf25c1f4
commit 024c83e963
2 changed files with 37 additions and 3 deletions
@@ -0,0 +1,14 @@
DELETE FROM `waypoint_data` WHERE `id` = 253190;
INSERT INTO `waypoint_data`
(`id`, `point`, `position_x`, `position_y`, `position_z`, `orientation`, `velocity`, `delay`, `smoothTransition`, `move_type`, `action`, `action_chance`)
VALUES
(253190, 1, 1735.393, 593.6747, 140.5267, NULL, 0, 0, 1, 1, 0, 100),
(253190, 2, 1746.861, 621.0573, 141.2209, NULL, 0, 0, 1, 1, 0, 100),
(253190, 3, 1734.7, 663.6804, 139.3877, NULL, 0, 0, 1, 1, 0, 100),
(253190, 4, 1695.096, 677.7586, 139.9433, NULL, 0, 0, 1, 1, 0, 100),
(253190, 5, 1663.575, 664.397, 139.952, NULL, 0, 0, 1, 1, 0, 100),
(253190, 6, 1651.432, 634.5519, 140.1377, NULL, 0, 0, 1, 1, 0, 100),
(253190, 7, 1666.394, 594.8594, 139.1098, NULL, 0, 0, 1, 1, 0, 100),
(253190, 8, 1704.55, 579.4996, 140.3171, NULL, 0, 0, 1, 1, 0, 100);
UPDATE `creature_template` SET `speed_run` = 1.71429, `flags_extra` = `flags_extra` | 512 WHERE `entry` = 25319;
@@ -86,6 +86,10 @@ enum Spells
// Misc
SPELL_ANVEENA_ENERGY_DRAIN = 46410,
SPELL_ARCANE_BOLT = 45670,
// TODO
// 45670 is an aura that triggers 45666; 45666 needs to be scripted
// SPELL_ARCANE_BOLT_DAMAGE = 45666,
SPELL_RING_OF_BLUE_FLAMES = 45825,
SPELL_SUMMON_BLUE_DRAKE = 45836,
SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT = 45839,
@@ -102,7 +106,8 @@ enum Misc
PHASE_SACRIFICE = 5,
ACTION_START_POST_EVENT = 1,
ACTION_NO_KILL_TALK = 2
ACTION_NO_KILL_TALK = 2,
ACTION_START_AERIAL_SUPPORT = 3
};
class CastArmageddon : public BasicEvent
@@ -173,6 +178,7 @@ struct npc_kiljaeden_controller : public NullCreatureAI
void JustSummoned(Creature* summon) override
{
summons.Summon(summon);
if (summon->GetEntry() == NPC_SINISTER_REFLECTION)
{
summon->m_Events.AddEventAtOffset([summon] {
@@ -181,7 +187,14 @@ struct npc_kiljaeden_controller : public NullCreatureAI
}, 5s);
}
else if (summon->GetEntry() == NPC_KALECGOS_KJ)
{
summon->setActive(true);
summon->SetCanFly(true);
summon->SetDisableGravity(true);
summon->SetAnimTier(AnimTier::Fly);
summon->GetMotionMaster()->MoveWaypoint(NPC_KALECGOS_KJ * 10, true);
summon->AI()->DoAction(ACTION_START_AERIAL_SUPPORT);
}
}
void SummonedCreatureDies(Creature* summon, Unit*) override
@@ -209,7 +222,7 @@ struct npc_kiljaeden_controller : public NullCreatureAI
{
me->RemoveAurasDueToSpell(SPELL_ANVEENA_ENERGY_DRAIN);
me->SummonCreature(NPC_KILJAEDEN, me->GetPositionX(), me->GetPositionY(), me->GetPositionZ() + 1.5f, 4.3f, TEMPSUMMON_MANUAL_DESPAWN);
me->SummonCreature(NPC_KALECGOS_KJ, 1726.80f, 661.43f, 138.65f, 3.95f, TEMPSUMMON_MANUAL_DESPAWN);
me->SummonCreature(NPC_KALECGOS_KJ, 1734.465f, 592.5678f, 142.3971f, 4.533074f, TEMPSUMMON_MANUAL_DESPAWN);
}
}
}
@@ -705,8 +718,15 @@ struct npc_kalecgos_kj : public NullCreatureAI
void DoAction(int32 param) override
{
if (param == ACTION_START_POST_EVENT)
if (param == ACTION_START_AERIAL_SUPPORT)
{
DoCastSelf(SPELL_ARCANE_BOLT, true);
}
else if (param == ACTION_START_POST_EVENT)
{
me->GetMotionMaster()->Clear();
me->GetMotionMaster()->MoveIdle();
me->RemoveAurasDueToSpell(SPELL_ARCANE_BOLT);
me->SetCanFly(false);
me->SetDisableGravity(false);
me->CastSpell(me, SPELL_TELEPORT_AND_TRANSFORM, true);