refactor(Scripts/TempestKeep): Spell Scripts use registry macros (#19123)
* init sql * instance_the_eye aura:spell_the_eye_countercharge_aura * instance_the_botanica aura:spell_botanica_call_of_the_falcon_aura * instance_the_botanica aura:spell_botanica_shift_form_aura * arcatraz aura:spell_arcatraz_soul_steal_aura
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
--
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_the_eye_countercharge_aura' WHERE `spell_id`=35035;
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_botanica_call_of_the_falcon_aura' WHERE `spell_id`=34852;
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_botanica_shift_form_aura' WHERE `spell_id`=34201;
|
||||
UPDATE `spell_script_names` SET `ScriptName`='spell_arcatraz_soul_steal_aura' WHERE `spell_id`=36778;
|
||||
@@ -145,14 +145,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class spell_the_eye_countercharge : public SpellScriptLoader
|
||||
class spell_the_eye_countercharge_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_the_eye_countercharge() : SpellScriptLoader("spell_the_eye_countercharge") { }
|
||||
|
||||
class spell_the_eye_counterchargeScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_the_eye_counterchargeScript);
|
||||
PrepareAuraScript(spell_the_eye_countercharge_aura);
|
||||
|
||||
bool PrepareProc(ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
@@ -163,19 +158,13 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_the_eye_counterchargeScript::PrepareProc);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_the_eye_counterchargeScript();
|
||||
DoCheckProc += AuraCheckProcFn(spell_the_eye_countercharge_aura::PrepareProc);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_instance_the_eye()
|
||||
{
|
||||
new instance_the_eye();
|
||||
new spell_the_eye_countercharge();
|
||||
RegisterSpellScript(spell_the_eye_countercharge_aura);
|
||||
}
|
||||
|
||||
|
||||
@@ -585,14 +585,14 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class spell_arcatraz_soul_steal : public SpellScriptLoader
|
||||
class spell_arcatraz_soul_steal_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_arcatraz_soul_steal() : SpellScriptLoader("spell_arcatraz_soul_steal") { }
|
||||
PrepareAuraScript(spell_arcatraz_soul_steal_aura);
|
||||
|
||||
class spell_arcatraz_soul_steal_AuraScript : public AuraScript
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
PrepareAuraScript(spell_arcatraz_soul_steal_AuraScript)
|
||||
return ValidateSpellInfo({ SPELL_SOUL_STEAL });
|
||||
}
|
||||
|
||||
void HandleEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
@@ -608,14 +608,8 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_arcatraz_soul_steal_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_arcatraz_soul_steal_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_arcatraz_soul_steal_AuraScript();
|
||||
OnEffectApply += AuraEffectApplyFn(spell_arcatraz_soul_steal_aura::HandleEffectApply, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_arcatraz_soul_steal_aura::HandleEffectRemove, EFFECT_0, SPELL_AURA_MOD_DAMAGE_PERCENT_DONE, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -624,6 +618,6 @@ void AddSC_arcatraz()
|
||||
new npc_millhouse_manastorm();
|
||||
new npc_warden_mellichar();
|
||||
|
||||
new spell_arcatraz_soul_steal();
|
||||
RegisterSpellScript(spell_arcatraz_soul_steal_aura);
|
||||
}
|
||||
|
||||
|
||||
@@ -42,14 +42,9 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class spell_botanica_call_of_the_falcon : public SpellScriptLoader
|
||||
class spell_botanica_call_of_the_falcon_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_botanica_call_of_the_falcon() : SpellScriptLoader("spell_botanica_call_of_the_falcon") { }
|
||||
|
||||
class spell_botanica_call_of_the_falcon_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_botanica_call_of_the_falcon_AuraScript)
|
||||
PrepareAuraScript(spell_botanica_call_of_the_falcon_aura);
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
@@ -81,28 +76,17 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_botanica_call_of_the_falcon_AuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_botanica_call_of_the_falcon_AuraScript::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectApply += AuraEffectApplyFn(spell_botanica_call_of_the_falcon_aura::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
OnEffectRemove += AuraEffectRemoveFn(spell_botanica_call_of_the_falcon_aura::HandleEffectRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
GuidSet _falconSet;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_botanica_call_of_the_falcon_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
class spell_botanica_shift_form : public SpellScriptLoader
|
||||
class spell_botanica_shift_form_aura : public AuraScript
|
||||
{
|
||||
public:
|
||||
spell_botanica_shift_form() : SpellScriptLoader("spell_botanica_shift_form") { }
|
||||
|
||||
class spell_botanica_shift_form_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_botanica_shift_form_AuraScript);
|
||||
PrepareAuraScript(spell_botanica_shift_form_aura);
|
||||
|
||||
bool Load() override
|
||||
{
|
||||
@@ -153,25 +137,19 @@ public:
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoCheckProc += AuraCheckProcFn(spell_botanica_shift_form_AuraScript::CheckProc);
|
||||
DoCheckProc += AuraCheckProcFn(spell_botanica_shift_form_aura::CheckProc);
|
||||
}
|
||||
|
||||
private:
|
||||
private:
|
||||
uint32 _lastSchool;
|
||||
uint32 _lastForm;
|
||||
uint32 _swapTime;
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_botanica_shift_form_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_instance_the_botanica()
|
||||
{
|
||||
new instance_the_botanica();
|
||||
new spell_botanica_call_of_the_falcon();
|
||||
new spell_botanica_shift_form();
|
||||
RegisterSpellScript(spell_botanica_call_of_the_falcon_aura);
|
||||
RegisterSpellScript(spell_botanica_shift_form_aura);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user