Scripts/Spells: Converted remaining spell scripts to use ValidateSpellEffect

Port From (https://github.com/TrinityCore/TrinityCore/commit/622eed752bc69fc4c34bb568d96d51913258f852)
This commit is contained in:
hondacrx
2023-06-13 04:48:55 -04:00
parent 533e1162f2
commit 160849fec1
9 changed files with 14 additions and 16 deletions
+4 -4
View File
@@ -639,7 +639,7 @@ namespace Scripts.Spells.Generic
public override bool Validate(SpellInfo spellInfo)
{
if (spellInfo.GetEffects().Empty() || !spellInfo.GetEffect(0).IsAura(AuraType.ModPowerRegen))
if (!ValidateSpellEffect(spellInfo.Id, 0) || !spellInfo.GetEffect(0).IsAura(AuraType.ModPowerRegen))
{
Log.outError(LogFilter.Spells, "Aura {GetId()} structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN");
return false;
@@ -718,7 +718,7 @@ namespace Scripts.Spells.Generic
{
public override bool Validate(SpellInfo spellInfo)
{
return !spellInfo.GetEffects().Empty() && ValidateSpellInfo(spellInfo.GetEffect(0).TriggerSpell);
return ValidateSpellEffect(spellInfo.Id, 0) && ValidateSpellInfo(spellInfo.GetEffect(0).TriggerSpell);
}
void PeriodicTick(AuraEffect aurEff)
@@ -3808,7 +3808,7 @@ namespace Scripts.Spells.Generic
{
public override bool Validate(SpellInfo spellInfo)
{
if (spellInfo.GetEffects().Empty())
if (!ValidateSpellEffect(spellInfo.Id, 0))
return false;
if (spellInfo.GetEffect(0).CalcValue() < 1)
@@ -4033,7 +4033,7 @@ namespace Scripts.Spells.Generic
public override bool Validate(SpellInfo spellInfo)
{
return ValidateSpellInfo((uint)RequiredMixologySpells.Mixology) && !spellInfo.GetEffects().Empty();
return ValidateSpellInfo((uint)RequiredMixologySpells.Mixology) && ValidateSpellEffect(spellInfo.Id, 0);
}
public override bool Load()