Scripts/SL: Update Grandmaster Vorpil (#27765)
Closes #23801 (cherry picked from commit a19c9660b4be0e7d1bf75e98f93d1bffe5c1566b)
This commit is contained in:
@@ -1276,6 +1276,7 @@ class spell_gen_despawn_aura : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
/// @todo: migrate spells to spell_gen_despawn_target, then remove this
|
||||
class spell_gen_despawn_self : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_despawn_self);
|
||||
@@ -1297,6 +1298,23 @@ class spell_gen_despawn_self : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
class spell_gen_despawn_target : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_despawn_target);
|
||||
|
||||
void HandleDespawn(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (GetEffectInfo().IsEffect(SPELL_EFFECT_DUMMY) || GetEffectInfo().IsEffect(SPELL_EFFECT_SCRIPT_EFFECT))
|
||||
if (Creature* target = GetHitCreature())
|
||||
target->DespawnOrUnsummon();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_despawn_target::HandleDespawn, EFFECT_ALL, SPELL_EFFECT_ANY);
|
||||
}
|
||||
};
|
||||
|
||||
enum DivineStormSpell
|
||||
{
|
||||
SPELL_DIVINE_STORM = 53385,
|
||||
@@ -4863,6 +4881,7 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_defend);
|
||||
RegisterSpellScript(spell_gen_despawn_aura);
|
||||
RegisterSpellScript(spell_gen_despawn_self);
|
||||
RegisterSpellScript(spell_gen_despawn_target);
|
||||
RegisterSpellScript(spell_gen_divine_storm_cd_reset);
|
||||
RegisterSpellScript(spell_gen_ds_flush_knockback);
|
||||
RegisterSpellScript(spell_gen_dungeon_credit);
|
||||
|
||||
Reference in New Issue
Block a user