Merge pull request #5389 from kandera/script_vessel

Core/Scripts: script despawn for dummy effect of muisek vessels
This commit is contained in:
QAston
2012-02-23 09:31:05 -08:00
2 changed files with 36 additions and 0 deletions

View File

@@ -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');

View File

@@ -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();
}