diff options
author | offl <11556157+offl@users.noreply.github.com> | 2025-08-05 19:52:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-05 18:52:48 +0200 |
commit | cac0188e4974b9013e0eda09f4c7352f4d3b5e6e (patch) | |
tree | 102347fe1ab07a7f4986057854b570fb12f2ba15 /src | |
parent | f22afbca056f502c94f65b28846c2bcd7c57eb02 (diff) |
Scripts/Spells: Implement Itch (#31193)
Diffstat (limited to 'src')
3 files changed, 91 insertions, 1 deletions
diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp new file mode 100644 index 00000000000..9ae50ef5cb6 --- /dev/null +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/ruins_of_ahnqiraj.cpp @@ -0,0 +1,56 @@ +/* + * This file is part of the TrinityCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include "ScriptMgr.h" +#include "SpellAuras.h" +#include "SpellScript.h" +#include "Unit.h" + +enum AQ20Itch +{ + SPELL_HIVEZARA_CATALYST = 25187 +}; + +// 25185 - Itch +class spell_ruins_of_ahnqiraj_itch : public AuraScript +{ + PrepareAuraScript(spell_ruins_of_ahnqiraj_itch); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_HIVEZARA_CATALYST }); + } + + void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) + return; + + if (Unit* caster = GetCaster()) + caster->CastSpell(GetTarget(), SPELL_HIVEZARA_CATALYST, true); + } + + void Register() override + { + AfterEffectRemove += AuraEffectRemoveFn(spell_ruins_of_ahnqiraj_itch::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } +}; + +void AddSC_ruins_of_ahnqiraj() +{ + RegisterSpellScript(spell_ruins_of_ahnqiraj_itch); +} diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp index 998138c40d7..f1695070ade 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/temple_of_ahnqiraj.cpp @@ -16,10 +16,11 @@ */ #include "ScriptMgr.h" +#include "SpellAuras.h" #include "SpellScript.h" #include "Unit.h" -enum Spells +enum AQ40TeleportSpells { SPELL_TELEPORT_TO_TWIN_EMPS_EFFECT = 29181, SPELL_TELEPORT_TO_FINAL_CHAMBER_EFFECT = 29190 @@ -67,8 +68,39 @@ class spell_temple_of_ahnqiraj_teleport_to_final_chamber : public SpellScript } }; +enum AQ40Itch +{ + SPELL_VEKNISS_CATALYST = 26078 +}; + +// 26077 - Itch +class spell_temple_of_ahnqiraj_itch : public AuraScript +{ + PrepareAuraScript(spell_temple_of_ahnqiraj_itch); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_VEKNISS_CATALYST }); + } + + void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) + return; + + if (Unit* caster = GetCaster()) + caster->CastSpell(GetTarget(), SPELL_VEKNISS_CATALYST, true); + } + + void Register() override + { + AfterEffectRemove += AuraEffectRemoveFn(spell_temple_of_ahnqiraj_itch::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL); + } +}; + void AddSC_temple_of_ahnqiraj() { RegisterSpellScript(spell_temple_of_ahnqiraj_teleport_to_twin_emperors); RegisterSpellScript(spell_temple_of_ahnqiraj_teleport_to_final_chamber); + RegisterSpellScript(spell_temple_of_ahnqiraj_itch); } diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp index 4506c2e4b7f..2c7a766e0a2 100644 --- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp +++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp @@ -83,6 +83,7 @@ void AddSC_boss_buru(); void AddSC_boss_ayamiss(); void AddSC_boss_ossirian(); void AddSC_instance_ruins_of_ahnqiraj(); +void AddSC_ruins_of_ahnqiraj(); // Temple of ahn'qiraj void AddSC_boss_cthun(); void AddSC_boss_viscidus(); @@ -197,6 +198,7 @@ void AddKalimdorScripts() AddSC_boss_ayamiss(); AddSC_boss_ossirian(); AddSC_instance_ruins_of_ahnqiraj(); + AddSC_ruins_of_ahnqiraj(); // Temple of ahn'qiraj AddSC_boss_cthun(); AddSC_boss_viscidus(); |