refactor(Scripts/EasternKingdoms): RegisterSpellScript macro (#19241)
* zone_undercity spell:spell_blight_worm_ingest * zone_blasted_lands spell:spell_razelikh_teleport_group * zone_isle_of_queldanas spell:spell_bh_cleanse_quel_delar
This commit is contained in:
@@ -37,14 +37,9 @@ enum DeathlyUsher
|
|||||||
SPELL_TELEPORT_GROUP = 27686
|
SPELL_TELEPORT_GROUP = 27686
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_razelikh_teleport_group : public SpellScriptLoader
|
class spell_razelikh_teleport_group : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_razelikh_teleport_group);
|
||||||
spell_razelikh_teleport_group() : SpellScriptLoader("spell_razelikh_teleport_group") { }
|
|
||||||
|
|
||||||
class spell_razelikh_teleport_group_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_razelikh_teleport_group_SpellScript);
|
|
||||||
|
|
||||||
bool Validate(SpellInfo const* /*spell*/) override
|
bool Validate(SpellInfo const* /*spell*/) override
|
||||||
{
|
{
|
||||||
@@ -69,17 +64,11 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_razelikh_teleport_group_SpellScript::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
OnEffectHitTarget += SpellEffectFn(spell_razelikh_teleport_group::HandleScriptEffect, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_razelikh_teleport_group_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_blasted_lands()
|
void AddSC_blasted_lands()
|
||||||
{
|
{
|
||||||
new spell_razelikh_teleport_group();
|
RegisterSpellScript(spell_razelikh_teleport_group);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -457,14 +457,9 @@ enum PurificationIds
|
|||||||
NPC_AURIC = 37765,
|
NPC_AURIC = 37765,
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_bh_cleanse_quel_delar : public SpellScriptLoader
|
class spell_bh_cleanse_quel_delar : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_bh_cleanse_quel_delar);
|
||||||
spell_bh_cleanse_quel_delar() : SpellScriptLoader("spell_bh_cleanse_quel_delar") { }
|
|
||||||
|
|
||||||
class spell_bh_cleanse_quel_delar_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_bh_cleanse_quel_delar_SpellScript);
|
|
||||||
|
|
||||||
void OnEffect(SpellEffIndex /*effIndex*/)
|
void OnEffect(SpellEffIndex /*effIndex*/)
|
||||||
{
|
{
|
||||||
@@ -475,13 +470,7 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectLaunch += SpellEffectFn(spell_bh_cleanse_quel_delar_SpellScript::OnEffect, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
|
OnEffectLaunch += SpellEffectFn(spell_bh_cleanse_quel_delar::OnEffect, EFFECT_0, SPELL_EFFECT_SEND_EVENT);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_bh_cleanse_quel_delar_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -692,7 +681,7 @@ void AddSC_isle_of_queldanas()
|
|||||||
{
|
{
|
||||||
// OUR:
|
// OUR:
|
||||||
new npc_bh_thalorien_dawnseeker();
|
new npc_bh_thalorien_dawnseeker();
|
||||||
new spell_bh_cleanse_quel_delar();
|
RegisterSpellScript(spell_bh_cleanse_quel_delar);
|
||||||
new npc_grand_magister_rommath();
|
new npc_grand_magister_rommath();
|
||||||
|
|
||||||
// THEIR:
|
// THEIR:
|
||||||
|
|||||||
@@ -2223,14 +2223,9 @@ public:
|
|||||||
######*/
|
######*/
|
||||||
|
|
||||||
// - 61123 - Ingest
|
// - 61123 - Ingest
|
||||||
class spell_blight_worm_ingest : public SpellScriptLoader
|
class spell_blight_worm_ingest : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_blight_worm_ingest);
|
||||||
spell_blight_worm_ingest() : SpellScriptLoader("spell_blight_worm_ingest") { }
|
|
||||||
|
|
||||||
class spell_blight_worm_ingest_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_blight_worm_ingest_SpellScript);
|
|
||||||
|
|
||||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
{
|
{
|
||||||
@@ -2246,13 +2241,7 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_blight_worm_ingest_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
OnEffectHitTarget += SpellEffectFn(spell_blight_worm_ingest::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_blight_worm_ingest_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -4082,5 +4071,5 @@ void AddSC_undercity()
|
|||||||
new npc_jaina_proudmoore_bfu();
|
new npc_jaina_proudmoore_bfu();
|
||||||
new npc_lady_sylvanas_windrunner_bfu();
|
new npc_lady_sylvanas_windrunner_bfu();
|
||||||
new boss_blight_worm();
|
new boss_blight_worm();
|
||||||
new spell_blight_worm_ingest();
|
RegisterSpellScript(spell_blight_worm_ingest);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user