From d0f4ef26b797ac486eefaf1db7148cd8cbb38b78 Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Mon, 23 Feb 2026 12:38:17 -0600 Subject: [PATCH] chore(Core/Spells): Remove duplicate seed of corruption spellscript (#24831) Co-authored-by: blinkysc --- .../rev_1771866173424640746.sql | 1 + src/server/scripts/Spells/spell_warlock.cpp | 123 ------------------ 2 files changed, 1 insertion(+), 123 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1771866173424640746.sql diff --git a/data/sql/updates/pending_db_world/rev_1771866173424640746.sql b/data/sql/updates/pending_db_world/rev_1771866173424640746.sql new file mode 100644 index 000000000..6a6809be8 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1771866173424640746.sql @@ -0,0 +1 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_warl_seed_of_corruption_aura', 'spell_warl_seed_of_corruption_generic_aura'); diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index f424f242f..95c2929a3 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -63,12 +63,8 @@ enum WarlockSpells SPELL_WARLOCK_IMPROVED_HEALTH_FUNNEL_BUFF_R2 = 60956, SPELL_WARLOCK_LIFE_TAP_ENERGIZE = 31818, SPELL_WARLOCK_LIFE_TAP_ENERGIZE_2 = 32553, - SPELL_WARLOCK_SEED_OF_CORRUPTION_R1 = 27243, SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE_R1 = 27285, - SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE_R2 = 47833, - SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE_R3 = 47834, SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE_GENERIC = 32865, - SPELL_WARLOCK_SEED_OF_CORRUPTION_VISUAL = 37826, SPELL_WARLOCK_SOULSHATTER = 32835, SPELL_WARLOCK_SIPHON_LIFE_HEAL = 63106, SPELL_WARLOCK_UNSTABLE_AFFLICTION_DISPEL = 31117, @@ -742,123 +738,6 @@ class spell_warl_seed_of_corruption_damage : public SpellScript } }; -// -27243 - Seed of Corruption -class spell_warl_seed_of_corruption_aura: public AuraScript -{ - PrepareAuraScript(spell_warl_seed_of_corruption_aura); - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ - SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE_R1, - SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE_R2, - SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE_R3, - SPELL_WARLOCK_SEED_OF_CORRUPTION_VISUAL - }); - } - - void CalculateAmount(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/) - { - if (!GetCaster()) - return; - - // effect 1 scales with 14% of caster's SP (DBC data) - amount = GetCaster()->SpellDamageBonusDone(GetUnitOwner(), GetSpellInfo(), amount, DOT, aurEff->GetEffIndex(), aurEff->GetPctMods()); - } - - void Detonate(AuraEffect const* aurEff) - { - if (!GetCaster() || !GetTarget()) - return; - - GetTarget()->CastSpell(GetTarget(), SPELL_WARLOCK_SEED_OF_CORRUPTION_VISUAL, true, nullptr, aurEff); - GetCaster()->CastSpell(GetTarget(), sSpellMgr->GetSpellWithRank(SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE_R1, GetSpellInfo()->GetRank()), true, nullptr, aurEff); - } - - void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) - { - PreventDefaultAction(); - DamageInfo* damageInfo = eventInfo.GetDamageInfo(); - if (!damageInfo || !damageInfo->GetDamage()) - return; - - int32 remainingDamage = aurEff->GetAmount() - damageInfo->GetDamage(); - if (remainingDamage > 0) - { - GetAura()->GetEffect(EFFECT_1)->SetAmount(remainingDamage); - } - else // damage threshold has been reached - { - Remove(AURA_REMOVE_BY_DEFAULT); - Detonate(aurEff); - } - } - - void OnRemove(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) - { - AuraRemoveMode removeMode = GetTargetApplication()->GetRemoveMode(); - if (removeMode == AURA_REMOVE_BY_DEATH) - Detonate(aurEff); - } - - void Register() override - { - DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_seed_of_corruption_aura::CalculateAmount, EFFECT_1, SPELL_AURA_DUMMY); - AfterEffectRemove += AuraEffectRemoveFn(spell_warl_seed_of_corruption_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); - OnEffectProc += AuraEffectProcFn(spell_warl_seed_of_corruption_aura::HandleProc, EFFECT_1, SPELL_AURA_DUMMY); - } -}; - -// Monster spells, triggered only on detonation threshold reached (not on death) -// 32863 - Seed of Corruption -// 36123 - Seed of Corruption -// 38252 - Seed of Corruption -// 39367 - Seed of Corruption -// 44141 - Seed of Corruption -// 70388 - Seed of Corruption -class spell_warl_seed_of_corruption_generic_aura: public AuraScript -{ - PrepareAuraScript(spell_warl_seed_of_corruption_generic_aura); - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo({ SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE_GENERIC, SPELL_WARLOCK_SEED_OF_CORRUPTION_VISUAL }); - } - - void Detonate(AuraEffect const* aurEff) - { - if (!GetCaster() || !GetTarget()) - return; - - GetTarget()->CastSpell(GetTarget(), SPELL_WARLOCK_SEED_OF_CORRUPTION_VISUAL, true, nullptr, aurEff); - GetCaster()->CastCustomSpell(SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE_GENERIC, SPELLVALUE_BASE_POINT0, GetSpellInfo()->GetEffect(EFFECT_1).CalcValue(), GetTarget(), true, nullptr, aurEff); - } - - void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) - { - PreventDefaultAction(); - DamageInfo* damageInfo = eventInfo.GetDamageInfo(); - if (!damageInfo || !damageInfo->GetDamage()) - return; - - int32 remainingDamage = aurEff->GetAmount() - damageInfo->GetDamage(); - if (remainingDamage > 0) - { - GetAura()->GetEffect(EFFECT_1)->SetAmount(remainingDamage); - } - else // damage threshold has been reached - { - Remove(AURA_REMOVE_BY_DEFAULT); - Detonate(aurEff); - } - } - - void Register() override - { - OnEffectProc += AuraEffectProcFn(spell_warl_seed_of_corruption_generic_aura::HandleProc, EFFECT_1, SPELL_AURA_DUMMY); - } -}; - // 29858 - Soulshatter class spell_warl_soulshatter : public SpellScript { @@ -1975,8 +1854,6 @@ void AddSC_warlock_spell_scripts() RegisterSpellScript(spell_warl_life_tap); RegisterSpellScript(spell_warl_ritual_of_doom_effect); RegisterSpellScript(spell_warl_seed_of_corruption_damage); - RegisterSpellScript(spell_warl_seed_of_corruption_aura); - RegisterSpellScript(spell_warl_seed_of_corruption_generic_aura); RegisterSpellScript(spell_warl_shadow_ward); RegisterSpellScript(spell_warl_siphon_life); RegisterSpellScript(spell_warl_soulshatter);