Skip to content

Commit

Permalink
[Spell] s.7131 - npc 2638,4785,5097,6493,6932,11027,11263
Browse files Browse the repository at this point in the history
  • Loading branch information
AnonXS authored and killerwife committed Jan 10, 2024
1 parent f902705 commit 2ff85f7
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions sql/scriptdev2/spell.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
13 changes: 13 additions & 0 deletions src/game/AI/ScriptDevAI/scripts/world/spell_scripts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<Creature*>(caster)->ForcedDespawn(1000);
return SPELL_AURA_PROC_OK;
}
};

void AddSC_spell_scripts()
{
Script* pNewScript = new Script;
Expand Down Expand Up @@ -1218,4 +1230,5 @@ void AddSC_spell_scripts()
RegisterSpellScript<GameobjectCallForHelpOnUsage>("spell_gameobject_call_for_help_on_usage");
RegisterSpellScript<Submerged>("spell_submerged");
RegisterSpellScript<Stand>("spell_stand");
RegisterSpellScript<IllusionPassive>("spell_illusion_passive");
}

0 comments on commit 2ff85f7

Please sign in to comment.