Core/Spells: fixed Seal of Insight's mana gain bonus and moved heal formula to spell script for consistency

This commit is contained in:
Ovahlord
2021-03-13 12:07:19 +01:00
parent 087e7e961a
commit ad9b2b0aba
2 changed files with 12 additions and 0 deletions

View File

@@ -0,0 +1 @@
UPDATE `spell_bonus_data` SET `ap_bonus`= 0, `direct_bonus`= 0 WHERE `entry`= 20167;

View File

@@ -1981,9 +1981,20 @@ class spell_pal_seal_of_insight : public AuraScript
return (!eventInfo.GetSpellInfo() || !eventInfo.GetSpellInfo()->IsAffectingArea());
}
void HandleProc(AuraEffect const* aurEff, ProcEventInfo& /*eventInfo*/)
{
PreventDefaultAction();
Unit* target = GetTarget();
int32 bp0 = CalculatePct(target->GetTotalAttackPowerValue(BASE_ATTACK), 15.f) + CalculatePct(target->SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_HOLY), 15.f);
int32 bp1 = CalculatePct(target->GetCreateMana(), 4.f);
int32 spellId = GetSpellInfo()->Effects[aurEff->GetEffIndex()].TriggerSpell;
target->CastSpell(target, spellId, CastSpellExtraArgs(aurEff).AddSpellBP0(bp0).AddSpellMod(SPELLVALUE_BASE_POINT1, bp1));
}
void Register() override
{
DoCheckProc.Register(&spell_pal_seal_of_insight::CheckProc);
OnEffectProc.Register(&spell_pal_seal_of_insight::HandleProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};