diff --git a/sql/updates/world/4.3.4/2025_06_11_01_world.sql b/sql/updates/world/4.3.4/2025_06_11_01_world.sql new file mode 100644 index 0000000000..b4b81fb01e --- /dev/null +++ b/sql/updates/world/4.3.4/2025_06_11_01_world.sql @@ -0,0 +1,6 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_dk_blood_strike', 'spell_dk_obliterate', 'spell_dk_heart_strike'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(45902, 'spell_dk_blood_strike'), +(49020, 'spell_dk_obliterate'), +(66198, 'spell_dk_obliterate'), +(55050, 'spell_dk_heart_strike'); diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index ac6722f60c..31a3020b85 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -1354,6 +1354,23 @@ class spell_dk_reaping : public AuraScript } }; +// 45902 - Blood Strike +class spell_dk_blood_strike : public SpellScript +{ + // Damage bonus per disease on the target + void CalculateDamage(Unit* victim, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) + { + uint8 diseaseCount = victim->GetDiseasesByCaster(GetCaster()->GetGUID(), false); + float pctBonus = GetSpellInfo()->Effects[EFFECT_2].CalcValue(GetCaster()) / 10.0f * diseaseCount; + AddPct(pctMod, pctBonus); + } + + void Register() override + { + CalcDamage.Register(&spell_dk_blood_strike::CalculateDamage); + } +}; + class spell_dk_blood_rites : public AuraScript { void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/) @@ -1880,6 +1897,42 @@ class spell_dk_icy_touch : public SpellScript CalcDamage.Register(&spell_dk_icy_touch::CalculateDamage); } }; + +// 49020 - Obliterate +// 66198 - Obliterate Off-Hand +class spell_dk_obliterate : public SpellScript +{ + // Damage bonus per disease on the target + void CalculateDamage(Unit* victim, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) + { + uint8 diseaseCount = victim->GetDiseasesByCaster(GetCaster()->GetGUID(), false); + float pctBonus = GetSpellInfo()->Effects[EFFECT_2].CalcValue(GetCaster()) / 2.0f * diseaseCount; + AddPct(pctMod, pctBonus); + } + + void Register() override + { + CalcDamage.Register(&spell_dk_obliterate::CalculateDamage); + } +}; + +// 55050 - Heart Strike +class spell_dk_heart_strike : public SpellScript +{ + // Damage bonus per disease on the target + void CalculateDamage(Unit* victim, int32& /*damage*/, int32& /*flatMod*/, float& pctMod) + { + uint8 diseaseCount = victim->GetDiseasesByCaster(GetCaster()->GetGUID(), false); + float pctBonus = GetSpellInfo()->Effects[EFFECT_2].CalcValue(GetCaster()) * diseaseCount; + AddPct(pctMod, pctBonus); + } + + void Register() override + { + CalcDamage.Register(&spell_dk_heart_strike::CalculateDamage); + } +}; + } void AddSC_deathknight_spell_scripts() @@ -1890,6 +1943,7 @@ void AddSC_deathknight_spell_scripts() RegisterSpellScript(spell_dk_army_of_the_dead); RegisterSpellScript(spell_dk_blood_boil); RegisterSpellScript(spell_dk_blood_gorged); + RegisterSpellScript(spell_dk_blood_strike); RegisterSpellScript(spell_dk_blood_rites); RegisterSpellScript(spell_dk_butchery); RegisterSpellScript(spell_dk_crimson_scourge); @@ -1916,12 +1970,14 @@ void AddSC_deathknight_spell_scripts() RegisterSpellScript(spell_dk_festering_strike); RegisterSpellScript(spell_dk_ghoul_explode); RegisterSpellScript(spell_dk_ghoul_taunt); + RegisterSpellScript(spell_dk_heart_strike); RegisterSpellScript(spell_dk_howling_blast); RegisterSpellScript(spell_dk_icebound_fortitude); RegisterSpellScript(spell_dk_icy_touch); RegisterSpellScript(spell_dk_improved_presence); RegisterSpellScript(spell_dk_killing_machine); RegisterSpellScript(spell_dk_necrotic_strike); + RegisterSpellScript(spell_dk_obliterate); RegisterSpellScript(spell_dk_pestilence); RegisterSpellScript(spell_dk_presence); RegisterSpellScript(spell_dk_raise_dead);