mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-27 12:22:39 +01:00
Scripts/Spells Refactored dh & dh spells to use the new macros (#26200)
This commit is contained in:
@@ -32,39 +32,28 @@ enum DemonHunterSpells
|
||||
};
|
||||
|
||||
// 197125 - Chaos Strike
|
||||
class spell_dh_chaos_strike : public SpellScriptLoader
|
||||
class spell_dh_chaos_strike : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_dh_chaos_strike() : SpellScriptLoader("spell_dh_chaos_strike") { }
|
||||
PrepareAuraScript(spell_dh_chaos_strike);
|
||||
|
||||
class spell_dh_chaos_strike_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_dh_chaos_strike_AuraScript);
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_CHAOS_STRIKE_ENERGIZE });
|
||||
}
|
||||
|
||||
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 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_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_dh_chaos_strike_AuraScript();
|
||||
}
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_dh_chaos_strike::HandleEffectProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_demon_hunter_spell_scripts()
|
||||
{
|
||||
new spell_dh_chaos_strike();
|
||||
RegisterAuraScript(spell_dh_chaos_strike);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user