Core/Spells: ported PROC_FLAG_ENTER_COMBAT implementation from master branch and handle the Worgen transformation via its proc aura

This commit is contained in:
Ovahlord committed 2021-08-30 19:24:36 +02:00
1 parent f27c4609fc
commit 3506dae653
7 files changed
+46 -16

No files matched your search

@@ -3009,6 +3009,30 @@ class spell_gen_darkflight : public SpellScriptLoader
return new spell_gen_darkflight_SpellScript();
}
};
enum AlteredForm
{
SPELL_ALTERED_FORM_PROC_AURA = 97681 // Serverside spell
};
class spell_gen_enable_worgen_altered_form : public AuraScript
{
bool Validate(SpellInfo const* /*spellInfo*/) override
{
return ValidateSpellInfo({ SPELL_ALTERED_FORM_PROC_AURA });
}
void HandleApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
{
GetTarget()->CastSpell(nullptr, SPELL_ALTERED_FORM_PROC_AURA, true);
}
void Register() override
{
AfterEffectApply.Register(&spell_gen_enable_worgen_altered_form::HandleApply, EFFECT_0, SPELL_AURA_ENABLE_ALTERED_FORM, AURA_EFFECT_HANDLE_REAL_OR_REAPPLY_MASK);
}
};
enum SeaforiumSpells
{
SPELL_PLANT_CHARGES_CREDIT_ACHIEVEMENT = 60937
@@ -5450,6 +5474,7 @@ void AddSC_generic_spell_scripts()
new spell_gen_running_wild();
new spell_gen_two_forms();
new spell_gen_darkflight();
RegisterSpellScript(spell_gen_enable_worgen_altered_form);
/* */
new spell_gen_seaforium_blast();
new spell_gen_spectator_cheer_trigger();