Core/Spells: Divine Aegis absorb amount will now stack only up to 40% of the target's maximum health

Closes #11
This commit is contained in:
Ovahlord
2018-08-04 22:03:05 +02:00
parent 2a3d1061b2
commit f12e733024

View File

@@ -295,7 +295,7 @@ class spell_pri_divine_aegis : public SpellScriptLoader
if (AuraEffect const* aegis = eventInfo.GetProcTarget()->GetAuraEffect(SPELL_PRIEST_DIVINE_AEGIS, EFFECT_0))
absorb += aegis->GetAmount();
absorb = std::min(absorb, eventInfo.GetProcTarget()->getLevel() * 125);
absorb = std::min(absorb, int32(CalculatePct(eventInfo.GetProcTarget()->GetMaxHealth(), 40)));
GetTarget()->CastCustomSpell(SPELL_PRIEST_DIVINE_AEGIS, SPELLVALUE_BASE_POINT0, absorb, eventInfo.GetProcTarget(), true, nullptr, aurEff);
}