diff options
author | MartGon <gudo35@gmail.com> | 2017-05-14 11:05:05 +0200 |
---|---|---|
committer | joschiwald <joschiwald.trinity@gmail.com> | 2017-05-14 11:05:05 +0200 |
commit | 3e18fcb8fd4ac8e9700f10eb3b6a1292c0f8beb8 (patch) | |
tree | 24f5abbeafe78cae912a2843fab577f4146a2eea /src | |
parent | 8ea16ff9238f25f32609ac13330570f6114f8e37 (diff) |
Scripts/Spells: Aspect of the Cheetah (#19755)
Closes #19611
Diffstat (limited to 'src')
-rw-r--r-- | src/server/scripts/Spells/spell_hunter.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index c26b0b47a59..033f1f06dc3 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -33,6 +33,7 @@ enum HunterSpells { + SPELL_HUNTER_ASPECT_CHEETAH_SLOW = 186258, SPELL_HUNTER_BESTIAL_WRATH = 19574, SPELL_HUNTER_CHIMERA_SHOT_HEAL = 53353, SPELL_HUNTER_EXHILARATION = 109304, @@ -113,6 +114,42 @@ class spell_hun_ancient_hysteria : public SpellScriptLoader } }; +// 186257 - Aspect of the Cheetah +class spell_hun_aspect_cheetah : public SpellScriptLoader +{ + public: + spell_hun_aspect_cheetah() : SpellScriptLoader("spell_hun_aspect_cheetah") { } + + class spell_hun_aspect_cheetah_AuraScript : public AuraScript + { + PrepareAuraScript(spell_hun_aspect_cheetah_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + return ValidateSpellInfo + ({ + SPELL_HUNTER_ASPECT_CHEETAH_SLOW + }); + } + + void HandleOnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) + { + if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_EXPIRE) + GetTarget()->CastSpell(GetTarget(), SPELL_HUNTER_ASPECT_CHEETAH_SLOW, true); + } + + void Register() override + { + AfterEffectRemove += AuraEffectRemoveFn(spell_hun_aspect_cheetah_AuraScript::HandleOnRemove, EFFECT_0, SPELL_AURA_MOD_INCREASE_SPEED, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_hun_aspect_cheetah_AuraScript(); + } +}; + // 53209 - Chimera Shot class spell_hun_chimera_shot : public SpellScriptLoader { @@ -1017,6 +1054,7 @@ class spell_hun_tnt : public SpellScriptLoader void AddSC_hunter_spell_scripts() { new spell_hun_ancient_hysteria(); + new spell_hun_aspect_cheetah(); new spell_hun_chimera_shot(); new spell_hun_cobra_shot(); new spell_hun_disengage(); |