feat: Converts player deletion handling to a generated event (#2029)
This commit is contained in:
parent
059f008b48
commit
2bff1d2cbc
15 changed files with 32 additions and 17 deletions
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ModernUO.CodeGeneratedEvents;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Engines.Quests.Necro;
|
||||
using Server.Items;
|
||||
|
|
@ -194,6 +195,7 @@ public class AnimateDeadSpell : NecromancerSpell, ITargetingSpell<Item>
|
|||
Caster.SendLocalizedMessage(1061083); // Animate what corpse?
|
||||
}
|
||||
|
||||
[OnEvent(nameof(PlayerMobile.PlayerDeletedEvent))]
|
||||
public static void RemoveEffects(Mobile caster)
|
||||
{
|
||||
if (_table.Remove(caster, out var list))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ModernUO.CodeGeneratedEvents;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
|
@ -38,6 +39,7 @@ public class SummonFamiliarSpell : NecromancerSpell
|
|||
new(typeof(VampireBatFamiliar), 1060144, 100.0, 100.0) // Vampire Bat
|
||||
};
|
||||
|
||||
[OnEvent(nameof(PlayerMobile.PlayerDeletedEvent))]
|
||||
public static void RemoveEffects(Mobile m)
|
||||
{
|
||||
if (Table.Remove(m, out var summon))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue