Core/Scripts: implemented Seed of Corruption scaling damage tolerance

This commit is contained in:
ariel-
2018-02-14 05:46:25 -03:00
parent 1826437c09
commit df5afca278

View File

@@ -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);
}
};