From aa84cbc9544df63f995d3ffe585648ce3c827b02 Mon Sep 17 00:00:00 2001 From: Jelle Meeus Date: Wed, 19 Mar 2025 09:15:38 +0100 Subject: [PATCH] fix(Scripts/SunwellPlateau): Sathrovarr's Curse of Boundless Agony (#21730) --- .../rev_1742307871360448426.sql | 9 +++ .../SunwellPlateau/boss_kalecgos.cpp | 63 ++++++++++++------- 2 files changed, 48 insertions(+), 24 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1742307871360448426.sql diff --git a/data/sql/updates/pending_db_world/rev_1742307871360448426.sql b/data/sql/updates/pending_db_world/rev_1742307871360448426.sql new file mode 100644 index 000000000..2e72880c6 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1742307871360448426.sql @@ -0,0 +1,9 @@ +-- +DELETE FROM `spell_script_names` WHERE `spell_id` = 45034; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES(45034, 'spell_kalecgos_curse_of_boundless_agony_aura'); +DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` IN (45032, 45034)) AND (`SourceId` = 0) AND (`ConditionValue1` IN (45032, 45034)); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(13, 1, 45032, 0, 0, 1, 0, 45032, 0, 0, 1, 0, 0, '', 'Player does not have Curse of Boundless Agony'), +(13, 1, 45032, 0, 0, 1, 0, 45034, 0, 0, 1, 0, 0, '', 'Player does not have Curse of Boundless Agony'), +(13, 1, 45034, 0, 0, 1, 0, 45032, 0, 0, 1, 0, 0, '', 'Player does not have Curse of Boundless Agony'), +(13, 1, 45034, 0, 0, 1, 0, 45034, 0, 0, 1, 0, 0, '', 'Player does not have Curse of Boundless Agony'); diff --git a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp index ac23eb718..b9c38abd0 100644 --- a/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp +++ b/src/server/scripts/EasternKingdoms/SunwellPlateau/boss_kalecgos.cpp @@ -47,32 +47,36 @@ enum Yells enum Spells { - SPELL_SPECTRAL_EXHAUSTION = 44867, - SPELL_SPECTRAL_BLAST = 44869, - SPELL_SPECTRAL_BLAST_PORTAL = 44866, - SPELL_SPECTRAL_BLAST_AA = 46648, - SPELL_TELEPORT_SPECTRAL = 46019, + SPELL_SPECTRAL_EXHAUSTION = 44867, + SPELL_SPECTRAL_BLAST = 44869, + SPELL_SPECTRAL_BLAST_PORTAL = 44866, + SPELL_SPECTRAL_BLAST_AA = 46648, + SPELL_TELEPORT_SPECTRAL = 46019, - SPELL_TELEPORT_NORMAL_REALM = 46020, - SPELL_SPECTRAL_REALM = 46021, - SPELL_SPECTRAL_INVISIBILITY = 44801, - SPELL_DEMONIC_VISUAL = 44800, + SPELL_TELEPORT_NORMAL_REALM = 46020, + SPELL_SPECTRAL_REALM = 46021, + SPELL_SPECTRAL_INVISIBILITY = 44801, + SPELL_DEMONIC_VISUAL = 44800, - SPELL_ARCANE_BUFFET = 45018, - SPELL_FROST_BREATH = 44799, - SPELL_TAIL_LASH = 45122, + SPELL_ARCANE_BUFFET = 45018, + SPELL_FROST_BREATH = 44799, + SPELL_TAIL_LASH = 45122, - SPELL_BANISH = 44836, - SPELL_TRANSFORM_KALEC = 44670, - SPELL_CRAZED_RAGE = 44807, + SPELL_BANISH = 44836, + SPELL_TRANSFORM_KALEC = 44670, + SPELL_CRAZED_RAGE = 44807, - SPELL_CORRUPTION_STRIKE = 45029, - SPELL_CURSE_OF_BOUNDLESS_AGONY = 45032, - SPELL_CURSE_OF_BOUNDLESS_AGONY_PLR = 45034, - SPELL_SHADOW_BOLT = 45031, + SPELL_CORRUPTION_STRIKE = 45029, + SPELL_CURSE_OF_BOUNDLESS_AGONY = 45032, + SPELL_CURSE_OF_BOUNDLESS_AGONY_PLR = 45034, + SPELL_CURSE_OF_BOUNDLESS_AGONY_REMOVE = 45050, + SPELL_CURSE_OF_BOUNDLESS_AGONY_DUMMY_1 = 45083, + SPELL_CURSE_OF_BOUNDLESS_AGONY_DUMMY_2 = 45085, + SPELL_CURSE_OF_BOUNDLESS_AGONY_DUMMY_3 = 45084, + SPELL_SHADOW_BOLT = 45031, - SPELL_HEROIC_STRIKE = 45026, - SPELL_REVITALIZE = 45027 + SPELL_HEROIC_STRIKE = 45026, + SPELL_REVITALIZE = 45027 }; enum SWPActions @@ -388,6 +392,7 @@ struct boss_sathrovarr : public ScriptedAI void JustDied(Unit* /*killer*/) override { + DoCastSelf(SPELL_CURSE_OF_BOUNDLESS_AGONY_REMOVE, true); Talk(SAY_SATH_DEATH); } @@ -464,10 +469,10 @@ class spell_kalecgos_curse_of_boundless_agony_aura : public AuraScript bool Validate(SpellInfo const* /*spellInfo*/) override { - return ValidateSpellInfo({ SPELL_CURSE_OF_BOUNDLESS_AGONY_PLR }); + return ValidateSpellInfo({ SPELL_CURSE_OF_BOUNDLESS_AGONY_PLR, SPELL_CURSE_OF_BOUNDLESS_AGONY_DUMMY_1, SPELL_CURSE_OF_BOUNDLESS_AGONY_DUMMY_2, SPELL_CURSE_OF_BOUNDLESS_AGONY_DUMMY_3 }); } - void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { if (InstanceScript* instance = GetUnitOwner()->GetInstanceScript()) if (instance->IsEncounterInProgress()) @@ -476,8 +481,18 @@ class spell_kalecgos_curse_of_boundless_agony_aura : public AuraScript void OnPeriodic(AuraEffect const* aurEff) { - if (aurEff->GetTickNumber() > 1 && aurEff->GetTickNumber() % 5 == 1) + uint32 tickNumber = aurEff->GetTickNumber(); + if (tickNumber > 1 && tickNumber % 5 == 1) GetAura()->GetEffect(aurEff->GetEffIndex())->SetAmount(aurEff->GetAmount() * 2); + + uint32 spellId = 0; + if (tickNumber <= 10) + spellId = SPELL_CURSE_OF_BOUNDLESS_AGONY_DUMMY_1; + else if (tickNumber <= 20) + spellId = SPELL_CURSE_OF_BOUNDLESS_AGONY_DUMMY_2; + else + spellId = SPELL_CURSE_OF_BOUNDLESS_AGONY_DUMMY_3; + GetTarget()->CastSpell(GetTarget(), spellId, true); } void Register() override