/* * 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 . */ /* * Scripts for spells with SPELLFAMILY_DEMONHUNTER and SPELLFAMILY_GENERIC spells used by demon hunter players. * Ordered alphabetically using scriptname. * Scriptnames of files in this file should be prefixed with "spell_dh_". */ #include "ScriptMgr.h" #include "SpellAuraEffects.h" #include "SpellMgr.h" #include "SpellScript.h" enum DemonHunterSpells { SPELL_CHAOS_STRIKE_ENERGIZE = 193840, }; // 197125 - Chaos Strike class spell_dh_chaos_strike : public AuraScript { PrepareAuraScript(spell_dh_chaos_strike); bool Validate(SpellInfo const* /*spellInfo*/) override { return ValidateSpellInfo({ SPELL_CHAOS_STRIKE_ENERGIZE }); } void HandleEffectProc(AuraEffect* aurEff, ProcEventInfo& /*eventInfo*/) { PreventDefaultAction(); GetTarget()->CastSpell(GetTarget(), SPELL_CHAOS_STRIKE_ENERGIZE, CastSpellExtraArgs(TRIGGERED_FULL_MASK).AddSpellBP0(aurEff->GetAmount()).SetTriggeringAura(aurEff)); } void Register() override { OnEffectProc += AuraEffectProcFn(spell_dh_chaos_strike::HandleEffectProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL); } }; void AddSC_demon_hunter_spell_scripts() { RegisterAuraScript(spell_dh_chaos_strike); }