diff options
4 files changed, 102 insertions, 1 deletions
diff --git a/sql/updates/world/3.3.5/2025_08_05_00_world.sql b/sql/updates/world/3.3.5/2025_08_05_00_world.sql new file mode 100644 index 00000000000..e7a517d19c7 --- /dev/null +++ b/sql/updates/world/3.3.5/2025_08_05_00_world.sql @@ -0,0 +1,11 @@ +-- +DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_ruins_of_ahnqiraj_itch', 'spell_temple_of_ahnqiraj_itch'); +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(25185, 'spell_ruins_of_ahnqiraj_itch'), +(26077, 'spell_temple_of_ahnqiraj_itch'); + +UPDATE `creature_template` SET `AIName` = 'SmartAI' WHERE `entry` = 15325; +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (15325,15236) AND `source_type` = 0; +INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES +(15325,0,0,0,0,0,100,0,5000,10000,10000,15000,0,11,25185,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Hive'Zara Wasp - In Combat - Cast 'Itch'"), +(15236,0,0,0,0,0,100,0,5000,10000,10000,15000,0,11,26077,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"Vekniss Wasp - In Combat - Cast 'Itch'"); 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(); |