From c3499926206b9f6051dd62dfa722d8bec5becdb3 Mon Sep 17 00:00:00 2001 From: Grimfeather <88028633+Grimfeather@users.noreply.github.com> Date: Mon, 30 Jun 2025 09:56:14 +0200 Subject: [PATCH] naxx40 spell damage fixes (#515) Kel'Thuzad Frostbolt: Reduce damage ~4.5k to ~2550 Sapphiron Frost Aura: Reduce damage ~1200 to ~600 Sapphiron Icebolt: Reduce damage 7125-7875 to 2625-2900 --- sql/world/base/naxx40_spells.sql | 16 +++++ src/naxx40Scripts/custom_spells_40.cpp | 84 +++++++++++++++++++++++++- 2 files changed, 99 insertions(+), 1 deletion(-) diff --git a/sql/world/base/naxx40_spells.sql b/sql/world/base/naxx40_spells.sql index 8110cab..a4e65d9 100644 --- a/sql/world/base/naxx40_spells.sql +++ b/sql/world/base/naxx40_spells.sql @@ -9,9 +9,12 @@ -- (29107, 'spell_razuvious_disrupting_shout_40'); -- (28135, 'spell_feugen_static_field'); -- (28457, 'spell_kelthuzad_dark_blast_40'); +-- (28479, 'spell_kelthuzad_frostbolt_40'); -- (28785, 'spell_anub_locust_swarm_aura_40'); -- (28450, 'spell_unholy_staff_arcane_explosion_40'); -- (28153, 'spell_disease_cloud_damage_40'); +-- (28522, 'spell_sapphiron_icebolt_40'); +-- (28531, 'spell_sapphiron_frost_aura_40'); -- `spell_dbc` [90001,90007} -- Custom Spells @@ -51,6 +54,15 @@ INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (28450, 'spel DELETE FROM `spell_script_names` WHERE `spell_id` = 28153; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (28153, 'spell_disease_cloud_damage_40'); +-- Sapphiron +-- 28522 Icebolt: Reduce damage ~7125 to ~2625 +DELETE FROM `spell_script_names` WHERE `spell_id` = 28522; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (28522, 'spell_sapphiron_icebolt_40'); + +-- 28531 Frost Aura 1200->600 +DELETE FROM `spell_script_names` WHERE `spell_id` = 28531; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (28531, 'spell_sapphiron_frost_aura_40'); + -- Anub'Arak -- Locust Swarm: Reduce damage ~1500 to ~1000, increase radius 25yd to 30yd DELETE FROM `spell_script_names` WHERE `spell_id` = 28785; @@ -61,6 +73,10 @@ INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (28785, 'spel DELETE FROM `spell_script_names` WHERE `spell_id` = 28457; INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (28457, 'spell_kelthuzad_dark_blast_40'); +-- Frostbolt: Reduce damage ~4.5k to ~2550 +DELETE FROM `spell_script_names` WHERE `spell_id` = 28479; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (28479, 'spell_kelthuzad_frostbolt_40'); + -- Thaddius -- Feugen - Static Field: Change to mana drain DELETE FROM `spell_script_names` WHERE `spell_id` = 28135; diff --git a/src/naxx40Scripts/custom_spells_40.cpp b/src/naxx40Scripts/custom_spells_40.cpp index afd08e2..3bd984a 100644 --- a/src/naxx40Scripts/custom_spells_40.cpp +++ b/src/naxx40Scripts/custom_spells_40.cpp @@ -207,6 +207,84 @@ class spell_kelthuzad_dark_blast_40 : public SpellScript } }; +// 28479 - Frostbolt +class spell_kelthuzad_frostbolt_40 : public SpellScript +{ + PrepareSpellScript(spell_kelthuzad_frostbolt_40); + + void CalculateDamage(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + if (!caster || (caster->GetMap()->GetDifficulty() != RAID_DIFFICULTY_10MAN_HEROIC)) + { + return; + } + SetEffectValue(urand(2500,2600)); + } + + void Register() override + { + OnEffectLaunchTarget += SpellEffectFn(spell_kelthuzad_frostbolt_40::CalculateDamage, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE); + } +}; + +// 28522 - Icebolt +class spell_sapphiron_icebolt_40 : public SpellScript +{ + PrepareSpellScript(spell_sapphiron_icebolt_40); + + void CalculateDamage(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + if (!caster || (caster->GetMap()->GetDifficulty() != RAID_DIFFICULTY_10MAN_HEROIC)) + { + return; + } + SetEffectValue(urand(2625,2900)); + } + + void Register() override + { + OnEffectLaunchTarget += SpellEffectFn(spell_sapphiron_icebolt_40::CalculateDamage, EFFECT_1, SPELL_EFFECT_SCHOOL_DAMAGE); + } +}; + +// 28531 - Frost Aura +enum FrostAura +{ + SPELL_FROST_AURA = 28531, +}; + +class spell_sapphiron_frost_aura_40 : public AuraScript +{ + PrepareAuraScript(spell_sapphiron_frost_aura_40); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_FROST_AURA }); + } + + void HandleTriggerSpell(AuraEffect const* /*aurEff*/) + { + Unit* caster = GetCaster(); + if (!caster || (caster->GetMap()->GetDifficulty() != RAID_DIFFICULTY_10MAN_HEROIC)) + { + return; + } + PreventDefaultAction(); + int32 modifiedFrostAuraDamage = 600; + CustomSpellValues values; + values.AddSpellMod(SPELLVALUE_BASE_POINT0, modifiedFrostAuraDamage); + caster->CastCustomSpell(SPELL_FROST_AURA, values, caster, TRIGGERED_NONE, nullptr, nullptr, GetCasterGUID()); + } + + void Register() override + { + OnEffectPeriodic += AuraEffectPeriodicFn(spell_sapphiron_frost_aura_40::HandleTriggerSpell, EFFECT_0, 3); + } +}; + + // 29213 - Curse of the Plaguebringer enum CurseOfThePlaguebringer { @@ -245,7 +323,7 @@ class spell_noth_curse_of_the_plaguebringer_aura_40 : public AuraScript } }; -// + class spell_razuvious_disrupting_shout_40 : public SpellScript { PrepareSpellScript(spell_razuvious_disrupting_shout_40); @@ -331,6 +409,7 @@ class spell_disease_cloud_damage_40 : public SpellScript } }; + class spell_feugen_static_field_40 : public SpellScript { PrepareSpellScript(spell_feugen_static_field_40); @@ -365,6 +444,9 @@ void AddSC_custom_spells_40() RegisterSpellScript(spell_heigan_eruption_40); RegisterSpellScript(spell_submerge_visual_aura); RegisterSpellScript(spell_kelthuzad_dark_blast_40); + RegisterSpellScript(spell_kelthuzad_frostbolt_40); + RegisterSpellScript(spell_sapphiron_icebolt_40); + RegisterSpellScript(spell_sapphiron_frost_aura_40); RegisterSpellScript(spell_noth_curse_of_the_plaguebringer_aura_40); RegisterSpellScript(spell_razuvious_disrupting_shout_40); RegisterSpellScript(spell_unholy_staff_arcane_explosion_40);