diff options
author | Shauren <shauren.trinity@gmail.com> | 2025-01-01 20:32:23 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2025-01-01 20:32:23 +0100 |
commit | 887fcbc02b4ee81a95ec764f158b4809890556f4 (patch) | |
tree | c8e98a90d60de5a0c4394966ab96308a96588e17 | |
parent | 54a83b4b689b7d2bbddb91fc79319dd806da8cc0 (diff) |
Scripts/Spells: Removed unneccessary hacks - reagent consumption by triggered spells fixed in 54a83b4b689b7d2bbddb91fc79319dd806da8cc0
5 files changed, 1 insertions, 110 deletions
diff --git a/sql/updates/world/master/2025_01_01_01_world.sql b/sql/updates/world/master/2025_01_01_01_world.sql new file mode 100644 index 00000000000..bfcfbb824a2 --- /dev/null +++ b/sql/updates/world/master/2025_01_01_01_world.sql @@ -0,0 +1 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_brewfest_relay_race_intro_force_player_to_throw','spell_silithus_summon_cultist_periodic','spell_hor_quel_delars_will','spell_kaelthas_remove_weapons'); diff --git a/src/server/scripts/Events/brewfest.cpp b/src/server/scripts/Events/brewfest.cpp index 1a4a1bf39c7..f0e13efcb10 100644 --- a/src/server/scripts/Events/brewfest.cpp +++ b/src/server/scripts/Events/brewfest.cpp @@ -205,23 +205,6 @@ class spell_brewfest_exhausted_ram : public AuraScript } }; -// 43714 - Brewfest - Relay Race - Intro - Force - Player to throw- DND -class spell_brewfest_relay_race_intro_force_player_to_throw : public SpellScript -{ - void HandleForceCast(SpellEffIndex effIndex) - { - PreventHitDefaultEffect(effIndex); - // All this spells trigger a spell that requires reagents; if the - // triggered spell is cast as "triggered", reagents are not consumed - GetHitUnit()->CastSpell(nullptr, GetEffectInfo().TriggerSpell, TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_REAGENT_COST); - } - - void Register() override - { - OnEffectHitTarget += SpellEffectFn(spell_brewfest_relay_race_intro_force_player_to_throw::HandleForceCast, EFFECT_0, SPELL_EFFECT_FORCE_CAST); - } -}; - // 43755 - Brewfest - Daily - Relay Race - Player - Increase Mount Duration - DND class spell_brewfest_relay_race_turn_in : public SpellScript { @@ -634,7 +617,6 @@ void AddSC_event_brewfest() RegisterSpellScript(spell_brewfest_ram_fatigue); RegisterSpellScript(spell_brewfest_apple_trap); RegisterSpellScript(spell_brewfest_exhausted_ram); - RegisterSpellScript(spell_brewfest_relay_race_intro_force_player_to_throw); RegisterSpellScript(spell_brewfest_relay_race_turn_in); RegisterSpellScript(spell_brewfest_dismount_ram); RegisterSpellScript(spell_brewfest_barker_bunny); diff --git a/src/server/scripts/Kalimdor/zone_silithus.cpp b/src/server/scripts/Kalimdor/zone_silithus.cpp index e04e32428e6..50938720b62 100644 --- a/src/server/scripts/Kalimdor/zone_silithus.cpp +++ b/src/server/scripts/Kalimdor/zone_silithus.cpp @@ -44,8 +44,6 @@ EndContentData */ #include "Player.h" #include "ScriptedCreature.h" #include "ScriptedGossip.h" -#include "SpellAuraEffects.h" -#include "SpellScript.h" #include "TemporarySummon.h" /*##### @@ -1430,44 +1428,6 @@ class go_wind_stone : public GameObjectScript } }; -// 24745 - Summon Templar, Trigger -// 24747 - Summon Templar Fire, Trigger -// 24757 - Summon Templar Air, Trigger -// 24759 - Summon Templar Earth, Trigger -// 24761 - Summon Templar Water, Trigger -// 24762 - Summon Duke, Trigger -// 24766 - Summon Duke Fire, Trigger -// 24769 - Summon Duke Air, Trigger -// 24771 - Summon Duke Earth, Trigger -// 24773 - Summon Duke Water, Trigger -// 24785 - Summon Royal, Trigger -// 24787 - Summon Royal Fire, Trigger -// 24791 - Summon Royal Air, Trigger -// 24792 - Summon Royal Earth, Trigger -// 24793 - Summon Royal Water, Trigger -// 46595 - Summon Ice Stone Lieutenant, Trigger -class spell_silithus_summon_cultist_periodic : public AuraScript -{ - bool Validate(SpellInfo const* spellInfo) override - { - return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell }); - } - - void PeriodicTick(AuraEffect const* aurEff) - { - PreventDefaultAction(); - - // All these spells trigger a spell that requires reagents; if the - // triggered spell is cast as "triggered", reagents are not consumed - GetTarget()->CastSpell(nullptr, aurEff->GetSpellEffectInfo().TriggerSpell, CastSpellExtraArgs(TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_REAGENT_COST).SetTriggeringAura(aurEff)); - } - - void Register() override - { - OnEffectPeriodic += AuraEffectPeriodicFn(spell_silithus_summon_cultist_periodic::PeriodicTick, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL); - } -}; - void AddSC_silithus() { new go_crystalline_tear(); @@ -1475,5 +1435,4 @@ void AddSC_silithus() new npc_anachronos_the_ancient(); new npc_qiraj_war_spawn(); new go_wind_stone(); - RegisterSpellScript(spell_silithus_summon_cultist_periodic); } 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 8b668b5664d..8b42706a5a0 100644 --- a/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp +++ b/src/server/scripts/Northrend/FrozenHalls/HallsOfReflection/halls_of_reflection.cpp @@ -2829,28 +2829,6 @@ class spell_hor_gunship_cannon_fire : public SpellScriptLoader } }; -// 70698 - Quel'Delar's Will -class spell_hor_quel_delars_will : public SpellScript -{ - bool Validate(SpellInfo const* spellInfo) override - { - return ValidateSpellEffect({ { spellInfo->Id, EFFECT_0 } }) && ValidateSpellInfo({ spellInfo->GetEffect(EFFECT_0).TriggerSpell }); - } - - void HandleReagent(SpellEffIndex effIndex) - { - PreventHitDefaultEffect(effIndex); - - // dummy spell consumes reagent, don't ignore it - GetHitUnit()->CastSpell(GetCaster(), GetEffectInfo().TriggerSpell, TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_REAGENT_COST); - } - - void Register() override - { - OnEffectHitTarget += SpellEffectFn(spell_hor_quel_delars_will::HandleReagent, EFFECT_0, SPELL_EFFECT_FORCE_CAST); - } -}; - void AddSC_halls_of_reflection() { new at_hor_intro_start(); @@ -2877,5 +2855,4 @@ void AddSC_halls_of_reflection() new spell_hor_start_halls_of_reflection_quest_ae(); new spell_hor_evasion(); new spell_hor_gunship_cannon_fire(); - RegisterSpellScript(spell_hor_quel_delars_will); } diff --git a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp index 3c6ca02ccba..ad31a740e7b 100644 --- a/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp +++ b/src/server/scripts/Outland/TempestKeep/Eye/boss_kaelthas.cpp @@ -280,12 +280,6 @@ constexpr uint32 SummonWeaponsSpells[] = SPELL_SUMMON_WEAPONE, SPELL_SUMMON_WEAPONF, SPELL_SUMMON_WEAPONG }; -constexpr uint32 RemoveWeaponsSpells[] = -{ - SPELL_REMOVE_WEAPONA, SPELL_REMOVE_WEAPONB, SPELL_REMOVE_WEAPONC, SPELL_REMOVE_WEAPOND, - SPELL_REMOVE_WEAPONE, SPELL_REMOVE_WEAPONF, SPELL_REMOVE_WEAPONG -}; - constexpr uint32 GravityLapseSpells[] = { SPELL_GRAVITY_LAPSE_TELE_FRONT, @@ -1383,27 +1377,6 @@ class spell_kaelthas_summon_weapons : public SpellScript } }; -// 39497 - Remove Enchanted Weapons -class spell_kaelthas_remove_weapons : public SpellScript -{ - bool Validate(SpellInfo const* /*spellInfo*/) override - { - return ValidateSpellInfo(RemoveWeaponsSpells); - } - - void HandleScript(SpellEffIndex /*effIndex*/) - { - if (Player* player = GetHitPlayer()) - for (uint32 spells : RemoveWeaponsSpells) - player->CastSpell(player, spells, TRIGGERED_FULL_MASK & ~TRIGGERED_IGNORE_REAGENT_COST); - } - - void Register() override - { - OnEffectHitTarget += SpellEffectFn(spell_kaelthas_remove_weapons::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); - } -}; - void AddSC_boss_kaelthas() { RegisterTheEyeCreatureAI(boss_kaelthas); @@ -1417,5 +1390,4 @@ void AddSC_boss_kaelthas() RegisterSpellScript(spell_kael_gravity_lapse); RegisterSpellScript(spell_kaelthas_flame_strike); RegisterSpellScript(spell_kaelthas_summon_weapons); - RegisterSpellScript(spell_kaelthas_remove_weapons); } |