diff options
| author | Aqua Deus <95978183+aquadeus@users.noreply.github.com> | 2022-09-19 20:07:00 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-19 20:07:00 +0200 |
| commit | 56ef6c06eb165e9410a1f0af8b54492ad99eeced (patch) | |
| tree | bab34989047741cefbcc1bc152d7f9c75bc97e3a /src/server/scripts | |
| parent | b4d2166f0c7a61f5a9b159da80e478c5ae7aaa16 (diff) | |
Core/Spells: Fix glyph of stars (druid) (#28258)
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index d194420a8a2..00146e17e91 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -66,6 +66,8 @@ enum DruidSpells SPELL_DRUID_FORMS_TRINKET_NONE = 37344, SPELL_DRUID_FORMS_TRINKET_TREE = 37342, SPELL_DRUID_GALACTIC_GUARDIAN_AURA = 213708, + SPELL_DRUID_GLYPH_OF_STARS = 114301, + SPELL_DRUID_GLYPH_OF_STARS_VISUAL = 114302, SPELL_DRUID_GORE_PROC = 93622, SPELL_DRUID_GROWL = 6795, SPELL_DRUID_IDOL_OF_FERAL_SHADOWS = 34241, @@ -627,6 +629,35 @@ class spell_dru_galactic_guardian : public AuraScript } }; +// 24858 - Moonkin Form +class spell_dru_glyph_of_stars : public AuraScript +{ + PrepareAuraScript(spell_dru_glyph_of_stars); + + bool Validate(SpellInfo const* /*spell*/) override + { + return ValidateSpellInfo({ SPELL_DRUID_GLYPH_OF_STARS, SPELL_DRUID_GLYPH_OF_STARS_VISUAL }); + } + + void OnApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + Unit* target = GetTarget(); + if (target->HasAura(SPELL_DRUID_GLYPH_OF_STARS)) + target->CastSpell(target, SPELL_DRUID_GLYPH_OF_STARS_VISUAL, true); + } + + void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + GetTarget()->RemoveAurasDueToSpell(SPELL_DRUID_GLYPH_OF_STARS_VISUAL); + } + + void Register() override + { + OnEffectApply += AuraEffectApplyFn(spell_dru_glyph_of_stars::OnApply, EFFECT_1, SPELL_AURA_MOD_SHAPESHIFT, AURA_EFFECT_HANDLE_REAL); + OnEffectRemove += AuraEffectRemoveFn(spell_dru_glyph_of_stars::OnRemove, EFFECT_1, SPELL_AURA_MOD_SHAPESHIFT, AURA_EFFECT_HANDLE_REAL); + } +}; + // 210706 - Gore class spell_dru_gore : public AuraScript { @@ -1595,6 +1626,7 @@ void AddSC_druid_spell_scripts() RegisterSpellScript(spell_dru_ferocious_bite); RegisterSpellScript(spell_dru_forms_trinket); RegisterSpellScript(spell_dru_galactic_guardian); + RegisterSpellScript(spell_dru_glyph_of_stars); RegisterSpellScript(spell_dru_gore); RegisterSpellScript(spell_dru_incapacitating_roar); RegisterSpellScript(spell_dru_innervate); |
