mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-19 00:48:56 +01:00
Merge pull request #5389 from kandera/script_vessel
Core/Scripts: script despawn for dummy effect of muisek vessels
This commit is contained in:
@@ -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');
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user