diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-05-20 13:11:53 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-05-20 13:11:53 +0200 |
commit | ac79cbbad309a0905ffab4e15c77fcb0ae662963 (patch) | |
tree | d5f7bd03b51e3fd2ea2da8c227c00c5093fcc1cc /src | |
parent | 64e0a1b55ade115f993cc5036d439da9d4731a11 (diff) |
Scripts/Spells: Fixed Improved Death Strike value calculation for blood specialization
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_dk.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp index 44382fae93a..7defc5a9398 100644 --- a/src/server/scripts/Spells/spell_dk.cpp +++ b/src/server/scripts/Spells/spell_dk.cpp @@ -923,6 +923,35 @@ class spell_dk_icy_talons_buff : public SpellScript } }; +// 374277 - Improved Death Strike +class spell_dk_improved_death_strike : public AuraScript +{ + bool Validate(SpellInfo const* spellInfo) override + { + return ValidateSpellInfo({ SPELL_DK_BLOOD }) + && ValidateSpellEffect({ { spellInfo->Id, EFFECT_4 } }); + } + + void CalcHealIncrease(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) const + { + if (GetUnitOwner()->HasAura(SPELL_DK_BLOOD)) + amount = GetEffectInfo(EFFECT_3).CalcValue(GetCaster()); + } + + void CalcPowerCostReduction(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) const + { + if (GetUnitOwner()->HasAura(SPELL_DK_BLOOD)) + amount = GetEffectInfo(EFFECT_4).CalcValue(GetCaster()); + } + + void Register() override + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_improved_death_strike::CalcHealIncrease, EFFECT_0, SPELL_AURA_ADD_PCT_MODIFIER); + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_improved_death_strike::CalcHealIncrease, EFFECT_1, SPELL_AURA_ADD_PCT_MODIFIER); + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dk_improved_death_strike::CalcPowerCostReduction, EFFECT_2, SPELL_AURA_ADD_FLAT_MODIFIER); + } +}; + // 206940 - Mark of Blood class spell_dk_mark_of_blood : public AuraScript { @@ -1411,6 +1440,7 @@ void AddSC_deathknight_spell_scripts() RegisterSpellScript(spell_dk_ice_prison); RegisterSpellScript(spell_dk_icy_talons); RegisterSpellScript(spell_dk_icy_talons_buff); + RegisterSpellScript(spell_dk_improved_death_strike); RegisterSpellScript(spell_dk_mark_of_blood); RegisterSpellScript(spell_dk_necrosis); RegisterSpellScript(spell_dk_obliteration); |