mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-13 17:19:07 +00:00
refactor(Core/Scripts): Spell To Scripts (#9718)
This commit is contained in:
committed by
GitHub
parent
838c88f45a
commit
11a734bf2b
@@ -4363,6 +4363,29 @@ class spell_gen_holiday_buff_food : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_arcane_charge : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_arcane_charge);
|
||||
|
||||
SpellCastResult CheckRequirement()
|
||||
{
|
||||
if (Unit* target = GetExplTargetUnit())
|
||||
{
|
||||
if (target->GetCreatureType() != CREATURE_TYPE_DEMON && target->GetCreatureType() != CREATURE_TYPE_UNDEAD)
|
||||
{
|
||||
return SPELL_FAILED_DONT_REPORT;
|
||||
}
|
||||
}
|
||||
|
||||
return SPELL_CAST_OK;
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnCheckCast += SpellCheckCastFn(spell_gen_arcane_charge::CheckRequirement);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
@@ -4495,4 +4518,5 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_charmed_unit_spell_cooldown);
|
||||
RegisterSpellScript(spell_contagion_of_rot);
|
||||
RegisterSpellScript(spell_gen_holiday_buff_food);
|
||||
RegisterSpellScript(spell_gen_arcane_charge);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user