aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Northrend
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2023-06-03 23:17:28 +0200
committerShauren <shauren.trinity@gmail.com>2023-06-03 23:17:28 +0200
commit622eed752bc69fc4c34bb568d96d51913258f852 (patch)
tree48cefb31c08cd1654a3616295498cd336bb1b646 /src/server/scripts/Northrend
parent277497fdf1ca5f7b310c4544e8f1304a66034884 (diff)
Scripts/Spells: Converted remaining spell scripts to use ValidateSpellEffect
Diffstat (limited to 'src/server/scripts/Northrend')
-rw-r--r--src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp2
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp4
-rw-r--r--src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp4
-rw-r--r--src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp2
-rw-r--r--src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp2
-rw-r--r--src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp2
-rw-r--r--src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp2
-rw-r--r--src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_borean_tundra.cpp4
-rw-r--r--src/server/scripts/Northrend/zone_sholazar_basin.cpp2
-rw-r--r--src/server/scripts/Northrend/zone_wintergrasp.cpp2
14 files changed, 17 insertions, 17 deletions
diff --git a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
index bbf80507f43..ba9282af4f2 100644
--- a/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
+++ b/src/server/scripts/Northrend/ChamberOfAspects/RubySanctum/boss_halion.cpp
@@ -1505,7 +1505,7 @@ class spell_halion_combustion_consumption_periodic : public SpellScriptLoader
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 HandleTick(AuraEffect const* aurEff)
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
index 58fee2d4fe5..aa90590bff7 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_lord_jaraxxus.cpp
@@ -499,7 +499,7 @@ class spell_mistress_kiss_area : public SpellScript
bool Validate(SpellInfo const* spellInfo) override
{
- return !spellInfo->GetEffects().empty() && ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
}
void FilterTargets(std::list<WorldObject*>& targets)
@@ -537,7 +537,7 @@ class spell_fel_streak_visual : public SpellScript
bool Validate(SpellInfo const* spellInfo) override
{
- return !spellInfo->GetEffects().empty() && ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
}
void HandleScript(SpellEffIndex /*effIndex*/)
diff --git a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
index f0a364b28e4..84253a2bef4 100644
--- a/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
+++ b/src/server/scripts/Northrend/CrusadersColiseum/TrialOfTheCrusader/boss_northrend_beasts.cpp
@@ -1215,7 +1215,7 @@ class spell_jormungars_slime_pool : 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)
@@ -1290,7 +1290,7 @@ class spell_icehowl_arctic_breath : public SpellScript
bool Validate(SpellInfo const* spellInfo) override
{
- return !spellInfo->GetEffects().empty() && ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
}
void HandleScriptEffect(SpellEffIndex /*effIndex*/)
diff --git a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
index bc7e37ab603..5beacdc444f 100644
--- a/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
+++ b/src/server/scripts/Northrend/DraktharonKeep/boss_trollgore.cpp
@@ -263,7 +263,7 @@ class spell_trollgore_invader_taunt : public SpellScript
bool Validate(SpellInfo const* spellInfo) override
{
- return !spellInfo->GetEffects().empty() && ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ static_cast<uint32>(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
}
void HandleTaunt(SpellEffIndex /*effIndex*/)
diff --git a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
index 62148407500..6d946beef5b 100644
--- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
+++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp
@@ -2867,7 +2867,7 @@ class spell_hor_quel_delars_will : public SpellScript
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 HandleReagent(SpellEffIndex effIndex)
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
index 3820ec8f52b..8cce088a275 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_icecrown_gunship_battle.cpp
@@ -1734,7 +1734,7 @@ class spell_igb_rocket_pack : public AuraScript
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_ROCKET_PACK_DAMAGE, SPELL_ROCKET_BURST })
- && !sSpellMgr->AssertSpellInfo(SPELL_ROCKET_PACK_DAMAGE, DIFFICULTY_NONE)->GetEffects().empty();
+ && ValidateSpellEffect({ { SPELL_ROCKET_PACK_DAMAGE, EFFECT_0 } });
}
void HandlePeriodic(AuraEffect const* /*aurEff*/)
diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
index a0e8260dc4e..633ec1dc9f6 100644
--- a/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
+++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_lady_deathwhisper.cpp
@@ -1046,7 +1046,7 @@ class spell_deathwhisper_dark_reckoning : public AuraScript
bool Validate(SpellInfo const* spell) override
{
- return !spell->GetEffects().empty()
+ return ValidateSpellEffect({ { spell->Id, EFFECT_0 } })
&& ValidateSpellInfo({ spell->GetEffect(EFFECT_0).TriggerSpell });
}
diff --git a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
index d0e27d5889a..7c4f0321ce5 100644
--- a/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
+++ b/src/server/scripts/Northrend/Naxxramas/boss_grobbulus.cpp
@@ -223,7 +223,7 @@ class spell_grobbulus_poison_cloud : public AuraScript
bool Validate(SpellInfo const* spellInfo) override
{
- return !spellInfo->GetEffects().empty()
+ return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } })
&& ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell });
}
diff --git a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
index 47eddf6beb2..0b014725722 100644
--- a/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
+++ b/src/server/scripts/Northrend/Ulduar/HallsOfStone/boss_krystallus.cpp
@@ -158,7 +158,7 @@ class spell_krystallus_shatter_effect : public SpellScript
bool Validate(SpellInfo const* spellInfo) override
{
- return !spellInfo->GetEffects().empty();
+ return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } });
}
void CalculateDamage()
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
index 5eca8427e41..70e2124f508 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_algalon_the_observer.cpp
@@ -1049,7 +1049,7 @@ class spell_algalon_phase_constellation : 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 HandlePeriodic(AuraEffect const* aurEff)
diff --git a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
index eea2aaf0a74..a72b6682679 100644
--- a/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
+++ b/src/server/scripts/Northrend/Ulduar/Ulduar/boss_flame_leviathan.cpp
@@ -1461,7 +1461,7 @@ class spell_tar_blaze : 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)
diff --git a/src/server/scripts/Northrend/zone_borean_tundra.cpp b/src/server/scripts/Northrend/zone_borean_tundra.cpp
index 9317838dfe8..c36f84ee111 100644
--- a/src/server/scripts/Northrend/zone_borean_tundra.cpp
+++ b/src/server/scripts/Northrend/zone_borean_tundra.cpp
@@ -1414,7 +1414,7 @@ class spell_borean_tundra_nerubar_web_random_unit_not_on_quest : public SpellScr
bool Validate(SpellInfo const* spellInfo) override
{
- return !spellInfo->GetEffects().empty() && ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
}
void HandleScript(SpellEffIndex /*effIndex*/)
@@ -1489,7 +1489,7 @@ class spell_borean_tundra_dispel_freed_soldier_debuff : public SpellScript
bool Validate(SpellInfo const* spellInfo) override
{
- return !spellInfo->GetEffects().empty() && ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
+ return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
}
void HandleScript(SpellEffIndex /*effIndex*/)
diff --git a/src/server/scripts/Northrend/zone_sholazar_basin.cpp b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
index d59d3fa379e..000d8ce01c2 100644
--- a/src/server/scripts/Northrend/zone_sholazar_basin.cpp
+++ b/src/server/scripts/Northrend/zone_sholazar_basin.cpp
@@ -638,7 +638,7 @@ class spell_sholazar_take_sputum_sample : public SpellScript
bool Validate(SpellInfo const* spellInfo) override
{
- return spellInfo->GetEffects().size() > EFFECT_1 && ValidateSpellInfo(
+ return ValidateSpellEffect({ { spellInfo->Id, EFFECT_1 } }) && ValidateSpellInfo(
{
uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()),
uint32(spellInfo->GetEffect(EFFECT_1).CalcValue())
diff --git a/src/server/scripts/Northrend/zone_wintergrasp.cpp b/src/server/scripts/Northrend/zone_wintergrasp.cpp
index 011414865c7..7c23c47d9fe 100644
--- a/src/server/scripts/Northrend/zone_wintergrasp.cpp
+++ b/src/server/scripts/Northrend/zone_wintergrasp.cpp
@@ -475,7 +475,7 @@ class spell_wintergrasp_tenacity_refresh : public AuraScript
bool Validate(SpellInfo const* spellInfo) override
{
- if (spellInfo->GetEffects().size() <= EFFECT_2)
+ if (!ValidateSpellEffect({ { spellInfo->Id, EFFECT_2 } }))
return false;
uint32 triggeredSpellId = spellInfo->GetEffect(EFFECT_2).CalcValue();
return !triggeredSpellId || ValidateSpellInfo({ triggeredSpellId });