Scripts/Spells: Update prismatic barrier script

Port From (https://github.com/TrinityCore/TrinityCore/commit/17252534a1886d91e8669237344af47ce8c9f9b9)
This commit is contained in:
hondacrx
2023-08-28 11:25:22 -04:00
parent 8bef51cf6e
commit 9227b1c622
+6 -1
View File
@@ -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()