Scripts/Spells: Added spell effect validation helper

Port From (https://github.com/TrinityCore/TrinityCore/commit/f8a6a9b01713a5dbe5ed38bd3d1b1c72191cf288)
This commit is contained in:
hondacrx
2023-06-13 03:59:41 -04:00
parent 71a878c2cf
commit b7146a011e
14 changed files with 73 additions and 51 deletions
+5 -5
View File
@@ -3694,7 +3694,7 @@ namespace Scripts.Spells.Items
{
public override bool Validate(SpellInfo spellInfo)
{
return spellInfo.GetEffects().Count > 1;
return ValidateSpellEffect(spellInfo.Id, 1);
}
public override bool Load()
@@ -3720,7 +3720,7 @@ namespace Scripts.Spells.Items
{
public override bool Validate(SpellInfo spellInfo)
{
return spellInfo.GetEffects().Count > 1;
return ValidateSpellEffect(spellInfo.Id, 1);
}
public override bool Load()
@@ -3826,7 +3826,7 @@ namespace Scripts.Spells.Items
{
public override bool Validate(SpellInfo spellInfo)
{
return spellInfo.GetEffects().Count > 1;
return ValidateSpellEffect(spellInfo.Id, 1);
}
void OnRemove(AuraEffect effect, AuraEffectHandleModes mode)
@@ -4106,7 +4106,7 @@ namespace Scripts.Spells.Items
{
public override bool Validate(SpellInfo spellInfo)
{
return spellInfo.GetEffects().Count > 1
return ValidateSpellEffect(spellInfo.Id, 1)
&& ValidateSpellInfo(spellInfo.GetEffect(1).TriggerSpell);
}
@@ -4210,7 +4210,7 @@ namespace Scripts.Spells.Items
{
public override bool Validate(SpellInfo spellInfo)
{
return spellInfo.GetEffects().Count > 1;
return ValidateSpellEffect(spellInfo.Id, 1);
}
bool CheckHealth(AuraEffect aurEff, ProcEventInfo eventInfo)