diff options
author | ariel- <ariel-@users.noreply.github.com> | 2018-02-14 05:46:25 -0300 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-06-21 00:06:39 +0200 |
commit | e9ddf644b0c9075e637089601d70eb8adcf5654a (patch) | |
tree | 36f6f17f488fb75c1665d3f55663ddab6f10533b | |
parent | 5b42c0b270f3ff5d76ebcf2c8c97d58348ff1589 (diff) |
Core/Scripts: implemented Seed of Corruption scaling damage tolerance
(cherry picked from commit df5afca27859058f725c3dc9964d967aa89ff756)
-rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index 1740f3291f9..f4fcb96ace5 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -511,6 +511,15 @@ class spell_warl_seed_of_corruption_dummy : public SpellScriptLoader return ValidateSpellInfo({ SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE }); } + void CalculateBuffer(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) + { + Unit* caster = GetCaster(); + if (!caster) + return; + + amount = caster->SpellBaseDamageBonusDone(GetSpellInfo()->GetSchoolMask()) * ASSERT_NOTNULL(GetSpellInfo()->GetEffect(EFFECT_0))->CalcValue(caster) / 100; + } + void HandleProc(AuraEffect* aurEff, ProcEventInfo& eventInfo) { PreventDefaultAction(); @@ -537,7 +546,8 @@ class spell_warl_seed_of_corruption_dummy : public SpellScriptLoader void Register() override { - OnEffectProc += AuraEffectProcFn(spell_warl_seed_of_corruption_dummy_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_DUMMY); + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_seed_of_corruption_dummy_AuraScript::CalculateBuffer, EFFECT_2, SPELL_AURA_DUMMY); + OnEffectProc += AuraEffectProcFn(spell_warl_seed_of_corruption_dummy_AuraScript::HandleProc, EFFECT_2, SPELL_AURA_DUMMY); } }; |