diff options
| author | Nay <dnpd.dd@gmail.com> | 2012-08-09 11:40:26 -0700 |
|---|---|---|
| committer | Nay <dnpd.dd@gmail.com> | 2012-08-09 11:40:26 -0700 |
| commit | 081acfde534e924bf280493ea9188c5c12024b42 (patch) | |
| tree | 71a7bca381820b748ce44db0a829ecb69947a012 /src | |
| parent | ca0a54f3572e91f75f880ff9b8e74c450f7d9c36 (diff) | |
| parent | 68bfe8c831c107ccdd43475ed2a89b7848b6ab32 (diff) | |
Merge pull request #6520 from Vincent-Michael/shadowstep
Core/Spell: Fix not using Shadowstep while rooted
Diffstat (limited to 'src')
| -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 bb0fd1e73ab..ad437c5e431 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -386,6 +386,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(); @@ -394,4 +422,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(); } |
