aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <qaston@gmail.com>2012-02-23 09:31:05 -0800
committerQAston <qaston@gmail.com>2012-02-23 09:31:05 -0800
commit537bec239ba176d16eed5ca215f205f298aae5fb (patch)
tree50e48e79c0e1d8c010c6d1aeabd8bfd9016fce5e /src
parent8ae3037307c9ca2ebc17fae286f59b51bc4b1c79 (diff)
parentc27a0333ceaeeb9c499f54670cbc40d4ce8cd9c5 (diff)
Merge pull request #5389 from kandera/script_vessel
Core/Scripts: script despawn for dummy effect of muisek vessels
Diffstat (limited to 'src')
-rw-r--r--src/server/scripts/Spells/spell_item.cpp29
1 files changed, 29 insertions, 0 deletions
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();
}