diff options
-rw-r--r-- | sql/updates/world/3.3.5/2016_12_15_00_world.sql | 3 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_generic.cpp | 43 |
2 files changed, 46 insertions, 0 deletions
diff --git a/sql/updates/world/3.3.5/2016_12_15_00_world.sql b/sql/updates/world/3.3.5/2016_12_15_00_world.sql new file mode 100644 index 00000000000..5b749f075a3 --- /dev/null +++ b/sql/updates/world/3.3.5/2016_12_15_00_world.sql @@ -0,0 +1,3 @@ +DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_gen_paralytic_poison'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(35201, 'spell_gen_paralytic_poison'); diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp index ed80247597d..6c534b8f1e5 100644 --- a/src/server/scripts/Spells/spell_generic.cpp +++ b/src/server/scripts/Spells/spell_generic.cpp @@ -2728,6 +2728,48 @@ class spell_gen_orc_disguise : public SpellScriptLoader } }; +enum ParalyticPoison +{ + SPELL_PARALYSIS = 35202 +}; + +// 35201 - Paralytic Poison +class spell_gen_paralytic_poison : public SpellScriptLoader +{ + public: + spell_gen_paralytic_poison() : SpellScriptLoader("spell_gen_paralytic_poison") { } + + class spell_gen_paralytic_poison_AuraScript : public AuraScript + { + PrepareAuraScript(spell_gen_paralytic_poison_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) override + { + if (!sSpellMgr->GetSpellInfo(SPELL_PARALYSIS)) + return false; + return true; + } + + void HandleStun(AuraEffect const* aurEff, AuraEffectHandleModes /*mode*/) + { + if (GetTargetApplication()->GetRemoveMode() != AURA_REMOVE_BY_EXPIRE) + return; + + GetTarget()->CastSpell((Unit*)nullptr, SPELL_PARALYSIS, true, nullptr, aurEff); + } + + void Register() override + { + AfterEffectRemove += AuraEffectRemoveFn(spell_gen_paralytic_poison_AuraScript::HandleStun, EFFECT_0, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAL); + } + }; + + AuraScript* GetAuraScript() const override + { + return new spell_gen_paralytic_poison_AuraScript(); + } +}; + class spell_gen_proc_below_pct_damaged : public SpellScriptLoader { public: @@ -4410,6 +4452,7 @@ void AddSC_generic_spell_scripts() new spell_gen_on_tournament_mount(); new spell_gen_oracle_wolvar_reputation(); new spell_gen_orc_disguise(); + new spell_gen_paralytic_poison(); new spell_gen_proc_below_pct_damaged("spell_item_soul_harvesters_charm"); new spell_gen_proc_below_pct_damaged("spell_item_commendation_of_kaelthas"); new spell_gen_proc_below_pct_damaged("spell_item_corpse_tongue_coin"); |