diff --git a/sql/updates/world/master/2024_10_24_03_world.sql b/sql/updates/world/master/2024_10_24_03_world.sql new file mode 100644 index 0000000000000..b7ee57d479c0d --- /dev/null +++ b/sql/updates/world/master/2024_10_24_03_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=198813 AND `ScriptName`='spell_dh_vengeful_retreat_damage'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(198813, 'spell_dh_vengeful_retreat_damage'); diff --git a/src/server/scripts/Spells/spell_dh.cpp b/src/server/scripts/Spells/spell_dh.cpp index bd6dab20f36b5..091bd7be669e1 100644 --- a/src/server/scripts/Spells/spell_dh.cpp +++ b/src/server/scripts/Spells/spell_dh.cpp @@ -169,6 +169,7 @@ enum DemonHunterSpells SPELL_DH_SPIRIT_BOMB_VISUAL = 218678, SPELL_DH_THROW_GLAIVE = 185123, SPELL_DH_UNCONTAINED_FEL = 209261, + SPELL_DH_VENGEFUL_BONDS = 320635, SPELL_DH_VENGEFUL_RETREAT = 198813, SPELL_DH_VENGEFUL_RETREAT_TRIGGER = 198793, }; @@ -519,6 +520,26 @@ class spell_dh_soul_furnace_conduit : public AuraScript } }; +// 198813 - Vengeful Retreat +class spell_dh_vengeful_retreat_damage : public SpellScript +{ + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo({ SPELL_DH_VENGEFUL_BONDS }); + } + + void HandleVengefulBonds(std::list& targets) + { + if (!GetCaster()->HasAura(SPELL_DH_VENGEFUL_BONDS)) + targets.clear(); + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dh_vengeful_retreat_damage::HandleVengefulBonds, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY); + } +}; + void AddSC_demon_hunter_spell_scripts() { RegisterSpellScript(spell_dh_chaos_strike); @@ -529,6 +550,7 @@ void AddSC_demon_hunter_spell_scripts() new areatrigger_dh_generic_sigil("areatrigger_dh_sigil_of_flame"); RegisterAreaTriggerAI(areatrigger_dh_sigil_of_chains); RegisterSpellScript(spell_dh_sigil_of_chains); + RegisterSpellScript(spell_dh_vengeful_retreat_damage); // Havoc