refactor(Scripts/Anubarak): Convert spellscripts to new system (#13194)
This commit is contained in:
@@ -241,14 +241,9 @@ class boss_anub_arak : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_azjol_nerub_carrion_beetels : public SpellScriptLoader
|
||||
class spell_azjol_nerub_carrion_beetels : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_azjol_nerub_carrion_beetels() : SpellScriptLoader("spell_azjol_nerub_carrion_beetels") { }
|
||||
|
||||
class spell_azjol_nerub_carrion_beetelsAuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_azjol_nerub_carrion_beetelsAuraScript)
|
||||
PrepareAuraScript(spell_azjol_nerub_carrion_beetels)
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
@@ -259,24 +254,13 @@ class spell_azjol_nerub_carrion_beetels : public SpellScriptLoader
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_azjol_nerub_carrion_beetelsAuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript *GetAuraScript() const override
|
||||
{
|
||||
return new spell_azjol_nerub_carrion_beetelsAuraScript();
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_azjol_nerub_carrion_beetels::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_azjol_nerub_pound : public SpellScriptLoader
|
||||
class spell_azjol_nerub_pound : public SpellScript
|
||||
{
|
||||
public:
|
||||
spell_azjol_nerub_pound() : SpellScriptLoader("spell_azjol_nerub_pound") { }
|
||||
|
||||
class spell_azjol_nerub_pound_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_azjol_nerub_pound_SpellScript);
|
||||
PrepareSpellScript(spell_azjol_nerub_pound);
|
||||
|
||||
void HandleApplyAura(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
@@ -286,24 +270,13 @@ class spell_azjol_nerub_pound : public SpellScriptLoader
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_azjol_nerub_pound_SpellScript::HandleApplyAura, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_azjol_nerub_pound_SpellScript();
|
||||
OnEffectHitTarget += SpellEffectFn(spell_azjol_nerub_pound::HandleApplyAura, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||
}
|
||||
};
|
||||
|
||||
class spell_azjol_nerub_impale_summon : public SpellScriptLoader
|
||||
class spell_azjol_nerub_impale_summon : public SpellScript
|
||||
{
|
||||
public:
|
||||
spell_azjol_nerub_impale_summon() : SpellScriptLoader("spell_azjol_nerub_impale_summon") { }
|
||||
|
||||
class spell_azjol_nerub_impale_summon_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_azjol_nerub_impale_summon_SpellScript);
|
||||
PrepareSpellScript(spell_azjol_nerub_impale_summon);
|
||||
|
||||
void SetDest(SpellDestination& dest)
|
||||
{
|
||||
@@ -315,20 +288,14 @@ class spell_azjol_nerub_impale_summon : public SpellScriptLoader
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_azjol_nerub_impale_summon_SpellScript::SetDest, EFFECT_0, TARGET_DEST_CASTER);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_azjol_nerub_impale_summon_SpellScript();
|
||||
OnDestinationTargetSelect += SpellDestinationTargetSelectFn(spell_azjol_nerub_impale_summon::SetDest, EFFECT_0, TARGET_DEST_CASTER);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_anub_arak()
|
||||
{
|
||||
new boss_anub_arak();
|
||||
new spell_azjol_nerub_carrion_beetels();
|
||||
new spell_azjol_nerub_pound();
|
||||
new spell_azjol_nerub_impale_summon();
|
||||
RegisterSpellScript(spell_azjol_nerub_carrion_beetels);
|
||||
RegisterSpellScript(spell_azjol_nerub_pound);
|
||||
RegisterSpellScript(spell_azjol_nerub_impale_summon);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user