diff options
author | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-01-11 23:36:23 +0100 |
---|---|---|
committer | Vincent_Michael <Vincent_Michael@gmx.de> | 2013-01-11 23:37:54 +0100 |
commit | 2fcd4c381c4b44082fd24afb6e6d11fc242636dc (patch) | |
tree | bb3aa031faa54b09adb461c69eb35885545ce507 | |
parent | b13e5694b6972ea523b44382788bff267f0f5dfa (diff) |
DB/Conditions: Convert shadowstep spell script in conditions
-rw-r--r-- | sql/updates/world/2013_01_11_01_world_conditions.sql | 5 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_rogue.cpp | 30 |
2 files changed, 5 insertions, 30 deletions
diff --git a/sql/updates/world/2013_01_11_01_world_conditions.sql b/sql/updates/world/2013_01_11_01_world_conditions.sql new file mode 100644 index 00000000000..352efb792b4 --- /dev/null +++ b/sql/updates/world/2013_01_11_01_world_conditions.sql @@ -0,0 +1,5 @@ +DELETE FROM `spell_script_names` WHERE `spell_id`=36554; + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=17 AND `SourceEntry`=36554; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(17, 0, 36554, 0, 0, 21, 0, 1024, 0, 0, 1, 103, 0, '', 'Shadowstep - not using Shadowstep while rooted'); diff --git a/src/server/scripts/Spells/spell_rogue.cpp b/src/server/scripts/Spells/spell_rogue.cpp index 01a4225cc00..1a2738afdbb 100644 --- a/src/server/scripts/Spells/spell_rogue.cpp +++ b/src/server/scripts/Spells/spell_rogue.cpp @@ -348,35 +348,6 @@ class spell_rog_prey_on_the_weak : public SpellScriptLoader } }; -// 36554 - Shadowstep -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(); - } -}; - // 5938 - Shiv class spell_rog_shiv : public SpellScriptLoader { @@ -425,6 +396,5 @@ void AddSC_rogue_spell_scripts() new spell_rog_nerves_of_steel(); new spell_rog_preparation(); new spell_rog_prey_on_the_weak(); - new spell_rog_shadowstep(); new spell_rog_shiv(); } |