diff --git a/sql/scriptdev2/spell.sql b/sql/scriptdev2/spell.sql index 65f57f9214..99c0ea5d9a 100644 --- a/sql/scriptdev2/spell.sql +++ b/sql/scriptdev2/spell.sql @@ -28,6 +28,7 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (5166,'spell_harvest_silithid_egg'), (6467,'spell_unarmed_woodcutter'), (7054,'spell_forsaken_skill'), +(7131,'spell_illusion_passive'), (8555,'spell_left_for_dead'), (8603,'spell_tribal_death'), (8655,'spell_tribal_death'), diff --git a/src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp b/src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp index 5489976d42..0dfdf227d8 100644 --- a/src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp +++ b/src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp @@ -1163,6 +1163,18 @@ struct Stand : public SpellScript } }; +// s.7131 - npc 2638,4785,5097,6493,6932,11027,11263 - might be different delay per npc! +struct IllusionPassive : public AuraScript +{ + SpellAuraProcResult OnProc(Aura* aura, ProcExecutionData& /*procData*/) const override + { + if (Unit* caster = aura->GetCaster()) + if (caster->IsCreature()) + static_cast(caster)->ForcedDespawn(1000); + return SPELL_AURA_PROC_OK; + } +}; + void AddSC_spell_scripts() { Script* pNewScript = new Script; @@ -1218,4 +1230,5 @@ void AddSC_spell_scripts() RegisterSpellScript("spell_gameobject_call_for_help_on_usage"); RegisterSpellScript("spell_submerged"); RegisterSpellScript("spell_stand"); + RegisterSpellScript("spell_illusion_passive"); }