Scripts/Spells: Added spell effect validation helper
Port From (https://github.com/TrinityCore/TrinityCore/commit/f8a6a9b01713a5dbe5ed38bd3d1b1c72191cf288)
This commit is contained in:
@@ -45,6 +45,35 @@ namespace Game.Scripting
|
||||
return allValid;
|
||||
}
|
||||
|
||||
public bool ValidateSpellEffect(params (uint spellId, uint effectIndex)[] pairs)
|
||||
{
|
||||
bool allValid = true;
|
||||
foreach (var (spellId, effectIndex) in pairs)
|
||||
{
|
||||
if (!ValidateSpellEffect(spellId, effectIndex))
|
||||
allValid = false;
|
||||
}
|
||||
return allValid;
|
||||
}
|
||||
|
||||
public bool ValidateSpellEffect(uint spellId, uint effectIndex)
|
||||
{
|
||||
SpellInfo spellInfo = Global.SpellMgr.GetSpellInfo(spellId, Difficulty.None);
|
||||
if (spellInfo == null)
|
||||
{
|
||||
Log.outError(LogFilter.Scripts, $"BaseSpellScript::ValidateSpellEffect: Spell {spellId} does not exist.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (spellInfo.GetEffects().Count <= effectIndex)
|
||||
{
|
||||
Log.outError(LogFilter.Scripts, $"BaseSpellScript::ValidateSpellEffect: Spell {spellId} does not have EFFECT_{effectIndex}.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void _Register()
|
||||
{
|
||||
m_currentScriptState = (byte)SpellScriptState.Registration;
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Scripts.Spells.Azerite
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return spellInfo.GetEffects().Count > 1 && ValidateSpellInfo(spellInfo.GetEffect(1).TriggerSpell);
|
||||
return ValidateSpellEffect(spellInfo.Id, 1) && ValidateSpellInfo(spellInfo.GetEffect(1).TriggerSpell);
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect aurEff, ref int amount, ref bool canBeRecalculated)
|
||||
@@ -420,7 +420,7 @@ namespace Scripts.Spells.Azerite
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.EchoingBladesTrait)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.EchoingBladesTrait, Difficulty.None).GetEffects().Count > 2;
|
||||
&& ValidateSpellEffect(SpellIds.EchoingBladesTrait, 2);
|
||||
}
|
||||
|
||||
void CalculateDamage(uint effIndex)
|
||||
|
||||
@@ -118,7 +118,7 @@ namespace Scripts.Spells.DeathKnight
|
||||
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.RunicPowerEnergize, SpellIds.VolatileShielding) && spellInfo.GetEffects().Count > 1;
|
||||
return ValidateSpellInfo(SpellIds.RunicPowerEnergize, SpellIds.VolatileShielding) && ValidateSpellEffect(spellInfo.Id, 1);
|
||||
}
|
||||
|
||||
public override bool Load()
|
||||
@@ -418,7 +418,7 @@ namespace Scripts.Spells.DeathKnight
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.DeathStrikeEnabler, SpellIds.DeathStrikeHeal, SpellIds.BloodShieldMastery, SpellIds.BloodShieldAbsorb, SpellIds.RecentlyUsedDeathStrike, SpellIds.Frost, SpellIds.DeathStrikeOffhand)
|
||||
&& spellInfo.GetEffects().Count > 2;
|
||||
&& ValidateSpellEffect(spellInfo.Id, 2);
|
||||
}
|
||||
|
||||
void HandleDummy(uint effIndex)
|
||||
@@ -519,7 +519,7 @@ namespace Scripts.Spells.DeathKnight
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.CorpseExplosionTriggered) && spellInfo.GetEffects().Count > 2;
|
||||
return ValidateSpellInfo(SpellIds.CorpseExplosionTriggered) && ValidateSpellEffect(spellInfo.Id, 2);
|
||||
}
|
||||
|
||||
void HandleDamage(uint effIndex)
|
||||
@@ -648,7 +648,7 @@ namespace Scripts.Spells.DeathKnight
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.Obliteration, SpellIds.ObliterationRuneEnergize, SpellIds.KillingMachineProc)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.Obliteration, Difficulty.None).GetEffects().Count > 1;
|
||||
&& ValidateSpellEffect(SpellIds.Obliteration, 1);
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||
@@ -779,7 +779,7 @@ namespace Scripts.Spells.DeathKnight
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return spellInfo.GetEffects().Count > 1 && ValidateSpellInfo(SpellIds.FrostScythe);
|
||||
return ValidateSpellEffect(spellInfo.Id, 1) && ValidateSpellInfo(SpellIds.FrostScythe);
|
||||
}
|
||||
|
||||
bool CheckProc(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||
|
||||
@@ -394,7 +394,7 @@ namespace Scripts.Spells.Druid
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.IncarnationKingOfTheJungle)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.IncarnationKingOfTheJungle, Difficulty.None).GetEffects().Count > 1;
|
||||
&& ValidateSpellEffect(SpellIds.IncarnationKingOfTheJungle, 1);
|
||||
}
|
||||
|
||||
void HandleHitTargetBurn(uint effIndex)
|
||||
@@ -1445,7 +1445,7 @@ namespace Scripts.Spells.Druid
|
||||
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
if (spellInfo.GetEffects().Count <= 2 || spellInfo.GetEffect(2).IsEffect() || spellInfo.GetEffect(2).CalcValue() <= 0)
|
||||
if (!ValidateSpellEffect(spellInfo.Id, 2) || spellInfo.GetEffect(2).IsEffect() || spellInfo.GetEffect(2).CalcValue() <= 0)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1103,7 +1103,7 @@ namespace Scripts.Spells.Generic
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return spellInfo.GetEffects().Count > 2 && ValidateSpellInfo((uint)spellInfo.GetEffect(2).CalcValue());
|
||||
return ValidateSpellEffect(spellInfo.Id, 2) && ValidateSpellInfo((uint)spellInfo.GetEffect(2).CalcValue());
|
||||
}
|
||||
|
||||
void HandleApply(AuraEffect aurEff, AuraEffectHandleModes mode)
|
||||
@@ -2115,7 +2115,7 @@ namespace Scripts.Spells.Generic
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return spellInfo.GetEffects().Count > 1;
|
||||
return ValidateSpellEffect(spellInfo.Id, 1);
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect aurEff, ref int amount, ref bool canBeRecalculated)
|
||||
@@ -2602,7 +2602,7 @@ namespace Scripts.Spells.Generic
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return spellInfo.GetEffects().Count > 1;
|
||||
return ValidateSpellEffect(spellInfo.Id, 1);
|
||||
}
|
||||
|
||||
public override bool Load()
|
||||
@@ -3002,7 +3002,7 @@ namespace Scripts.Spells.Generic
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return spellInfo.GetEffects().Count > 1;
|
||||
return ValidateSpellEffect(spellInfo.Id, 1);
|
||||
}
|
||||
|
||||
void PeriodicTick(AuraEffect aurEff)
|
||||
@@ -4582,7 +4582,7 @@ namespace Scripts.Spells.Generic
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.FaceRage) && spellInfo.GetEffects().Count > 2;
|
||||
return ValidateSpellInfo(SpellIds.FaceRage) && ValidateSpellEffect(spellInfo.Id, 2);
|
||||
}
|
||||
|
||||
void OnRemove(AuraEffect effect, AuraEffectHandleModes mode)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -142,7 +142,7 @@ namespace Scripts.Spells.Mage
|
||||
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.ArcaneBarrageR3, SpellIds.ArcaneBarrageEnergize) && spellInfo.GetEffects().Count > 1;
|
||||
return ValidateSpellInfo(SpellIds.ArcaneBarrageR3, SpellIds.ArcaneBarrageEnergize) && ValidateSpellEffect(spellInfo.Id, 1);
|
||||
}
|
||||
|
||||
void ConsumeArcaneCharges()
|
||||
@@ -205,7 +205,7 @@ namespace Scripts.Spells.Mage
|
||||
if (!ValidateSpellInfo(SpellIds.ArcaneMage, SpellIds.Reverberate))
|
||||
return false;
|
||||
|
||||
if (spellInfo.GetEffects().Count <= 1)
|
||||
if (!ValidateSpellEffect(spellInfo.Id, 1))
|
||||
return false;
|
||||
|
||||
return spellInfo.GetEffect(1).IsEffect(SpellEffectName.SchoolDamage);
|
||||
@@ -357,7 +357,7 @@ namespace Scripts.Spells.Mage
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return spellInfo.GetEffects().Count > 2 && ValidateSpellInfo(SpellIds.CauterizeDot, SpellIds.Cauterized, spellInfo.GetEffect(2).TriggerSpell);
|
||||
return ValidateSpellEffect(spellInfo.Id, 2) && ValidateSpellInfo(SpellIds.CauterizeDot, SpellIds.Cauterized, spellInfo.GetEffect(2).TriggerSpell);
|
||||
}
|
||||
|
||||
void HandleAbsorb(AuraEffect aurEff, DamageInfo dmgInfo, ref uint absorbAmount)
|
||||
@@ -611,7 +611,7 @@ namespace Scripts.Spells.Mage
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.FireBlast)
|
||||
&& CliDB.SpellCategoryStorage.HasRecord(Global.SpellMgr.GetSpellInfo(SpellIds.FireBlast, Difficulty.None).ChargeCategoryId)
|
||||
&& spellInfo.GetEffects().Count > 2;
|
||||
&& ValidateSpellEffect(spellInfo.Id, 2);
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect aurEff, ref int amount, ref bool canBeRecalculated)
|
||||
|
||||
@@ -184,8 +184,7 @@ namespace Scripts.Spells.Paladin
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.AvengingWrath)
|
||||
&& spellInfo.GetEffects().Count >= 1;
|
||||
return ValidateSpellInfo(SpellIds.AvengingWrath) && ValidateSpellEffect(spellInfo.Id, 1);
|
||||
}
|
||||
|
||||
bool CheckProc(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||
|
||||
@@ -206,8 +206,7 @@ namespace Scripts.Spells.Priest
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.AtonementHeal, SpellIds.SinsOfTheMany)
|
||||
&& spellInfo.GetEffects().Count > 1
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.SinsOfTheMany, Difficulty.None).GetEffects().Count > 2;
|
||||
&& ValidateSpellEffect((spellInfo.Id, 1), (SpellIds.SinsOfTheMany, 2));
|
||||
}
|
||||
|
||||
bool CheckProc(ProcEventInfo eventInfo)
|
||||
@@ -483,7 +482,7 @@ namespace Scripts.Spells.Priest
|
||||
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.GuardianSpiritHeal) && spellInfo.GetEffects().Count > 1;
|
||||
return ValidateSpellInfo(SpellIds.GuardianSpiritHeal) && ValidateSpellEffect(spellInfo.Id, 1);
|
||||
}
|
||||
|
||||
public override bool Load()
|
||||
@@ -564,9 +563,7 @@ namespace Scripts.Spells.Priest
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.Heal, SpellIds.FlashHeal, SpellIds.PrayerOfHealing, SpellIds.Renew, SpellIds.Smite, SpellIds.HolyWordChastise, SpellIds.HolyWordSanctify, SpellIds.HolyWordSerenity)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.HolyWordSerenity, Difficulty.None).GetEffects().Count > 1
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.HolyWordSanctify, Difficulty.None).GetEffects().Count > 3
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.HolyWordChastise, Difficulty.None).GetEffects().Count > 1;
|
||||
&& ValidateSpellEffect((SpellIds.HolyWordSerenity, 1), (SpellIds.HolyWordSanctify, 3), (SpellIds.HolyWordChastise, 1));
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect aurEff, ProcEventInfo eventInfo)
|
||||
@@ -907,7 +904,7 @@ namespace Scripts.Spells.Priest
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.Atonement, SpellIds.AtonementTriggered, SpellIds.Trinity) && spellInfo.GetEffects().Count > 3;
|
||||
return ValidateSpellInfo(SpellIds.Atonement, SpellIds.AtonementTriggered, SpellIds.Trinity) && ValidateSpellEffect(spellInfo.Id, 3);
|
||||
}
|
||||
|
||||
void OnTargetSelect(List<WorldObject> targets)
|
||||
@@ -1270,7 +1267,7 @@ namespace Scripts.Spells.Priest
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.PurgeTheWickedPeriodic, SpellIds.RevelInPurity)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.RevelInPurity, Difficulty.None)?.GetEffects().Count > 1;
|
||||
&& ValidateSpellEffect(SpellIds.RevelInPurity, 1);
|
||||
}
|
||||
|
||||
void FilterTargets(List<WorldObject> targets)
|
||||
|
||||
@@ -1349,7 +1349,7 @@ namespace Scripts.Spells.Quest
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return spellInfo.GetEffects().Count > 1
|
||||
return ValidateSpellEffect(spellInfo.Id, 1)
|
||||
&& ValidateSpellInfo((uint)spellInfo.GetEffect(0).CalcValue())
|
||||
&& Global.ObjectMgr.GetQuestTemplate((uint)spellInfo.GetEffect(1).CalcValue()) != null;
|
||||
}
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace Scripts.Spells.Rogue
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return spellInfo.GetEffects().Count > 3;
|
||||
return ValidateSpellEffect(spellInfo.Id, 3);
|
||||
}
|
||||
|
||||
void HandleHitDamage(uint effIndex)
|
||||
@@ -615,7 +615,7 @@ namespace Scripts.Spells.Rogue
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.PremeditationAura, SpellIds.SliceAndDice, SpellIds.PremeditationPassive)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.PremeditationPassive, Difficulty.None).GetEffects().Count > 0;
|
||||
&& ValidateSpellEffect(SpellIds.PremeditationPassive, 0);
|
||||
}
|
||||
|
||||
SpellCastResult HandleCheckCast()
|
||||
|
||||
@@ -190,7 +190,7 @@ namespace Scripts.Spells.Shaman
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.ChainLightningEnergize, SpellIds.MaelstromController)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.MaelstromController, Difficulty.None).GetEffects().Count > 4;
|
||||
&& ValidateSpellEffect(SpellIds.MaelstromController, 4);
|
||||
}
|
||||
|
||||
void HandleScript(uint effIndex)
|
||||
@@ -213,7 +213,7 @@ namespace Scripts.Spells.Shaman
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.ChainLightningOverloadEnergize, SpellIds.MaelstromController)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.MaelstromController, Difficulty.None).GetEffects().Count > 5;
|
||||
&& ValidateSpellEffect(SpellIds.MaelstromController, 5);
|
||||
}
|
||||
|
||||
void HandleScript(uint effIndex)
|
||||
@@ -273,7 +273,7 @@ namespace Scripts.Spells.Shaman
|
||||
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return spellInfo.GetEffects().Count > 1;
|
||||
return ValidateSpellEffect(spellInfo.Id, 1);
|
||||
}
|
||||
|
||||
void FilterTargets(List<WorldObject> targets)
|
||||
@@ -447,7 +447,7 @@ namespace Scripts.Spells.Shaman
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.EarthquakeKnockingDown) && spellInfo.GetEffects().Count > 1;
|
||||
return ValidateSpellInfo(SpellIds.EarthquakeKnockingDown) && ValidateSpellEffect(spellInfo.Id, 1);
|
||||
}
|
||||
|
||||
void HandleDamageCalc(uint effIndex)
|
||||
@@ -491,7 +491,7 @@ namespace Scripts.Spells.Shaman
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.ElementalBlastCrit, SpellIds.ElementalBlastHaste, SpellIds.ElementalBlastMastery, SpellIds.MaelstromController)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.MaelstromController, Difficulty.None).GetEffects().Count > 10;
|
||||
&& ValidateSpellEffect(SpellIds.MaelstromController, 10);
|
||||
}
|
||||
|
||||
void HandleEnergize(uint effIndex)
|
||||
@@ -988,7 +988,7 @@ namespace Scripts.Spells.Shaman
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.LightningBoltEnergize, SpellIds.MaelstromController)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.MaelstromController, Difficulty.None).GetEffects().Count > 0;
|
||||
&& ValidateSpellEffect(SpellIds.MaelstromController, 0);
|
||||
}
|
||||
|
||||
void HandleScript(uint effIndex)
|
||||
@@ -1011,7 +1011,7 @@ namespace Scripts.Spells.Shaman
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.LightningBoltOverloadEnergize, SpellIds.MaelstromController)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.MaelstromController, Difficulty.None).GetEffects().Count > 1;
|
||||
&& ValidateSpellEffect(SpellIds.MaelstromController, 1);
|
||||
}
|
||||
|
||||
void HandleScript(uint effIndex)
|
||||
|
||||
@@ -219,7 +219,7 @@ namespace Scripts.Spells.Warlock
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.GlyphOfDemonTraining, SpellIds.DevourMagicHeal) && spellInfo.GetEffects().Count > 1;
|
||||
return ValidateSpellInfo(SpellIds.GlyphOfDemonTraining, SpellIds.DevourMagicHeal) && ValidateSpellEffect(spellInfo.Id, 1);
|
||||
}
|
||||
|
||||
void OnSuccessfulDispel(uint effIndex)
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace Scripts.Spells.Warrior
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.ColossusSmashAura, SpellIds.InForTheKill, SpellIds.InForTheKillHaste)
|
||||
&& Global.SpellMgr.GetSpellInfo(SpellIds.InForTheKill, Difficulty.None).GetEffects().Count > 2;
|
||||
&& ValidateSpellEffect(SpellIds.InForTheKill, 2);
|
||||
}
|
||||
|
||||
void HandleHit()
|
||||
@@ -412,7 +412,7 @@ namespace Scripts.Spells.Warrior
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
return ValidateSpellInfo(SpellIds.Stoicism) && spellInfo.GetEffects().Count > 1;
|
||||
return ValidateSpellInfo(SpellIds.Stoicism) && ValidateSpellEffect(spellInfo.Id, 1);
|
||||
}
|
||||
|
||||
void HandleProc(ProcEventInfo eventInfo)
|
||||
@@ -523,10 +523,7 @@ namespace Scripts.Spells.Warrior
|
||||
{
|
||||
public override bool Validate(SpellInfo spellInfo)
|
||||
{
|
||||
if (!ValidateSpellInfo(SpellIds.Shockwave, SpellIds.ShockwaveStun))
|
||||
return false;
|
||||
|
||||
return spellInfo.GetEffects().Count > 3;
|
||||
return !ValidateSpellInfo(SpellIds.Shockwave, SpellIds.ShockwaveStun) && ValidateSpellEffect(spellInfo.Id, 3);
|
||||
}
|
||||
|
||||
public override bool Load()
|
||||
|
||||
Reference in New Issue
Block a user