Core/Spells: Move draenor spell to generic spell (#28356)

This commit is contained in:
Aqua Deus
2022-10-11 14:12:00 +02:00
committed by GitHub
parent c7109629dc
commit b3c27656bc
3 changed files with 2 additions and 21 deletions

View File

@@ -0,0 +1 @@
UPDATE `spell_script_names` SET `ScriptName` = 'spell_gen_despawn_all_summons_owned_by_caster' WHERE `ScriptName` = 'spell_despawn_all_summons_garrison_intro_only';

View File

@@ -70,28 +70,7 @@ struct npc_baros_alexston : public ScriptedAI
}
};
// 160938 - Despawn All Summons (Garrison Intro Only)
class spell_despawn_all_summons_garrison_intro_only : public SpellScript
{
PrepareSpellScript(spell_despawn_all_summons_garrison_intro_only);
void HandleScript(SpellEffIndex /*effIndex*/)
{
if (Creature* hitCreature = GetHitCreature())
{
if (hitCreature->GetOwner() == GetCaster())
hitCreature->DespawnOrUnsummon();
}
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_despawn_all_summons_garrison_intro_only::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
void AddSC_draenor_shadowmoon_valley()
{
RegisterCreatureAI(npc_baros_alexston);
RegisterSpellScript(spell_despawn_all_summons_garrison_intro_only);
};

View File

@@ -5160,6 +5160,7 @@ class spell_gen_reverse_cast_target_to_caster_triggered: public SpellScript
// Note: this spell unsummons any creature owned by the caster. Set appropriate target conditions on the DB.
// 84065 - Despawn All Summons
// 83935 - Despawn All Summons
// 160938 - Despawn All Summons (Garrison Intro Only)
class spell_gen_despawn_all_summons_owned_by_caster : public SpellScript
{
PrepareSpellScript(spell_gen_despawn_all_summons_owned_by_caster);