From 9227b1c6229274a14158a32d90c676ba99413b01 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Mon, 28 Aug 2023 11:25:22 -0400 Subject: [PATCH] Scripts/Spells: Update prismatic barrier script Port From (https://github.com/TrinityCore/TrinityCore/commit/17252534a1886d91e8669237344af47ce8c9f9b9) --- Source/Scripts/Spells/Mage.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/Scripts/Spells/Mage.cs b/Source/Scripts/Spells/Mage.cs index 892639c8d..a9a3b4066 100644 --- a/Source/Scripts/Spells/Mage.cs +++ b/Source/Scripts/Spells/Mage.cs @@ -983,12 +983,17 @@ namespace Scripts.Spells.Mage [Script] // 235450 - Prismatic Barrier class spell_mage_prismatic_barrier : AuraScript { + public override bool Validate(SpellInfo spellInfo) + { + return ValidateSpellEffect((spellInfo.Id, 5)); + } + void CalculateAmount(AuraEffect aurEff, ref int amount, ref bool canBeRecalculated) { canBeRecalculated = false; Unit caster = GetCaster(); if (caster) - amount += (int)(caster.SpellBaseHealingBonusDone(GetSpellInfo().GetSchoolMask()) * 7.0f); + amount += (int)MathFunctions.CalculatePct(caster.GetMaxHealth(), GetEffectInfo(5).CalcValue(caster)); } public override void Register()