Merge d15f91f11ebadc408633e3f09eeea2caa9d03b52 into f6c4164765afe447476114e632ee3d70b04a1777
This commit is contained in:
commit
d47c075aaf
@ -964,6 +964,20 @@ class spell_pal_lay_on_hands : public SpellScript
|
||||
return true;
|
||||
}
|
||||
|
||||
// Handling of healing percentage modifiers
|
||||
void HandleHeal(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
float modifier = 1.0f;
|
||||
for (AuraEffect* aurEff : target->GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_PCT))
|
||||
modifier *= (1.0f + aurEff->GetAmount() / 100.0f);
|
||||
for (AuraEffect* aurEff : target->GetAuraEffectsByType(SPELL_AURA_MOD_HEALING_DONE_PERCENT))
|
||||
modifier *= (1.0f + aurEff->GetAmount() / 100.0f);
|
||||
SetHitHeal(-(target->GetMaxHealth() * (1 - modifier)));
|
||||
}
|
||||
}
|
||||
|
||||
SpellCastResult CheckCast()
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
@ -1003,6 +1017,7 @@ class spell_pal_lay_on_hands : public SpellScript
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_pal_lay_on_hands::CheckCast);
|
||||
AfterHit += SpellHitFn(spell_pal_lay_on_hands::HandleScript);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_pal_lay_on_hands::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL_MAX_HEALTH);
|
||||
}
|
||||
|
||||
int32 _manaAmount;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user