mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Core/Spells: Move draenor spell to generic spell (#28356)
This commit is contained in:
1
sql/updates/world/master/2022_10_11_01_world.sql
Normal file
1
sql/updates/world/master/2022_10_11_01_world.sql
Normal 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';
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user