Scripts/Spells: Converted remaining spell scripts to use ValidateSpellEffect
This commit is contained in:
@@ -256,7 +256,7 @@ class spell_gen_arena_drink : public AuraScript
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->GetEffects().empty() || !spellInfo->GetEffect(EFFECT_0).IsAura(SPELL_AURA_MOD_POWER_REGEN))
|
||||
if (!ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) || !spellInfo->GetEffect(EFFECT_0).IsAura(SPELL_AURA_MOD_POWER_REGEN))
|
||||
{
|
||||
TC_LOG_ERROR("spells", "Aura {} structure has been changed - first aura is no longer SPELL_AURA_MOD_POWER_REGEN", GetId());
|
||||
return false;
|
||||
@@ -337,7 +337,7 @@ class spell_gen_aura_of_fear : public AuraScript
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
return !spellInfo->GetEffects().empty() && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
|
||||
return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
|
||||
}
|
||||
|
||||
void PeriodicTick(AuraEffect const* aurEff)
|
||||
@@ -3981,7 +3981,7 @@ class spell_gen_eject_passenger : public SpellScript
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
if (spellInfo->GetEffects().empty())
|
||||
if (!ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }))
|
||||
return false;
|
||||
if (spellInfo->GetEffect(EFFECT_0).CalcValue() < 1)
|
||||
return false;
|
||||
@@ -4202,7 +4202,7 @@ class spell_gen_mixology_bonus : public AuraScript
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_MIXOLOGY }) && !spellInfo->GetEffects().empty();
|
||||
return ValidateSpellInfo({ SPELL_MIXOLOGY }) && ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } });
|
||||
}
|
||||
|
||||
bool Load() override
|
||||
|
||||
Reference in New Issue
Block a user