From c3d98054dd72a9ff2f081eb5e19f21059d1fed20 Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sun, 14 Jul 2024 18:22:24 +0300 Subject: [PATCH] fix(Core/Spells): BT - Summon Shadowfiens should spawn 11, instead of 1 (#19391) * fix(Core/Spells): BT - Summon Shadowfiens should spawn 10, instead of 1 * Revert "fix(Core/Spells): BT - Summon Shadowfiens should spawn 10, instead of 1" This reverts commit e5040484b6bf1bce9343b5d2fae0b24057eeaf7f. * 39649 * spellscript * should summon 11 * Validate --- .../rev_1720886969204406200.sql | 5 ++++ .../Outland/BlackTemple/black_temple.h | 3 ++- .../BlackTemple/instance_black_temple.cpp | 27 +++++++++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 data/sql/updates/pending_db_world/rev_1720886969204406200.sql diff --git a/data/sql/updates/pending_db_world/rev_1720886969204406200.sql b/data/sql/updates/pending_db_world/rev_1720886969204406200.sql new file mode 100644 index 000000000..9781acd1b --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1720886969204406200.sql @@ -0,0 +1,5 @@ +-- +UPDATE`smart_scripts` SET `action_param1` = 39649 WHERE (`entryorguid` = 22855) AND (`source_type` = 0) AND (`id` = 3); + +DELETE FROM `spell_script_names` WHERE `spell_id`=39649 AND `ScriptName`='spell_black_temple_summon_shadowfiends'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (39649, 'spell_black_temple_summon_shadowfiends'); diff --git a/src/server/scripts/Outland/BlackTemple/black_temple.h b/src/server/scripts/Outland/BlackTemple/black_temple.h index 491125714..e4febfe05 100644 --- a/src/server/scripts/Outland/BlackTemple/black_temple.h +++ b/src/server/scripts/Outland/BlackTemple/black_temple.h @@ -115,7 +115,8 @@ enum MiscIds SPELL_SHADOW_INFERNO_DAMAGE = 39646, SPELL_CHAOTIC_CHARGE = 41033, SPELL_DEMENTIA1 = 41406, - SPELL_DEMENTIA2 = 41409 + SPELL_DEMENTIA2 = 41409, + SPELL_SUMMON_SHADOWFIENDS = 41159 }; template diff --git a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp index 61f774c5b..a7c6d7011 100644 --- a/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp +++ b/src/server/scripts/Outland/BlackTemple/instance_black_temple.cpp @@ -458,6 +458,32 @@ class spell_black_temple_dementia_aura : public AuraScript } }; +// 39649 - Summon Shadowfiends +class spell_black_temple_summon_shadowfiends : public SpellScript +{ + PrepareSpellScript(spell_black_temple_summon_shadowfiends); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_SUMMON_SHADOWFIENDS }); + } + + void HandleScriptEffect(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + if (!caster) + return; + + for (uint8 i = 0; i < 11; i++) + caster->CastSpell(caster, SPELL_SUMMON_SHADOWFIENDS, true); + } + + void Register() override + { + OnEffectHitTarget += SpellEffectFn(spell_black_temple_summon_shadowfiends::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } +}; + void AddSC_instance_black_temple() { new instance_black_temple(); @@ -473,5 +499,6 @@ void AddSC_instance_black_temple() RegisterSpellScript(spell_black_temple_consuming_strikes_aura); RegisterSpellScript(spell_black_temple_curse_of_vitality_aura); RegisterSpellScript(spell_black_temple_dementia_aura); + RegisterSpellScript(spell_black_temple_summon_shadowfiends); }