refactor(Scripts/World): Spell Scripts registry macros (#19224)
* boss_emerald_dragons spell:spell_dream_fog_sleep * boss_emerald_dragons spell:spell_mark_of_nature
This commit is contained in:
@@ -736,14 +736,9 @@ public:
|
|||||||
* --- Spell: Dream Fog
|
* --- Spell: Dream Fog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class spell_dream_fog_sleep : public SpellScriptLoader
|
class spell_dream_fog_sleep : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_dream_fog_sleep);
|
||||||
spell_dream_fog_sleep() : SpellScriptLoader("spell_dream_fog_sleep") { }
|
|
||||||
|
|
||||||
class spell_dream_fog_sleep_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_dream_fog_sleep_SpellScript);
|
|
||||||
|
|
||||||
void HandleEffect(SpellEffIndex /*effIndex*/)
|
void HandleEffect(SpellEffIndex /*effIndex*/)
|
||||||
{
|
{
|
||||||
@@ -763,14 +758,8 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_dream_fog_sleep_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
OnEffectHitTarget += SpellEffectFn(spell_dream_fog_sleep::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dream_fog_sleep_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
|
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_dream_fog_sleep::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_dream_fog_sleep_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -827,14 +816,9 @@ class spell_shadow_bolt_whirl : public AuraScript
|
|||||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_shadow_bolt_whirl::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
OnEffectPeriodic += AuraEffectPeriodicFn(spell_shadow_bolt_whirl::HandlePeriodic, EFFECT_0, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
class spell_mark_of_nature : public SpellScriptLoader
|
class spell_mark_of_nature : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_mark_of_nature);
|
||||||
spell_mark_of_nature() : SpellScriptLoader("spell_mark_of_nature") { }
|
|
||||||
|
|
||||||
class spell_mark_of_nature_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_mark_of_nature_SpellScript);
|
|
||||||
|
|
||||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
{
|
{
|
||||||
@@ -854,14 +838,8 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_nature_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mark_of_nature::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_mark_of_nature_SpellScript::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
OnEffectHitTarget += SpellEffectFn(spell_mark_of_nature::HandleEffect, EFFECT_0, SPELL_EFFECT_APPLY_AURA);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_mark_of_nature_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -878,8 +856,8 @@ void AddSC_emerald_dragons()
|
|||||||
new boss_lethon();
|
new boss_lethon();
|
||||||
|
|
||||||
// dragon spellscripts
|
// dragon spellscripts
|
||||||
new spell_dream_fog_sleep();
|
RegisterSpellScript(spell_dream_fog_sleep);
|
||||||
new spell_mark_of_nature();
|
RegisterSpellScript(spell_mark_of_nature);
|
||||||
RegisterSpellScript(spell_shadow_bolt_whirl);
|
RegisterSpellScript(spell_shadow_bolt_whirl);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user