diff options
-rw-r--r-- | sql/updates/world/2012_02_23_00_world_spell_script_names.sql | 7 | ||||
-rw-r--r-- | src/server/scripts/Spells/spell_item.cpp | 29 |
2 files changed, 36 insertions, 0 deletions
diff --git a/sql/updates/world/2012_02_23_00_world_spell_script_names.sql b/sql/updates/world/2012_02_23_00_world_spell_script_names.sql new file mode 100644 index 00000000000..6ea96033091 --- /dev/null +++ b/sql/updates/world/2012_02_23_00_world_spell_script_names.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_script_names` WHERE `spell_id` in (11885,11886,11887,11888,11889); +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(11885,'spell_item_muisek_vessel'), +(11886,'spell_item_muisek_vessel'), +(11887,'spell_item_muisek_vessel'), +(11888,'spell_item_muisek_vessel'), +(11889,'spell_item_muisek_vessel'); diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 416869d98ce..388ee8fd3cd 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1994,6 +1994,34 @@ class spell_item_refocus : public SpellScriptLoader } }; +class spell_item_muisek_vessel : public SpellScriptLoader +{ + public: + spell_item_muisek_vessel() : SpellScriptLoader("spell_item_muisek_vessel") { } + + class spell_item_muisek_vessel_SpellScript : public SpellScript + { + PrepareSpellScript(spell_item_muisek_vessel_SpellScript); + + void HandleDummy(SpellEffIndex /*effIndex*/) + { + if (Creature* target = GetHitCreature()) + if (target->isDead()) + target->ForcedDespawn(); + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_item_muisek_vessel_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_item_muisek_vessel_SpellScript(); + } +}; + void AddSC_item_spell_scripts() { // 23074 Arcanite Dragonling @@ -2045,4 +2073,5 @@ void AddSC_item_spell_scripts() new spell_item_unusual_compass(); new spell_item_uded(); new spell_item_chicken_cover(); + new spell_item_muisek_vessel(); } |