mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-16 13:09:50 -04:00
Core/Utilities: Use generic templates with AddPct, ApplyPct and CalculatePct
This commit is contained in:
@@ -410,7 +410,7 @@ class spell_warl_life_tap : public SpellScriptLoader
|
||||
|
||||
// Improved Life Tap mod
|
||||
if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_WARLOCK, ICON_ID_IMPROVED_LIFE_TAP, 0))
|
||||
AddPctN(mana, aurEff->GetAmount());
|
||||
AddPct(mana, aurEff->GetAmount());
|
||||
|
||||
caster->CastCustomSpell(target, SPELL_LIFE_TAP_ENERGIZE, &mana, NULL, NULL, false);
|
||||
|
||||
@@ -421,7 +421,7 @@ class spell_warl_life_tap : public SpellScriptLoader
|
||||
|
||||
if (manaFeedVal > 0)
|
||||
{
|
||||
ApplyPctN(manaFeedVal, mana);
|
||||
ApplyPct(manaFeedVal, mana);
|
||||
caster->CastCustomSpell(caster, SPELL_LIFE_TAP_ENERGIZE_2, &manaFeedVal, NULL, NULL, true, NULL);
|
||||
}
|
||||
}
|
||||
@@ -544,7 +544,7 @@ class spell_warl_haunt : public SpellScriptLoader
|
||||
{
|
||||
if (Aura* aura = GetHitAura())
|
||||
if (AuraEffect* aurEff = aura->GetEffect(EFFECT_1))
|
||||
aurEff->SetAmount(CalculatePctN(aurEff->GetAmount(), GetHitDamage()));
|
||||
aurEff->SetAmount(CalculatePct(aurEff->GetAmount(), GetHitDamage()));
|
||||
}
|
||||
|
||||
void Register()
|
||||
|
||||
Reference in New Issue
Block a user