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)
This commit is contained in:
Kamron Batman 2021-07-11 22:42:06 -07:00 • committed by GitHub
parent b99d520019
commit fb915992dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
138 changed files with 468 additions and 802 deletions

View file

@ -1203,8 +1203,6 @@ namespace Server.Accounting
: base(TimeSpan.FromMinutes(1.0), TimeSpan.FromMinutes(1.0))
{
m_Account = account;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -61,7 +61,6 @@ namespace Server.Engines.CannedEvil
public CannedEvilTimer() : base(TimeSpan.Zero, TimeSpan.FromMinutes(1.0))
{
Priority = TimerPriority.OneMinute;
_sliceTime = Core.Now;
}

View file

@ -798,7 +798,6 @@ namespace Server.Engines.ConPVP
{
m_Bomb = bomb;
m_Count = 0;
Priority = TimerPriority.FiftyMS;
}
protected override void OnTick()

View file

@ -211,8 +211,6 @@ namespace Server.Engines.ConPVP
m_Hill = hill;
Captures = 0;
m_Counter = 0;
Priority = TimerPriority.FiftyMS;
}
public int Captures { get; private set; }

View file

@ -271,7 +271,6 @@ namespace Server.Menus.Questions
TimeSpan.FromSeconds(1.0)
)
{
Priority = TimerPriority.TwoFiftyMS;
m_Mobile = mobile;
m_Destination = destination;

View file

@ -123,8 +123,6 @@ namespace Server.Items
m_Item = item;
m_CloseTime = Core.Now + item.CloseDelay;
m_Up = true;
Priority = TimerPriority.TenMS;
}
protected override void OnTick()
@ -154,7 +152,9 @@ namespace Server.Items
m_Step = 0;
var delay = m_CloseTime - Core.Now;
DelayCall(delay > TimeSpan.Zero ? delay : TimeSpan.Zero, Start);
static void start(Timer timer) => timer.Start();
DelayCall(delay, start, this);
return;
}

View file

@ -131,8 +131,6 @@ namespace Server.Items
public ResetTimer(RaiseSwitch raiseSwitch, TimeSpan delay) : base(delay)
{
m_RaiseSwitch = raiseSwitch;
Priority = ComputePriority(delay);
}
protected override void OnTick()

View file

@ -156,7 +156,6 @@ namespace Server.Items
public EndActionTimer(Mobile from) : base(TimeSpan.FromMinutes(3.0))
{
m_From = from;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()
@ -289,8 +288,6 @@ namespace Server.Items
Location = location;
Map = map;
From = from;
Priority = TimerPriority.TwoFiftyMS;
}
public Point3D Location { get; }
@ -806,7 +803,6 @@ namespace Server.Items
public InternalTimer(GreenThornsSHTeleporter teleporter) : base(TimeSpan.FromMinutes(1.0))
{
m_Teleporter = teleporter;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -111,7 +111,6 @@ namespace Server.Engines.Quests.Necro
public CallingTimer(PlayerMobile player) : base(TimeSpan.Zero, TimeSpan.FromSeconds(1.0), 6)
{
Priority = TimerPriority.TwentyFiveMS;
m_Player = player;
m_Step = 0;

View file

@ -172,7 +172,6 @@ namespace Server.Engines.Quests.Necro
public SummonTimer(PlayerMobile player) : base(TimeSpan.FromSeconds(4.0))
{
Priority = TimerPriority.FiftyMS;
m_Player = player;
}

View file

@ -57,7 +57,6 @@ namespace Server.Items
public ShowStew(AddonComponent ac) : base(TimeSpan.FromSeconds(30))
{
stew = ac;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -188,7 +188,7 @@ namespace Server.Engines.Spawners
[CommandProperty(AccessLevel.Developer)]
public TimeSpan NextSpawn
{
get => m_Running && m_Timer?.Running == true ? End - Core.Now : TimeSpan.FromSeconds(0);
get => m_Running && m_Timer?.Running == true ? End - Core.Now : TimeSpan.Zero;
set
{
Start();
@ -1003,12 +1003,7 @@ namespace Server.Engines.Spawners
m_HomeRange = reader.ReadInt();
m_Running = reader.ReadBool();
var ts = TimeSpan.Zero;
if (m_Running)
{
ts = reader.ReadDeltaTime() - Core.Now;
}
var ts = m_Running ? reader.ReadDeltaTime() - Core.Now : TimeSpan.Zero;
if (version < 7)
{
@ -1083,12 +1078,7 @@ namespace Server.Engines.Spawners
{
private readonly BaseSpawner m_Spawner;
public InternalTimer(BaseSpawner spawner, TimeSpan delay) : base(delay)
{
Priority = spawner.IsFull ? TimerPriority.FiveSeconds : TimerPriority.OneSecond;
m_Spawner = spawner;
}
public InternalTimer(BaseSpawner spawner, TimeSpan delay) : base(delay) => m_Spawner = spawner;
protected override void OnTick()
{

View file

@ -101,7 +101,6 @@ namespace Server.Items
m_Callback = callback;
m_From = from;
m_Hue = hue;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -103,7 +103,6 @@ namespace Server.Items
m_Callback = callback;
m_From = from;
m_Hue = hue;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -142,7 +142,6 @@ namespace Server.Items
public InternalTimer(PickpocketDip dip) : base(TimeSpan.FromSeconds(3.0))
{
m_Dip = dip;
Priority = TimerPriority.FiftyMS;
}
protected override void OnTick()

View file

@ -111,7 +111,6 @@ namespace Server.Items
m_Callback = callback;
m_From = from;
m_Hue = hue;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -103,7 +103,6 @@ namespace Server.Items
m_Callback = callback;
m_From = from;
m_Hue = hue;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -144,7 +144,6 @@ namespace Server.Items
public InternalTimer(TrainingDummy dummy) : base(TimeSpan.FromSeconds(0.25), TimeSpan.FromSeconds(2.75))
{
m_Dummy = dummy;
Priority = TimerPriority.FiftyMS;
}
protected override void OnTick()

View file

@ -201,7 +201,6 @@ namespace Server.Items
public InternalTimer(DeathRobe c, TimeSpan delay) : base(delay)
{
m_Robe = c;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -563,7 +563,6 @@ namespace Server.Items
public InternalTimer(BaseDoor door) : base(TimeSpan.FromSeconds(20.0), TimeSpan.FromSeconds(10.0))
{
Priority = TimerPriority.OneSecond;
m_Door = door;
}

View file

@ -203,7 +203,6 @@ namespace Server.Items
)
{
m_Chest = chest;
Priority = TimerPriority.OneMinute;
}
protected override void OnTick()

View file

@ -369,7 +369,6 @@ namespace Server.Items
public FurnitureTimer(Container c, Mobile m) : base(TimeSpan.FromSeconds(0.5), TimeSpan.FromSeconds(0.5))
{
Priority = TimerPriority.TwoFiftyMS;
m_Container = c;
m_Mobile = m;

View file

@ -588,7 +588,6 @@ namespace Server.Items
public DeleteTimer(Item item, DateTime time) : base(time - Core.Now)
{
m_Item = item;
Priority = TimerPriority.OneMinute;
}
protected override void OnTick()

View file

@ -355,8 +355,6 @@ namespace Server.Items
public OfferExpireTimer(VendorRentalContract contract) : base(TimeSpan.FromSeconds(30.0))
{
m_Contract = contract;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -1186,8 +1186,6 @@ namespace Server.Items
: base(TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(5.0))
{
m_Drunk = drunk;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -220,7 +220,6 @@ namespace Server.Items
public InternalTimer(BaseLight light, TimeSpan delay) : base(delay)
{
m_Light = light;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -791,8 +791,6 @@ namespace Server.Items
m_NextSpellTime = from.NextSpellTime;
m_NextActionTime = from.NextActionTime;
m_LastMoveTime = from.LastMoveTime;
Priority = TimerPriority.TenMS;
}
private void Terminate()
@ -932,8 +930,6 @@ namespace Server.Items
{
m_From = from;
m_SoundID = soundID;
Priority = TimerPriority.TenMS;
}
protected override void OnTick()

View file

@ -42,7 +42,6 @@ namespace Server.Items
public InternalTimer(Item blood) : base(TimeSpan.FromSeconds(5.0))
{
Priority = TimerPriority.OneSecond;
m_Blood = blood;
}

View file

@ -1226,7 +1226,6 @@ namespace Server.Items
public InternalTimer(Corpse c, TimeSpan delay) : base(delay)
{
m_Corpse = c;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -100,7 +100,6 @@ namespace Server.Items
public InternalTimer(DecayedCorpse c, TimeSpan delay) : base(delay)
{
m_Corpse = c;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -78,7 +78,6 @@ namespace Server.Items
public FreeTimer(EffectItem item, TimeSpan delay) : base(delay)
{
m_Item = item;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -79,7 +79,6 @@ namespace Server.Items
public InternalTimer(Item item) : base(TimeSpan.FromSeconds(30.0))
{
m_Item = item;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -550,8 +550,6 @@ namespace Server.Items
m_Panel = panel;
m_To = to;
m_Step = 0;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -148,7 +148,6 @@ namespace Server.Items
public EmptyTimer(TrashBarrel barrel) : base(TimeSpan.FromMinutes(3.0))
{
m_Barrel = barrel;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -83,7 +83,6 @@ namespace Server.Items
public SpawnTimer(Item item) : base(TimeSpan.FromSeconds(Utility.RandomMinMax(5, 10)))
{
Priority = TimerPriority.FiftyMS;
m_Item = item;
}

View file

@ -281,8 +281,6 @@ namespace Server.Items
{
m_Item = item;
m_End = end;
Priority = TimerPriority.FiftyMS;
}
protected override void OnTick()

View file

@ -566,7 +566,6 @@ namespace Server.Items
public InternalTimer(BandageContext context, TimeSpan delay) : base(delay)
{
m_Context = context;
Priority = TimerPriority.FiftyMS;
}
protected override void OnTick()

View file

@ -609,7 +609,6 @@ namespace Server.Items
public InternalTimer(Mobile from) : base(TimeSpan.FromSeconds(6.0))
{
m_From = from;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -337,7 +337,6 @@ namespace Server.Items
public InternalTimer(Mobile m, TimeSpan delay) : base(delay)
{
m_Player = m;
Priority = TimerPriority.OneMinute;
}
protected override void OnTick()

View file

@ -100,7 +100,6 @@ namespace Server.Items
m_From = from;
m_Item = item;
m_Lockpick = lockpick;
Priority = TimerPriority.TwoFiftyMS;
}
protected void BrokeLockPickTest()

View file

@ -145,8 +145,6 @@ namespace Server.Items
)
{
m_Component = c;
Priority = TimerPriority.OneMinute;
}
protected override void OnTick()

View file

@ -145,8 +145,6 @@ namespace Server.Items
public SpawnTimer(RoseOfTrinsic rose, TimeSpan delay) : base(delay)
{
m_Rose = rose;
Priority = TimerPriority.OneMinute;
}
protected override void OnTick()

View file

@ -67,7 +67,6 @@ namespace Server.Items
: base(TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(30))
{
Eater = eater;
Priority = TimerPriority.FiveSeconds;
Start();
}

View file

@ -115,7 +115,6 @@ namespace Server.Items
{
m_From = from;
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -80,7 +80,6 @@ namespace Server.Items
{
m_Bonus = bonus;
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -60,7 +60,6 @@ namespace Server.Items
{
m_Owner = owner;
BonusSwingSpeed = bonusSwingSpeed;
Priority = TimerPriority.FiftyMS;
}
public int BonusSwingSpeed { get; }

View file

@ -65,7 +65,6 @@ namespace Server.Items
{
m_Defender = defender;
SwingSpeedReduction = swingSpeedReduction;
Priority = TimerPriority.FiftyMS;
}
public int SwingSpeedReduction { get; }

View file

@ -110,8 +110,6 @@ namespace Server.Items
m_DamageRemaining = totalDamage;
DamagePerTick = (double)totalDamage / 12 + 0.01;
Priority = TimerPriority.TwentyFiveMS;
}
protected override void OnTick()

View file

@ -65,7 +65,6 @@ namespace Server.Items
{
m_Defender = defender;
m_DamageRemaining = totalDamage;
Priority = TimerPriority.TwentyFiveMS;
DamagePerTick = (double)totalDamage / 12 + .01;
}

View file

@ -446,8 +446,6 @@ namespace Server.Items
public WeaponAbilityTimer(Mobile from) : base(TimeSpan.FromSeconds(3.0))
{
m_Mobile = from;
Priority = TimerPriority.TwentyFiveMS;
}
protected override void OnTick()

View file

@ -294,8 +294,6 @@ namespace Server.Items
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
m_Mobile.BeginAction<Fists>();
}

View file

@ -62,7 +62,6 @@ namespace Server.Items
public AttackTimer(Mobile player) : base(AttackEffectDuration)
{
m_Player = player;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()
@ -78,7 +77,6 @@ namespace Server.Items
public DefenseTimer(Mobile player) : base(DefenseEffectDuration)
{
m_Player = player;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -4,7 +4,28 @@ namespace Server.Misc
{
public class AutoRestart : Timer
{
public static bool Enabled; // is the script enabled?
private static Timer _autoRestart;
private static bool _enabled;
public static bool Enabled
{
get => _enabled;
set
{
if (value)
{
_enabled = true;
_autoRestart ??= new AutoRestart();
_autoRestart.Start();
}
else
{
_enabled = false;
_autoRestart?.Stop();
_autoRestart = null;
}
}
}
private static readonly TimeSpan RestartTime = TimeSpan.FromHours(2.0); // time of day at which to restart
@ -19,7 +40,6 @@ namespace Server.Misc
public AutoRestart() : base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
{
Priority = TimerPriority.FiveSeconds;
m_RestartTime = DateTime.UtcNow.Date + RestartTime;
@ -31,10 +51,14 @@ namespace Server.Misc
public static bool Restarting { get; private set; }
public static void Configure()
{
Enabled = ServerConfiguration.GetOrUpdateSetting("world.enableAutoRestart", false);
}
public static void Initialize()
{
CommandSystem.Register("Restart", AccessLevel.Administrator, Restart_OnCommand);
new AutoRestart().Start();
}
public static void Restart_OnCommand(CommandEventArgs e)

View file

@ -12,7 +12,9 @@ namespace Server.Misc
public static TimeSpan Warning { get; private set; }
public static string BackupPath { get; private set; }
public AutoSave() : base(Delay - Warning, Delay) => Priority = TimerPriority.OneMinute;
public AutoSave() : base(Delay - Warning, Delay)
{
}
public static bool SavesEnabled { get; set; } = true;

View file

@ -5,8 +5,9 @@ namespace Server.Misc
{
public class FoodDecayTimer : Timer
{
public FoodDecayTimer() : base(TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5)) =>
Priority = TimerPriority.OneMinute;
public FoodDecayTimer() : base(TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5))
{
}
public static void Initialize()
{

View file

@ -546,8 +546,9 @@ namespace Server.Guilds
public class WarTimer : Timer
{
public WarTimer() : base(TimeSpan.FromMinutes(1.0), TimeSpan.FromMinutes(1.0)) =>
Priority = TimerPriority.FiveSeconds;
public WarTimer() : base(TimeSpan.FromMinutes(1.0), TimeSpan.FromMinutes(1.0))
{
}
public static void Initialize()
{

View file

@ -92,8 +92,9 @@ namespace Server
private class LightCycleTimer : Timer
{
public LightCycleTimer() : base(TimeSpan.FromSeconds(0), TimeSpan.FromSeconds(5.0)) =>
Priority = TimerPriority.FiveSeconds;
public LightCycleTimer() : base(TimeSpan.FromSeconds(0), TimeSpan.FromSeconds(5.0))
{
}
protected override void OnTick()
{
@ -111,7 +112,6 @@ namespace Server
public NightSightTimer(Mobile owner) : base(TimeSpan.FromMinutes(Utility.Random(15, 25)))
{
m_Owner = owner;
Priority = TimerPriority.OneMinute;
}
protected override void OnTick()

View file

@ -19,9 +19,9 @@ namespace Server.Misc
private static readonly object _StatusLock = new();
public StatusPage()
: base(TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(60.0)) =>
Priority = TimerPriority.FiveSeconds;
public StatusPage() : base(TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(60.0))
{
}
public static void Initialize()
{

View file

@ -3022,8 +3022,6 @@ namespace Server.Mobiles
m_Owner = owner;
m_Owner.m_NextDetectHidden = Core.TickCount;
Priority = TimerPriority.FiftyMS;
}
protected override void OnTick()

View file

@ -262,7 +262,6 @@ namespace Server.Mobiles
{
m_Mobile = m;
m_Mod = mod;
Priority = TimerPriority.TwoFiftyMS;
}
public void DoExpire()

View file

@ -73,14 +73,14 @@ namespace Server.Mobiles
var rand = Utility.Random(527);
/*
500 527 No Hue Color 94.88% 0
10 527 Green 1.90% 0x8295
10 527 Green 1.90% 0x8163 (Very Close to Above Green) //this one is an approximation
5 527 Dark Green 0.95% 0x87D4
1 527 Valorite 0.19% 0x88AB
1 527 Midnight Blue 0.19% 0x8258
* */
if (rand <= 0)
@ -264,7 +264,6 @@ namespace Server.Mobiles
{
m_Mobile = m;
m_Mod = mod;
Priority = TimerPriority.TwoFiftyMS;
}
public void DoExpire()

View file

@ -5599,7 +5599,6 @@ namespace Server.Mobiles
public DeleteTimer(Mobile creature, TimeSpan delay) : base(delay)
{
m = creature;
Priority = TimerPriority.OneMinute;
}
protected override void OnTick()
@ -5618,7 +5617,6 @@ namespace Server.Mobiles
public LoyaltyTimer() : base(InternalDelay, InternalDelay)
{
m_NextHourlyCheck = Core.Now + TimeSpan.FromHours(1.0);
Priority = TimerPriority.FiveSeconds;
}
public static void Initialize()

View file

@ -155,7 +155,6 @@ namespace Server.Mobiles
{
m_Mobile = m;
m_From = from;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -105,7 +105,6 @@ namespace Server.Mobiles
public UnhideTimer(ShadowFiend owner) : base(TimeSpan.FromSeconds(30.0))
{
m_Owner = owner;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -53,10 +53,10 @@ namespace Server.Mobiles
public override void OnDeath( Container c )
{
base.OnDeath( c );
if (Utility.RandomDouble() < 0.15)
c.DropItem( new DisintegratingThesisNotes() );
if (Utility.RandomDouble() < 0.1)
c.DropItem( new ParrotItem() );
}
@ -120,7 +120,6 @@ namespace Server.Mobiles
{
m_Mobile = m;
m_Mod = mod;
Priority = TimerPriority.TwoFiftyMS;
}
public void DoExpire()

View file

@ -79,14 +79,13 @@ namespace Server.Mobiles
private Mobile m_From;
private Mobile m_Mobile;
private int m_Count;
public InternalTimer( Mobile from, Mobile m ) : base( TimeSpan.FromSeconds( 1.0 ), TimeSpan.FromSeconds( 1.0 ) )
{
m_From = from;
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
}*/
}
}

View file

@ -47,7 +47,7 @@ namespace Server.Mobiles
public override void OnDeath( Container c )
{
base.OnDeath( c );
if (Utility.RandomDouble() < 0.025)
{
switch ( Utility.Random( 18 ) )
@ -72,7 +72,7 @@ namespace Server.Mobiles
case 17: c.DropItem( new GreymistGloves() ); break;
}
}
if (Utility.RandomDouble() < 0.1)
c.DropItem( new ParrotItem() );
}
@ -153,7 +153,6 @@ namespace Server.Mobiles
{
m_Mobile = m;
m_Mod = mod;
Priority = TimerPriority.TwoFiftyMS;
}
public void DoExpire()

View file

@ -102,7 +102,6 @@ namespace Server.Mobiles
{
m_Mobile = m;
m_From = from;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -242,7 +242,6 @@ namespace Server.Mobiles
{
m_Mobile = m;
m_From = from;
Priority = TimerPriority.TwoFiftyMS;
}
public void DoExpire()

View file

@ -175,7 +175,6 @@ namespace Server.Mobiles
{
m_Mobile = m;
m_Mod = mod;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -189,7 +189,6 @@ namespace Server.Mobiles
{
m_From = from;
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -157,7 +157,6 @@ namespace Server.Mobiles
m_Mobile = m;
m_Mod = mod;
m_Table = table;
Priority = TimerPriority.TwoFiftyMS;
}
public void DoExpire()

View file

@ -131,7 +131,6 @@ namespace Server.Mobiles
{
m_Mobile = m;
m_From = from;
Priority = TimerPriority.TwoFiftyMS;
}
public void DoExpire()

View file

@ -107,7 +107,6 @@ namespace Server.Mobiles
public ExpireTimer(Mobile m, TimeSpan delay) : base(delay)
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
public void DoExpire()

View file

@ -248,7 +248,6 @@ namespace Server.Mobiles
{
m_Mobile = m;
m_Mods = mods;
Priority = TimerPriority.TwoFiftyMS;
}
public void DoExpire()

View file

@ -146,7 +146,6 @@ namespace Server.Mobiles
{
m_Mobile = m;
m_From = from;
Priority = TimerPriority.TwoFiftyMS;
}
public void DoExpire()

View file

@ -236,8 +236,6 @@ namespace Server.Mobiles
public ExpirePolymorphTimer(Mobile owner) : base(TimeSpan.FromMinutes(3.0))
{
m_Owner = owner;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -151,7 +151,6 @@ namespace Server.Mobiles
public AutokillTimer(Dummy owner) : base(TimeSpan.FromMinutes(5.0))
{
m_Owner = owner;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -546,7 +546,6 @@ namespace Server.Mobiles
public TeleportTimer(Mobile owner) : base(TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(5.0))
{
Priority = TimerPriority.TwoFiftyMS;
m_Owner = owner;
}
@ -643,7 +642,6 @@ namespace Server.Mobiles
public GoodiesTimer(Map map, int x, int y) : base(TimeSpan.FromSeconds(Utility.RandomDouble() * 10.0))
{
Priority = TimerPriority.TwoFiftyMS;
m_Map = map;
m_X = x;

View file

@ -132,7 +132,6 @@ namespace Server.Mobiles
public DrainTimer(HarrowerTentacles owner) : base(TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(5.0))
{
m_Owner = owner;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -236,7 +236,6 @@ namespace Server.Mobiles
public ParagonStamRegen(Mobile m)
: base(FastRegenRate, FastRegenRate)
{
Priority = TimerPriority.FiftyMS;
m_Owner = m as BaseCreature;
}

View file

@ -708,8 +708,6 @@ namespace Server.Mobiles
: base(delay)
{
m_Mobile = m;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -1352,8 +1352,6 @@ namespace Server.Mobiles
public PayTimer(PlayerVendor vendor, TimeSpan delay) : base(delay, GetInterval())
{
m_Vendor = vendor;
Priority = TimerPriority.OneMinute;
}
public static TimeSpan GetInterval()
@ -1706,8 +1704,6 @@ namespace Server.Mobiles
public ExpireTimer(PlayerVendorPlaceholder placeholder) : base(TimeSpan.FromMinutes(2.0))
{
m_Placeholder = placeholder;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -365,8 +365,6 @@ namespace Server.Mobiles
public RentalExpireTimer(RentedVendor vendor, TimeSpan delay) : base(delay, vendor.RentalDuration.Duration)
{
m_Vendor = vendor;
Priority = TimerPriority.OneMinute;
}
protected override void OnTick()

View file

@ -108,8 +108,6 @@ namespace Server.Mobiles
public ExpireTimer(VendorInventory inventory, TimeSpan delay) : base(delay)
{
m_Inventory = inventory;
Priority = TimerPriority.OneMinute;
}
protected override void OnTick()

View file

@ -2057,8 +2057,6 @@ namespace Server.Multis
public DecayTimer(BaseBoat boat) : base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(5.0))
{
m_Boat = boat;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()
@ -2086,7 +2084,6 @@ namespace Server.Multis
public MoveTimer(BaseBoat boat, TimeSpan interval, bool single) : base(interval, interval, single ? 1 : 0)
{
m_Boat = boat;
Priority = TimerPriority.TwentyFiveMS;
}
protected override void OnTick()

View file

@ -346,7 +346,6 @@ namespace Server.Items
public CloseTimer(Plank plank) : base(TimeSpan.FromSeconds(5.0), TimeSpan.FromSeconds(5.0))
{
m_Plank = plank;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -273,8 +273,6 @@ namespace Server.Multis
public InternalizeTimer(MovingCrate crate) : base(TimeSpan.FromMinutes(5.0))
{
m_Crate = crate;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -136,7 +136,6 @@ namespace Server.Multis
public DecayTimer(Item item) : base(TimeSpan.FromSeconds(20.0))
{
m_Item = item;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()

View file

@ -369,7 +369,6 @@ namespace Server.Regions
public GuardTimer(Mobile m, Dictionary<Mobile, GuardTimer> table) : base(TimeSpan.FromSeconds(15.0))
{
Priority = TimerPriority.TwoFiftyMS;
m_Mobile = m;
m_Table = table;

View file

@ -323,7 +323,6 @@ namespace Server.SkillHandlers
m_MaxCount = count;
m_Paralyzed = creature.Paralyzed;
m_StartTime = Core.Now;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -106,7 +106,6 @@ namespace Server.SkillHandlers
{
m_From = from;
m_Target = target;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -117,7 +117,6 @@ namespace Server.SkillHandlers
m_Poison = potion.Poison;
m_MinSkill = potion.MinPoisoningSkill;
m_MaxSkill = potion.MaxPoisoningSkill;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -67,7 +67,6 @@ namespace Server.SkillHandlers
public SpiritSpeakTimer(Mobile m) : base(TimeSpan.FromMinutes(2.0))
{
m_Owner = m;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()

View file

@ -329,8 +329,6 @@ namespace Server.Spells
public SpecialMoveTimer(Mobile from) : base(TimeSpan.FromSeconds(3.0))
{
m_Mobile = from;
Priority = TimerPriority.TwentyFiveMS;
}
protected override void OnTick()

View file

@ -860,8 +860,6 @@ namespace Server.Spells
public AnimTimer(Spell spell, int count) : base(TimeSpan.Zero, AnimateDelay, count)
{
m_Spell = spell;
Priority = TimerPriority.FiftyMS;
}
protected override void OnTick()
@ -898,8 +896,6 @@ namespace Server.Spells
public CastTimer(Spell spell, TimeSpan castDelay) : base(castDelay)
{
m_Spell = spell;
Priority = TimerPriority.TwentyFiveMS;
}
protected override void OnTick()

View file

@ -37,8 +37,6 @@ namespace Server
: base(TimeSpan.FromMinutes(1.0))
{
m_Mobile = m;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()
@ -1132,8 +1130,6 @@ namespace Server.Spells
{
m_Spell.StartDelayedDamageContext(target, this);
}
Priority = TimerPriority.TwentyFiveMS;
}
protected override void OnTick()
@ -1182,8 +1178,6 @@ namespace Server.Spells
{
m_Spell.StartDelayedDamageContext(target, this);
}
Priority = TimerPriority.TwentyFiveMS;
}
protected override void OnTick()
@ -1455,8 +1449,6 @@ namespace Server.Spells
{
m_Mobile = from;
m_Spell = spell;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -97,7 +97,6 @@ namespace Server.Spells.Bushido
public InternalTimer(Mobile m) : base(TimeSpan.FromSeconds(15.0))
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()
@ -117,7 +116,6 @@ namespace Server.Spells.Bushido
{
m_Mobile = m;
m_Hits = 15 + m.Skills.Bushido.Fixed * m.Skills.Bushido.Fixed / 57600;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -231,7 +231,6 @@ namespace Server.Spells.Bushido
: base(delay)
{
m_Mobile = m;
Priority = TimerPriority.TwoFiftyMS;
}
protected override void OnTick()

View file

@ -106,7 +106,6 @@ namespace Server.Spells.Chivalry
public ExpireTimer(BaseWeapon weapon, TimeSpan delay) : base(delay)
{
m_Weapon = weapon;
Priority = TimerPriority.FiftyMS;
}
protected override void OnTick()

Some files were not shown because too many files have changed in this diff Show more