diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index a3684ef2336..6810b278c56 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -698,8 +698,9 @@ class spell_dru_living_seed : public AuraScript void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) { PreventDefaultAction(); - int32 amount = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount()); - GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_LIVING_SEED_PROC, CastSpellExtraArgs(aurEff).AddSpellBP0(amount)); + int32 amount = CalculatePct(eventInfo.GetHealInfo()->GetEffectiveHeal(), aurEff->GetAmount()); + if (amount) + GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_LIVING_SEED_PROC, CastSpellExtraArgs(aurEff).AddSpellBP0(amount)); } void Register() override @@ -1171,11 +1172,10 @@ class spell_dru_effloresence : public AuraScript void HandleProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) { PreventDefaultAction(); - int32 healAmount = 0; if (HealInfo* heal = eventInfo.GetHealInfo()) { - healAmount = CalculatePct(heal->GetHeal(), GetSpellInfo()->Effects[EFFECT_0].BasePoints); + int32 healAmount = CalculatePct(heal->GetEffectiveHeal(), GetSpellInfo()->Effects[EFFECT_0].BasePoints); if (healAmount) GetTarget()->CastSpell(heal->GetTarget(), GetSpellInfo()->Effects[EFFECT_0].TriggerSpell, CastSpellExtraArgs(aurEff).AddSpellMod(SPELLVALUE_BASE_POINT1, healAmount)); } diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp index 6f3c1c7b714..430634f9ef2 100644 --- a/src/server/scripts/Spells/spell_paladin.cpp +++ b/src/server/scripts/Spells/spell_paladin.cpp @@ -1106,7 +1106,7 @@ class spell_pal_illuminated_healing : public AuraScript if (Unit* target = eventInfo.GetProcTarget()) { - uint32 shieldAmount = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount()); + uint32 shieldAmount = CalculatePct(eventInfo.GetHealInfo()->GetEffectiveHeal(), aurEff->GetAmount()); if (Aura* aura = target->GetAura(SPELL_PALADIN_ILLUMINATED_HEALING, caster->GetGUID())) { if (AuraEffect* eff = aura->GetEffect(EFFECT_0)) @@ -1652,8 +1652,8 @@ class spell_pal_ancient_healer : public AuraScript if (!heal) return; - int32 bp0 = heal->GetHeal(); - int32 bp1 = CalculatePct(heal->GetHeal(), 10); + int32 bp0 = heal->GetEffectiveHeal(); + int32 bp1 = CalculatePct(heal->GetEffectiveHeal(), 10); for (Unit* guardian : GetTarget()->m_Controlled) @@ -1887,7 +1887,9 @@ class spell_pal_lights_beacon : public AuraScript // Affected healing spells heal for 50% of the amount HealInfo* heal = eventInfo.GetHealInfo(); - int32 bp = CalculatePct(heal->GetHeal(), aurEff->GetAmount()); + int32 bp = CalculatePct(heal->GetEffectiveHeal(), aurEff->GetAmount()); + if (!bp) + return; // Holy Light heals for 100% of the amount if (heal->GetSpellInfo()->Id == SPELL_PALADIN_HOLY_LIGHT) diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index 0fd92cf096f..88572b22fbf 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -293,7 +293,7 @@ class spell_pri_divine_aegis : public AuraScript { PreventDefaultAction(); - int32 absorb = CalculatePct(int32(eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount()); + int32 absorb = CalculatePct(int32(eventInfo.GetHealInfo()->GetEffectiveHeal()), aurEff->GetAmount()); // Multiple effects stack, so let's try to find this aura. if (AuraEffect const* aegis = eventInfo.GetProcTarget()->GetAuraEffect(SPELL_PRIEST_DIVINE_AEGIS, EFFECT_0)) @@ -304,7 +304,8 @@ class spell_pri_divine_aegis : public AuraScript absorb = std::min(absorb, int32(CalculatePct(eventInfo.GetProcTarget()->GetMaxHealth(), 40))); - GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_DIVINE_AEGIS, CastSpellExtraArgs(aurEff).AddSpellBP0(absorb)); + if (absorb) + GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_PRIEST_DIVINE_AEGIS, CastSpellExtraArgs(aurEff).AddSpellBP0(absorb)); } void Register() override diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index 39be05d9f4c..db4f25a6af9 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -146,9 +146,10 @@ class spell_sha_ancestral_awakening : public AuraScript void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) { PreventDefaultAction(); - int32 heal = int32(CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount())); + int32 heal = int32(CalculatePct(eventInfo.GetHealInfo()->GetEffectiveHeal(), aurEff->GetAmount())); - GetTarget()->CastSpell(nullptr, SPELL_SHAMAN_ANCESTRAL_AWAKENING, CastSpellExtraArgs(aurEff).AddSpellBP0(heal)); + if (heal) + GetTarget()->CastSpell(nullptr, SPELL_SHAMAN_ANCESTRAL_AWAKENING, CastSpellExtraArgs(aurEff).AddSpellBP0(heal)); } void Register() override @@ -515,9 +516,10 @@ class spell_sha_glyph_of_healing_wave : public AuraScript void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) { PreventDefaultAction(); - int32 heal = CalculatePct(int32(eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount()); + int32 heal = CalculatePct(int32(eventInfo.GetHealInfo()->GetEffectiveHeal()), aurEff->GetAmount()); - GetTarget()->CastSpell(nullptr, SPELL_SHAMAN_GLYPH_OF_HEALING_WAVE, CastSpellExtraArgs(aurEff).AddSpellBP0(heal)); + if (heal) + GetTarget()->CastSpell(nullptr, SPELL_SHAMAN_GLYPH_OF_HEALING_WAVE, CastSpellExtraArgs(aurEff).AddSpellBP0(heal)); } void Register() override @@ -1178,7 +1180,7 @@ class spell_sha_ancestral_healing : public AuraScript if (Unit* target = eventInfo.GetHealInfo()->GetTarget()) { - int32 healBonus = CalculatePct(eventInfo.GetHealInfo()->GetHeal(), aurEff->GetAmount()); + int32 healBonus = CalculatePct(eventInfo.GetHealInfo()->GetEffectiveHeal(), aurEff->GetAmount()); int32 healthCap = CalculatePct(target->GetMaxHealth(), 10); if (Aura* oldVigor = target->GetAura(SPELL_SHAMAN_ANCESTRAL_VIGOR, GetTarget()->GetGUID())) @@ -1186,7 +1188,8 @@ class spell_sha_ancestral_healing : public AuraScript healBonus = std::min(healBonus, healthCap); - GetUnitOwner()->CastSpell(target, SPELL_SHAMAN_ANCESTRAL_VIGOR, CastSpellExtraArgs(aurEff).AddSpellBP0(healBonus)); + if (healBonus) + GetUnitOwner()->CastSpell(target, SPELL_SHAMAN_ANCESTRAL_VIGOR, CastSpellExtraArgs(aurEff).AddSpellBP0(healBonus)); } }