Files
TCPlayerbotCore/src/server/scripts/Spells/spell_dh.cpp
T

60 lines
1.9 KiB
C++
Raw Normal View History

2016-07-23 18:39:56 +02:00
/*
2020-01-02 06:44:10 +01:00
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
2016-07-23 18:39:56 +02:00
*
* 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/>.
*/
/*
* Scripts for spells with SPELLFAMILY_DEMONHUNTER and SPELLFAMILY_GENERIC spells used by demon hunter players.
2016-07-23 18:39:56 +02:00
* 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()->CastCustomSpell(SPELL_CHAOS_STRIKE_ENERGIZE, SPELLVALUE_BASE_POINT0, aurEff->GetAmount(), GetTarget(), true, nullptr, aurEff);
}
void Register() override
{
OnEffectProc += AuraEffectProcFn(spell_dh_chaos_strike::HandleEffectProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};
2016-07-23 18:39:56 +02:00
void AddSC_demon_hunter_spell_scripts()
{
RegisterAuraScript(spell_dh_chaos_strike);
2016-07-23 18:39:56 +02:00
}