Skip to content

Commit

Permalink
Scripts/Spells: Implemented Demon Hunter Vengeful Bonds
Browse files Browse the repository at this point in the history
  • Loading branch information
mdX7 committed Oct 24, 2024
1 parent 831e102 commit 6dab379
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sql/updates/world/master/2024_10_24_03_world.sql
Original file line number Diff line number Diff line change
@@ -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');
22 changes: 22 additions & 0 deletions src/server/scripts/Spells/spell_dh.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -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<WorldObject*>& 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);
Expand All @@ -529,6 +550,7 @@ void AddSC_demon_hunter_spell_scripts()
new areatrigger_dh_generic_sigil<SPELL_DH_SIGIL_OF_FLAME_AOE>("areatrigger_dh_sigil_of_flame");
RegisterAreaTriggerAI(areatrigger_dh_sigil_of_chains);
RegisterSpellScript(spell_dh_sigil_of_chains);
RegisterSpellScript(spell_dh_vengeful_retreat_damage);

// Havoc

Expand Down

0 comments on commit 6dab379

Please sign in to comment.