refactor(Scripts/Kalimdor): Spell Scripts registry macros (#19185)
* zone_dustwallow_marsh spell:spell_ooze_zap * zone_dustwallow_marsh spell:spell_ooze_zap_channel_end * zone_dustwallow_marsh spell:spell_energize_aoe * zone_feralas spell:spell_gordunni_trap * zone_durotar aura:spell_mount_check_aura * zone_durotar spell:spell_voljin_war_drums * zone_durotar spell:spell_voodoo * boss_salramm aura:spell_boss_salramm_steal_flesh_aura * instance_zulfarrak spell:spell_zulfarrak_summon_zulfarrak_zombies * instance_zulfarrak spell:spell_zulfarrak_unlocking
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
--
|
||||||
|
UPDATE `spell_script_names` SET `ScriptName`='spell_mount_check_aura' WHERE `spell_id`=75420;
|
||||||
|
UPDATE `spell_script_names` SET `ScriptName`='spell_boss_salramm_steal_flesh_aura' WHERE `spell_id`=52708;
|
||||||
@@ -161,14 +161,14 @@ public:
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_boss_salramm_steal_flesh : public SpellScriptLoader
|
class spell_boss_salramm_steal_flesh_aura : public AuraScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareAuraScript(spell_boss_salramm_steal_flesh_aura);
|
||||||
spell_boss_salramm_steal_flesh() : SpellScriptLoader("spell_boss_salramm_steal_flesh") { }
|
|
||||||
|
|
||||||
class spell_boss_salramm_steal_flesh_AuraScript : public AuraScript
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
{
|
{
|
||||||
PrepareAuraScript(spell_boss_salramm_steal_flesh_AuraScript);
|
return ValidateSpellInfo({ SPELL_STEAL_FLESH_CASTER, SPELL_STEAL_FLESH_TARGET });
|
||||||
|
}
|
||||||
|
|
||||||
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||||
{
|
{
|
||||||
@@ -183,19 +183,13 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
AfterEffectRemove += AuraEffectRemoveFn(spell_boss_salramm_steal_flesh_AuraScript::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
AfterEffectRemove += AuraEffectRemoveFn(spell_boss_salramm_steal_flesh_aura::OnRemove, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
AuraScript* GetAuraScript() const override
|
|
||||||
{
|
|
||||||
return new spell_boss_salramm_steal_flesh_AuraScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_boss_salramm()
|
void AddSC_boss_salramm()
|
||||||
{
|
{
|
||||||
new boss_salramm();
|
new boss_salramm();
|
||||||
new spell_boss_salramm_steal_flesh();
|
RegisterSpellScript(spell_boss_salramm_steal_flesh_aura);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -457,14 +457,9 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 10247 - Summon Zul'Farrak Zombies
|
// 10247 - Summon Zul'Farrak Zombies
|
||||||
class spell_zulfarrak_summon_zulfarrak_zombies : public SpellScriptLoader
|
class spell_zulfarrak_summon_zulfarrak_zombies : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_zulfarrak_summon_zulfarrak_zombies);
|
||||||
spell_zulfarrak_summon_zulfarrak_zombies() : SpellScriptLoader("spell_zulfarrak_summon_zulfarrak_zombies") { }
|
|
||||||
|
|
||||||
class spell_zulfarrak_summon_zulfarrak_zombies_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_zulfarrak_summon_zulfarrak_zombies_SpellScript);
|
|
||||||
|
|
||||||
void HandleSummon(SpellEffIndex effIndex)
|
void HandleSummon(SpellEffIndex effIndex)
|
||||||
{
|
{
|
||||||
@@ -485,26 +480,15 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHit += SpellEffectFn(spell_zulfarrak_summon_zulfarrak_zombies_SpellScript::HandleSummon, EFFECT_0, SPELL_EFFECT_SUMMON);
|
OnEffectHit += SpellEffectFn(spell_zulfarrak_summon_zulfarrak_zombies::HandleSummon, EFFECT_0, SPELL_EFFECT_SUMMON);
|
||||||
OnEffectHit += SpellEffectFn(spell_zulfarrak_summon_zulfarrak_zombies_SpellScript::HandleSummon, EFFECT_1, SPELL_EFFECT_SUMMON);
|
OnEffectHit += SpellEffectFn(spell_zulfarrak_summon_zulfarrak_zombies::HandleSummon, EFFECT_1, SPELL_EFFECT_SUMMON);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_zulfarrak_summon_zulfarrak_zombies_SpellScript;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 10738 - Unlocking
|
// 10738 - Unlocking
|
||||||
class spell_zulfarrak_unlocking : public SpellScriptLoader
|
class spell_zulfarrak_unlocking : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_zulfarrak_unlocking);
|
||||||
spell_zulfarrak_unlocking() : SpellScriptLoader("spell_zulfarrak_unlocking") { }
|
|
||||||
|
|
||||||
class spell_zulfarrak_unlocking_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_zulfarrak_unlocking_SpellScript);
|
|
||||||
|
|
||||||
void HandleOpenLock(SpellEffIndex /*effIndex*/)
|
void HandleOpenLock(SpellEffIndex /*effIndex*/)
|
||||||
{
|
{
|
||||||
@@ -523,20 +507,14 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_zulfarrak_unlocking_SpellScript::HandleOpenLock, EFFECT_0, SPELL_EFFECT_OPEN_LOCK);
|
OnEffectHitTarget += SpellEffectFn(spell_zulfarrak_unlocking::HandleOpenLock, EFFECT_0, SPELL_EFFECT_OPEN_LOCK);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_zulfarrak_unlocking_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_instance_zulfarrak()
|
void AddSC_instance_zulfarrak()
|
||||||
{
|
{
|
||||||
new instance_zulfarrak();
|
new instance_zulfarrak();
|
||||||
new spell_zulfarrak_summon_zulfarrak_zombies();
|
RegisterSpellScript(spell_zulfarrak_summon_zulfarrak_zombies);
|
||||||
new spell_zulfarrak_unlocking();
|
RegisterSpellScript(spell_zulfarrak_unlocking);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -361,14 +361,9 @@ public:
|
|||||||
|
|
||||||
typedef npc_troll_volunteer::npc_troll_volunteerAI VolunteerAI;
|
typedef npc_troll_volunteer::npc_troll_volunteerAI VolunteerAI;
|
||||||
|
|
||||||
class spell_mount_check : public SpellScriptLoader
|
class spell_mount_check_aura : public AuraScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareAuraScript(spell_mount_check_aura);
|
||||||
spell_mount_check() : SpellScriptLoader("spell_mount_check") { }
|
|
||||||
|
|
||||||
class spell_mount_check_AuraScript : public AuraScript
|
|
||||||
{
|
|
||||||
PrepareAuraScript(spell_mount_check_AuraScript)
|
|
||||||
|
|
||||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
{
|
{
|
||||||
@@ -397,24 +392,13 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mount_check_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mount_check_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
AuraScript* GetAuraScript() const override
|
class spell_voljin_war_drums : public SpellScript
|
||||||
{
|
{
|
||||||
return new spell_mount_check_AuraScript();
|
PrepareSpellScript(spell_voljin_war_drums);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class spell_voljin_war_drums : public SpellScriptLoader
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
spell_voljin_war_drums() : SpellScriptLoader("spell_voljin_war_drums") { }
|
|
||||||
|
|
||||||
class spell_voljin_war_drums_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_voljin_war_drums_SpellScript)
|
|
||||||
|
|
||||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
{
|
{
|
||||||
@@ -438,13 +422,7 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_voljin_war_drums_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
OnEffectHitTarget += SpellEffectFn(spell_voljin_war_drums::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_voljin_war_drums_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -460,14 +438,9 @@ enum VoodooSpells
|
|||||||
};
|
};
|
||||||
|
|
||||||
// 17009
|
// 17009
|
||||||
class spell_voodoo : public SpellScriptLoader
|
class spell_voodoo : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_voodoo);
|
||||||
spell_voodoo() : SpellScriptLoader("spell_voodoo") { }
|
|
||||||
|
|
||||||
class spell_voodoo_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_voodoo_SpellScript)
|
|
||||||
|
|
||||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
{
|
{
|
||||||
@@ -492,13 +465,7 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_voodoo_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
OnEffectHitTarget += SpellEffectFn(spell_voodoo::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_voodoo_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -507,8 +474,8 @@ void AddSC_durotar()
|
|||||||
new npc_tiger_matriarch_credit();
|
new npc_tiger_matriarch_credit();
|
||||||
new npc_tiger_matriarch();
|
new npc_tiger_matriarch();
|
||||||
new npc_troll_volunteer();
|
new npc_troll_volunteer();
|
||||||
new spell_mount_check();
|
RegisterSpellScript(spell_mount_check_aura);
|
||||||
new spell_voljin_war_drums();
|
RegisterSpellScript(spell_voljin_war_drums);
|
||||||
new spell_voodoo();
|
RegisterSpellScript(spell_voodoo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,14 +30,9 @@ enum SpellScripts
|
|||||||
SPELL_ENERGIZED = 42492,
|
SPELL_ENERGIZED = 42492,
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_ooze_zap : public SpellScriptLoader
|
class spell_ooze_zap : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_ooze_zap);
|
||||||
spell_ooze_zap() : SpellScriptLoader("spell_ooze_zap") { }
|
|
||||||
|
|
||||||
class spell_ooze_zap_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_ooze_zap_SpellScript);
|
|
||||||
|
|
||||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
{
|
{
|
||||||
@@ -64,25 +59,14 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_ooze_zap_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
OnEffectHitTarget += SpellEffectFn(spell_ooze_zap::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
OnCheckCast += SpellCheckCastFn(spell_ooze_zap_SpellScript::CheckRequirement);
|
OnCheckCast += SpellCheckCastFn(spell_ooze_zap::CheckRequirement);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
class spell_ooze_zap_channel_end : public SpellScript
|
||||||
{
|
{
|
||||||
return new spell_ooze_zap_SpellScript();
|
PrepareSpellScript(spell_ooze_zap_channel_end);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class spell_ooze_zap_channel_end : public SpellScriptLoader
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
spell_ooze_zap_channel_end() : SpellScriptLoader("spell_ooze_zap_channel_end") { }
|
|
||||||
|
|
||||||
class spell_ooze_zap_channel_end_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_ooze_zap_channel_end_SpellScript);
|
|
||||||
|
|
||||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
{
|
{
|
||||||
@@ -99,24 +83,13 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_ooze_zap_channel_end_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
OnEffectHitTarget += SpellEffectFn(spell_ooze_zap_channel_end::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
class spell_energize_aoe : public SpellScript
|
||||||
{
|
{
|
||||||
return new spell_ooze_zap_channel_end_SpellScript();
|
PrepareSpellScript(spell_energize_aoe);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
class spell_energize_aoe : public SpellScriptLoader
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
spell_energize_aoe() : SpellScriptLoader("spell_energize_aoe") { }
|
|
||||||
|
|
||||||
class spell_energize_aoe_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_energize_aoe_SpellScript);
|
|
||||||
|
|
||||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
{
|
{
|
||||||
@@ -143,22 +116,16 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnEffectHitTarget += SpellEffectFn(spell_energize_aoe_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
OnEffectHitTarget += SpellEffectFn(spell_energize_aoe::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_energize_aoe_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
|
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_energize_aoe::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY);
|
||||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_energize_aoe_SpellScript::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENTRY);
|
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_energize_aoe::FilterTargets, EFFECT_1, TARGET_UNIT_SRC_AREA_ENTRY);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_energize_aoe_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_dustwallow_marsh()
|
void AddSC_dustwallow_marsh()
|
||||||
{
|
{
|
||||||
new spell_ooze_zap();
|
RegisterSpellScript(spell_ooze_zap);
|
||||||
new spell_ooze_zap_channel_end();
|
RegisterSpellScript(spell_ooze_zap_channel_end);
|
||||||
new spell_energize_aoe();
|
RegisterSpellScript(spell_energize_aoe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,14 +33,9 @@ enum GordunniTrap
|
|||||||
GO_GORDUNNI_DIRT_MOUND = 144064,
|
GO_GORDUNNI_DIRT_MOUND = 144064,
|
||||||
};
|
};
|
||||||
|
|
||||||
class spell_gordunni_trap : public SpellScriptLoader
|
class spell_gordunni_trap : public SpellScript
|
||||||
{
|
{
|
||||||
public:
|
PrepareSpellScript(spell_gordunni_trap);
|
||||||
spell_gordunni_trap() : SpellScriptLoader("spell_gordunni_trap") { }
|
|
||||||
|
|
||||||
class spell_gordunni_trap_SpellScript : public SpellScript
|
|
||||||
{
|
|
||||||
PrepareSpellScript(spell_gordunni_trap_SpellScript);
|
|
||||||
|
|
||||||
void HandleDummy()
|
void HandleDummy()
|
||||||
{
|
{
|
||||||
@@ -54,18 +49,12 @@ public:
|
|||||||
|
|
||||||
void Register() override
|
void Register() override
|
||||||
{
|
{
|
||||||
OnCast += SpellCastFn(spell_gordunni_trap_SpellScript::HandleDummy);
|
OnCast += SpellCastFn(spell_gordunni_trap::HandleDummy);
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
SpellScript* GetSpellScript() const override
|
|
||||||
{
|
|
||||||
return new spell_gordunni_trap_SpellScript();
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void AddSC_feralas()
|
void AddSC_feralas()
|
||||||
{
|
{
|
||||||
new spell_gordunni_trap();
|
RegisterSpellScript(spell_gordunni_trap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user