refactor(scripts/CrusadersColiseum): spell scripts use registry macros (#20400)
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
--
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_toc25_mistress_kiss_aura' WHERE `spell_id` IN (66334,67905,67906,67907) AND `ScriptName`='spell_toc25_mistress_kiss';
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_faction_champion_warl_unstable_affliction_aura' WHERE `spell_id` IN (65812,68154,68155,68156) AND `ScriptName`='spell_faction_champion_warl_unstable_affliction';
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_pursuing_spikes_aura' WHERE `spell_id` IN (65920,65922,65923) AND `ScriptName`='spell_pursuing_spikes';
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_gen_leeching_swarm_aura' WHERE `spell_id` IN (66118,67630,68646,68647) AND `ScriptName`='spell_gen_leeching_swarm';
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_valkyr_essence_aura' WHERE `spell_id` IN (65684,65686,67176,67177,67178,67222,67223,67224) AND `ScriptName`='spell_valkyr_essence';
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_valkyr_touch_aura' WHERE `spell_id` IN (65950,66001,67281,67282,67283,67296,67297,67298) AND `ScriptName`='spell_valkyr_touch';
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_valkyr_ball_periodic_dummy_aura' WHERE `spell_id`=100101 AND `ScriptName`='spell_valkyr_ball_periodic_dummy';
|
||||
+19
-42
@@ -829,14 +829,14 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class spell_pursuing_spikes : public SpellScriptLoader
|
||||
class spell_pursuing_spikes_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_pursuing_spikes() : SpellScriptLoader("spell_pursuing_spikes") { }
|
||||
PrepareAuraScript(spell_pursuing_spikes_aura);
|
||||
|
||||
class spell_pursuing_spikesAuraScript : public AuraScript
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
PrepareAuraScript(spell_pursuing_spikesAuraScript)
|
||||
return ValidateSpellInfo({ SPELL_SPIKE_FAIL, SPELL_IMPALE });
|
||||
}
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
@@ -857,13 +857,7 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_pursuing_spikesAuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_pursuing_spikesAuraScript();
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_pursuing_spikes_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -874,14 +868,9 @@ enum eLeechingSwarmSpells
|
||||
SPELL_LEECHING_SWARM_HEAL = 66125,
|
||||
};
|
||||
|
||||
class spell_gen_leeching_swarm : public SpellScriptLoader
|
||||
class spell_gen_leeching_swarm_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_gen_leeching_swarm() : SpellScriptLoader("spell_gen_leeching_swarm") { }
|
||||
|
||||
class spell_gen_leeching_swarm_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_gen_leeching_swarm_AuraScript);
|
||||
PrepareAuraScript(spell_gen_leeching_swarm_aura);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
@@ -903,24 +892,18 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_leeching_swarm_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_gen_leeching_swarm_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_gen_leeching_swarm_dmg : public SpellScript
|
||||
{
|
||||
return new spell_gen_leeching_swarm_AuraScript();
|
||||
PrepareSpellScript(spell_gen_leeching_swarm_dmg);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_LEECHING_SWARM_HEAL });
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_leeching_swarm_dmg : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_gen_leeching_swarm_dmg() : SpellScriptLoader("spell_gen_leeching_swarm_dmg") {}
|
||||
|
||||
class spell_gen_leeching_swarm_dmg_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_leeching_swarm_dmg_SpellScript);
|
||||
|
||||
void HandleAfterHit()
|
||||
{
|
||||
@@ -934,13 +917,7 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterHit += SpellHitFn(spell_gen_leeching_swarm_dmg_SpellScript::HandleAfterHit);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_gen_leeching_swarm_dmg_SpellScript();
|
||||
AfterHit += SpellHitFn(spell_gen_leeching_swarm_dmg::HandleAfterHit);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -951,7 +928,7 @@ void AddSC_boss_anubarak_trial()
|
||||
new npc_frost_sphere();
|
||||
new npc_nerubian_burrower();
|
||||
new npc_anubarak_spike();
|
||||
new spell_pursuing_spikes();
|
||||
new spell_gen_leeching_swarm();
|
||||
new spell_gen_leeching_swarm_dmg();
|
||||
RegisterSpellScript(spell_pursuing_spikes_aura);
|
||||
RegisterSpellScript(spell_gen_leeching_swarm_aura);
|
||||
RegisterSpellScript(spell_gen_leeching_swarm_dmg);
|
||||
}
|
||||
|
||||
+4
-15
@@ -2444,14 +2444,9 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class spell_faction_champion_warl_unstable_affliction : public SpellScriptLoader
|
||||
class spell_faction_champion_warl_unstable_affliction_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_faction_champion_warl_unstable_affliction() : SpellScriptLoader("spell_faction_champion_warl_unstable_affliction") { }
|
||||
|
||||
class spell_faction_champion_warl_unstable_affliction_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_faction_champion_warl_unstable_affliction_AuraScript);
|
||||
PrepareAuraScript(spell_faction_champion_warl_unstable_affliction_aura);
|
||||
|
||||
bool Validate(SpellInfo const* /*spell*/) override
|
||||
{
|
||||
@@ -2466,13 +2461,7 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterDispel += AuraDispelFn(spell_faction_champion_warl_unstable_affliction_AuraScript::HandleDispel);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_faction_champion_warl_unstable_affliction_AuraScript();
|
||||
AfterDispel += AuraDispelFn(spell_faction_champion_warl_unstable_affliction_aura::HandleDispel);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -2494,5 +2483,5 @@ void AddSC_boss_faction_champions()
|
||||
new npc_toc_retro_paladin();
|
||||
new npc_toc_pet_warlock();
|
||||
new npc_toc_pet_hunter();
|
||||
new spell_faction_champion_warl_unstable_affliction();
|
||||
RegisterSpellScript(spell_faction_champion_warl_unstable_affliction_aura);
|
||||
}
|
||||
|
||||
+12
-29
@@ -444,14 +444,14 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class spell_toc25_mistress_kiss : public SpellScriptLoader
|
||||
class spell_toc25_mistress_kiss_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_toc25_mistress_kiss() : SpellScriptLoader("spell_toc25_mistress_kiss") { }
|
||||
PrepareAuraScript(spell_toc25_mistress_kiss_aura);
|
||||
|
||||
class spell_toc25_mistress_kiss_AuraScript : public AuraScript
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
PrepareAuraScript(spell_toc25_mistress_kiss_AuraScript)
|
||||
return ValidateSpellInfo({ 66359 });
|
||||
}
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
@@ -466,24 +466,13 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_toc25_mistress_kiss_AuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_toc25_mistress_kiss_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_mistress_kiss_area : public SpellScript
|
||||
{
|
||||
return new spell_toc25_mistress_kiss_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_mistress_kiss_area : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_mistress_kiss_area() : SpellScriptLoader("spell_mistress_kiss_area") {}
|
||||
|
||||
class spell_mistress_kiss_area_SpellScript : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_mistress_kiss_area_SpellScript)
|
||||
PrepareSpellScript(spell_mistress_kiss_area);
|
||||
|
||||
void FilterTargets(std::list<WorldObject*>& targets)
|
||||
{
|
||||
@@ -505,14 +494,8 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mistress_kiss_area_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mistress_kiss_area_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
SpellScript* GetSpellScript() const override
|
||||
{
|
||||
return new spell_mistress_kiss_area_SpellScript();
|
||||
OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mistress_kiss_area::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENEMY);
|
||||
OnEffectHitTarget += SpellEffectFn(spell_mistress_kiss_area::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -521,6 +504,6 @@ void AddSC_boss_jaraxxus()
|
||||
new boss_jaraxxus();
|
||||
new npc_fel_infernal();
|
||||
new npc_mistress_of_pain();
|
||||
new spell_toc25_mistress_kiss();
|
||||
new spell_mistress_kiss_area();
|
||||
RegisterSpellScript(spell_toc25_mistress_kiss_aura);
|
||||
RegisterSpellScript(spell_mistress_kiss_area);
|
||||
}
|
||||
|
||||
+23
-41
@@ -730,14 +730,14 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
class spell_valkyr_essence : public SpellScriptLoader
|
||||
class spell_valkyr_essence_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_valkyr_essence() : SpellScriptLoader("spell_valkyr_essence") { }
|
||||
PrepareAuraScript(spell_valkyr_essence_aura);
|
||||
|
||||
class spell_valkyr_essence_auraAuraScript : public AuraScript
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
PrepareAuraScript(spell_valkyr_essence_auraAuraScript)
|
||||
return ValidateSpellInfo({ SPELL_POWERING_UP, SPELL_SURGE_OF_SPEED });
|
||||
}
|
||||
|
||||
void HandleAfterEffectAbsorb(AuraEffect* /*aurEff*/, DamageInfo& /*dmgInfo*/, uint32& absorbAmount)
|
||||
{
|
||||
@@ -811,24 +811,18 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_valkyr_essence_auraAuraScript::HandleAfterEffectAbsorb, EFFECT_0);
|
||||
AfterEffectAbsorb += AuraEffectAbsorbFn(spell_valkyr_essence_aura::HandleAfterEffectAbsorb, EFFECT_0);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_valkyr_touch_aura : public AuraScript
|
||||
{
|
||||
return new spell_valkyr_essence_auraAuraScript();
|
||||
PrepareAuraScript(spell_valkyr_touch_aura);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_AURA_SPIRIT_OF_REDEMPTION });
|
||||
}
|
||||
};
|
||||
|
||||
class spell_valkyr_touch : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_valkyr_touch() : SpellScriptLoader("spell_valkyr_touch") { }
|
||||
|
||||
class spell_valkyr_touchAuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_valkyr_touchAuraScript)
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* aurEff)
|
||||
{
|
||||
@@ -870,24 +864,18 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_valkyr_touchAuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_valkyr_touch_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
class spell_valkyr_ball_periodic_dummy_aura : public AuraScript
|
||||
{
|
||||
return new spell_valkyr_touchAuraScript();
|
||||
PrepareAuraScript(spell_valkyr_ball_periodic_dummy_aura);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_UNLEASHED_LIGHT, SPELL_UNLEASHED_DARK });
|
||||
}
|
||||
};
|
||||
|
||||
class spell_valkyr_ball_periodic_dummy : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_valkyr_ball_periodic_dummy() : SpellScriptLoader("spell_valkyr_ball_periodic_dummy") { }
|
||||
|
||||
class spell_valkyr_ball_periodic_dummyAuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_valkyr_ball_periodic_dummyAuraScript)
|
||||
|
||||
void HandleEffectPeriodic(AuraEffect const* /*aurEff*/)
|
||||
{
|
||||
@@ -907,13 +895,7 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_valkyr_ball_periodic_dummyAuraScript::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_valkyr_ball_periodic_dummyAuraScript();
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_valkyr_ball_periodic_dummy_aura::HandleEffectPeriodic, EFFECT_0, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -923,7 +905,7 @@ void AddSC_boss_twin_valkyr()
|
||||
new boss_eydis();
|
||||
new npc_essence_of_twin();
|
||||
new npc_concentrated_ball();
|
||||
new spell_valkyr_essence();
|
||||
new spell_valkyr_touch();
|
||||
new spell_valkyr_ball_periodic_dummy();
|
||||
RegisterSpellScript(spell_valkyr_essence_aura);
|
||||
RegisterSpellScript(spell_valkyr_touch_aura);
|
||||
RegisterSpellScript(spell_valkyr_ball_periodic_dummy_aura);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user