diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 27f3cdece..fafeb286a 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -410,6 +410,26 @@ class spell_dru_dash : public SpellScript } }; +// -1850 - Dash +class spell_dru_dash_aura : public AuraScript +{ + PrepareAuraScript(spell_dru_dash_aura); + + void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& /*canBeRecalculated*/) + { + // do not set speed if not in cat form + if (GetUnitOwner()->GetShapeshiftForm() != FORM_CAT) + { + amount = 0; + } + } + + void Register() override + { + DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_dru_dash_aura::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_INCREASE_SPEED); + } +}; + // 5229 - Enrage class spell_dru_enrage : public AuraScript { @@ -1185,7 +1205,7 @@ void AddSC_druid_spell_scripts() RegisterSpellScript(spell_dru_barkskin); RegisterSpellScript(spell_dru_treant_scaling); RegisterSpellScript(spell_dru_berserk); - RegisterSpellScript(spell_dru_dash); + RegisterSpellAndAuraScriptPair(spell_dru_dash, spell_dru_dash_aura); RegisterSpellScript(spell_dru_enrage); RegisterSpellScript(spell_dru_glyph_of_starfire); RegisterSpellScript(spell_dru_idol_lifebloom);