diff options
author | ariel- <ariel-@users.noreply.github.com> | 2018-02-14 05:46:25 -0300 |
---|---|---|
committer | ariel- <ariel-@users.noreply.github.com> | 2018-02-14 05:58:56 -0300 |
commit | df5afca27859058f725c3dc9964d967aa89ff756 (patch) | |
tree | d9bb915d8a7fa3285fdd446f8be2417949cfccfa /src | |
parent | 1826437c094966ae339a154844df8587b2122888 (diff) |
Core/Scripts: implemented Seed of Corruption scaling damage tolerance
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_warlock.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_warlock.cpp b/src/server/scripts/Spells/spell_warlock.cpp index c82c7cf445f..8193399dc73 100644 --- a/src/server/scripts/Spells/spell_warlock.cpp +++ b/src/server/scripts/Spells/spell_warlock.cpp @@ -1118,6 +1118,16 @@ class spell_warl_seed_of_corruption_dummy : public SpellScriptLoader return ValidateSpellInfo({ SPELL_WARLOCK_SEED_OF_CORRUPTION_DAMAGE_R1 }); } + void CalculateBuffer(AuraEffect const* aurEff, int32& amount, bool& /*canBeRecalculated*/) + { + Unit* caster = GetCaster(); + if (!caster) + return; + + // effect 1 scales with 14% of caster's SP (DBC data) + amount = caster->SpellDamageBonusDone(GetUnitOwner(), GetSpellInfo(), amount, SPELL_DIRECT_DAMAGE, aurEff->GetEffIndex(), GetAura()->GetDonePct()); + } + void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) { PreventDefaultAction(); @@ -1145,6 +1155,7 @@ class spell_warl_seed_of_corruption_dummy : public SpellScriptLoader void Register() override { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_warl_seed_of_corruption_dummy_AuraScript::CalculateBuffer, EFFECT_1, SPELL_AURA_DUMMY); OnEffectProc += AuraEffectProcFn(spell_warl_seed_of_corruption_dummy_AuraScript::HandleProc, EFFECT_1, SPELL_AURA_DUMMY); } }; |