ModernUO/Projects/UOContent/Spells/UnsummonTimer.cs
Kamron Batman fb915992dd
fix(core): Adds Hashed & Hierarchical Timer Wheel (#655)
- Removes TimerPriority
- Removes TimerThread
- Adds a [Hashed & Hierarchical Timer Wheel](http://www.cs.columbia.edu/~nahum/w6998/papers/ton97-timing-wheels.pdf)
2021-07-11 22:42:06 -07:00

25 lines
549 B
C#

using System;
using Server.Mobiles;
namespace Server.Spells
{
internal class UnsummonTimer : Timer
{
private readonly BaseCreature m_Creature;
private Mobile m_Caster;
public UnsummonTimer(Mobile caster, BaseCreature creature, TimeSpan delay) : base(delay)
{
m_Caster = caster;
m_Creature = creature;
}
protected override void OnTick()
{
if (!m_Creature.Deleted)
{
m_Creature.Delete();
}
}
}
}