diff options
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_rogue.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index 038f3239dbb..62a9e9f55d2 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -389,6 +389,34 @@ class spell_rog_deadly_poison : public SpellScriptLoader } }; +class spell_rog_shadowstep : public SpellScriptLoader +{ + public: + spell_rog_shadowstep() : SpellScriptLoader("spell_rog_shadowstep") { } + + class spell_rog_shadowstep_SpellScript : public SpellScript + { + PrepareSpellScript(spell_rog_shadowstep_SpellScript); + + SpellCastResult CheckCast() + { + if (GetCaster()->HasUnitState(UNIT_STATE_ROOT)) + return SPELL_FAILED_ROOTED; + return SPELL_CAST_OK; + } + + void Register() + { + OnCheckCast += SpellCheckCastFn(spell_rog_shadowstep_SpellScript::CheckCast); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_rog_shadowstep_SpellScript(); + } +}; + void AddSC_rogue_spell_scripts() { new spell_rog_cheat_death(); @@ -397,4 +425,5 @@ void AddSC_rogue_spell_scripts() new spell_rog_prey_on_the_weak(); new spell_rog_shiv(); new spell_rog_deadly_poison(); + new spell_rog_shadowstep(); } |
