From fb915992dd31d51cf8dc807d5e51c9fc5d93dc33 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Sun, 11 Jul 2021 22:42:06 -0700 Subject: [PATCH] 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) --- .github/workflows/build-test.yml | 2 +- Directory.Build.props | 5 +- ModernUO.sln | 8 - Projects/Benchmarks/Benchmarks.csproj | 3 - .../SerializationGenerator.Tests.csproj | 22 - .../Tests/GenerateClassTests.cs | 23 - .../Server.Tests/Fixtures/ServerFixture.cs | 3 + .../Packets/Outgoing/MobilePacketTests.cs | 5 +- .../Packets/Outgoing/PlayerPacketTests.cs | 1 + .../Packets/Outgoing/VendorBuyPacketTests.cs | 1 + .../Packets/Outgoing/VendorSellPacketTests.cs | 1 + .../Server.Tests/Tests/Timer/TimerTests.cs | 78 +++ Projects/Server/AssemblyHandler.cs | 2 +- Projects/Server/Main.cs | 21 +- Projects/Server/Mobiles/Mobile.cs | 31 +- Projects/Server/Server.csproj | 3 - Projects/Server/Targeting/Target.cs | 17 - Projects/Server/Timer/Timer.DelayCall.cs | 36 +- Projects/Server/Timer/Timer.TimerWheel.cs | 263 ++++++++++ Projects/Server/Timer/Timer.cs | 487 ++---------------- Projects/UOContent/Accounting/Account.cs | 2 - .../Engines/CannedEvil/CannedEvilTimer.cs | 1 - .../Engines/ConPVP/Games/BombingRun.cs | 1 - .../Engines/ConPVP/Games/KingOfTheHill.cs | 2 - Projects/UOContent/Engines/Help/StuckMenu.cs | 1 - .../UOContent/Engines/Khaldun/RaisableItem.cs | 6 +- .../UOContent/Engines/Khaldun/RaiseSwitch.cs | 2 - .../Engines/Plants/MiscItems/GreenThorns.cs | 4 - .../Quests/Dark Tides/Items/KronusScroll.cs | 1 - .../Dark Tides/Mobiles/SummonedPaladin.cs | 1 - .../Quests/Witch Apprentice/Items/HagStew.cs | 1 - .../UOContent/Engines/Spawners/BaseSpawner.cs | 16 +- .../Addons/ElvenSpinningwheelEastAddon.cs | 1 - .../Addons/ElvenSpinningwheelSouthAddon.cs | 1 - .../UOContent/Items/Addons/PickpocketDips.cs | 1 - .../Items/Addons/SpinningwheelEastAddon.cs | 1 - .../Items/Addons/SpinningwheelSouthAddon.cs | 1 - .../UOContent/Items/Addons/TrainingDummies.cs | 1 - .../UOContent/Items/Clothing/OuterTorso.cs | 1 - .../Items/Construction/Doors/BaseDoor.cs | 1 - .../Items/Containers/BaseTreasureChest.cs | 1 - .../Items/Containers/FurnitureContainer.cs | 1 - .../Items/Containers/TreasureMapChest.cs | 1 - .../Items/Deeds/VendorRentalContract.cs | 2 - Projects/UOContent/Items/Food/Beverage.cs | 2 - Projects/UOContent/Items/Lights/BaseLight.cs | 1 - Projects/UOContent/Items/Maps/TreasureMap.cs | 4 - Projects/UOContent/Items/Misc/Blood.cs | 1 - .../UOContent/Items/Misc/Corpses/Corpse.cs | 1 - .../Items/Misc/Corpses/DecayedCorpse.cs | 1 - Projects/UOContent/Items/Misc/EffectItem.cs | 1 - .../UOContent/Items/Misc/MoonstoneGate.cs | 1 - .../UOContent/Items/Misc/PowerGenerator.cs | 2 - Projects/UOContent/Items/Misc/TrashBarrel.cs | 1 - Projects/UOContent/Items/Misc/UnholyBone.cs | 1 - .../BaseConflagrationPotion.cs | 2 - .../Items/Skill Items/Misc/Bandage.cs | 1 - .../Musical Instruments/BaseInstrument.cs | 1 - .../Items/Skill Items/Thief/DisguiseKit.cs | 1 - .../Items/Skill Items/Thief/LockPick.cs | 1 - .../AwesomeDisturbingPortrait.cs | 2 - .../Items/Special/Gifts/RoseOfTrinsic.cs | 2 - .../Items/Special/Holiday/HolidayFoods.cs | 1 - .../Items/Weapons/Abilities/BleedAttack.cs | 1 - .../Items/Weapons/Abilities/Block.cs | 1 - .../Items/Weapons/Abilities/DualWield.cs | 1 - .../Items/Weapons/Abilities/Feint.cs | 1 - .../Weapons/Abilities/FrenziedWhirlwind.cs | 2 - .../Items/Weapons/Abilities/TalonStrike.cs | 1 - .../Items/Weapons/Abilities/WeaponAbility.cs | 2 - Projects/UOContent/Items/Weapons/Fists.cs | 2 - Projects/UOContent/Items/Weapons/HitLower.cs | 2 - Projects/UOContent/Misc/AutoRestart.cs | 30 +- Projects/UOContent/Misc/AutoSave.cs | 4 +- Projects/UOContent/Misc/FoodDecay.cs | 5 +- Projects/UOContent/Misc/Guild.cs | 5 +- Projects/UOContent/Misc/LightCycle.cs | 6 +- Projects/UOContent/Misc/WebStatus.cs | 6 +- Projects/UOContent/Mobiles/AI/BaseAI.cs | 2 - .../UOContent/Mobiles/Animals/Mounts/Hiryu.cs | 1 - .../Mobiles/Animals/Mounts/LesserHiryu.cs | 5 +- Projects/UOContent/Mobiles/BaseCreature.cs | 2 - .../Monsters/Humanoid/Melee/OrcBomber.cs | 1 - .../Monsters/Humanoid/Melee/ShadowFiend.cs | 1 - .../Monsters/ML/Bedlam/LadyJennifyr.cs | 5 +- .../ML/Humanoid/Magic/FetidEssence.cs | 5 +- .../Monsters/ML/Twisted Weald/Swoop.cs | 5 +- .../Mobiles/Monsters/Misc/Melee/SandVortex.cs | 1 - .../Mobiles/Monsters/SE/BakeKitsune.cs | 1 - .../Mobiles/Monsters/SE/FanDancer.cs | 1 - .../UOContent/Mobiles/Monsters/SE/Kappa.cs | 1 - .../Mobiles/Monsters/SE/KazeKemono.cs | 1 - .../Mobiles/Monsters/SE/LadyOfTheSnow.cs | 1 - .../UOContent/Mobiles/Monsters/SE/RaiJu.cs | 1 - .../Mobiles/Monsters/SE/RuneBeetle.cs | 1 - .../Mobiles/Monsters/SE/TsukiWolf.cs | 1 - .../UOContent/Mobiles/Special/Barracoon.cs | 2 - Projects/UOContent/Mobiles/Special/Dummy.cs | 1 - .../UOContent/Mobiles/Special/Harrower.cs | 2 - .../Mobiles/Special/HarrowerTentacles.cs | 1 - Projects/UOContent/Mobiles/Special/Paragon.cs | 1 - .../Mobiles/Townfolk/BaseEscortable.cs | 2 - .../UOContent/Mobiles/Vendors/PlayerVendor.cs | 4 - .../UOContent/Mobiles/Vendors/RentedVendor.cs | 2 - .../Mobiles/Vendors/VendorInventory.cs | 2 - Projects/UOContent/Multis/Boats/BaseBoat.cs | 3 - Projects/UOContent/Multis/Boats/Plank.cs | 1 - .../UOContent/Multis/Houses/MovingCrate.cs | 2 - .../UOContent/Multis/Houses/PreviewHouse.cs | 1 - Projects/UOContent/Regions/GuardedRegion.cs | 1 - Projects/UOContent/Skills/AnimalTaming.cs | 1 - Projects/UOContent/Skills/Begging.cs | 1 - Projects/UOContent/Skills/Poisoning.cs | 1 - Projects/UOContent/Skills/SpiritSpeak.cs | 1 - Projects/UOContent/Spells/Base/SpecialMove.cs | 2 - Projects/UOContent/Spells/Base/Spell.cs | 4 - Projects/UOContent/Spells/Base/SpellHelper.cs | 8 - .../UOContent/Spells/Bushido/Confidence.cs | 2 - Projects/UOContent/Spells/Bushido/Evasion.cs | 1 - .../Spells/Chivalry/ConsecrateWeapon.cs | 1 - .../UOContent/Spells/Fifth/PoisonField.cs | 2 - .../UOContent/Spells/Fourth/ArchProtection.cs | 1 - Projects/UOContent/Spells/Fourth/FireField.cs | 2 - .../Spells/Necromancy/BloodOathSpell.cs | 2 - .../Spells/Necromancy/CurseWeapon.cs | 2 - .../UOContent/Spells/Necromancy/MindRot.cs | 1 - .../UOContent/Spells/Necromancy/PainSpike.cs | 1 - .../UOContent/Spells/Necromancy/Strangle.cs | 1 - .../UOContent/Spells/Ninjitsu/AnimalForm.cs | 2 - .../UOContent/Spells/Second/Protection.cs | 1 - .../UOContent/Spells/Seventh/EnergyField.cs | 1 - .../UOContent/Spells/Seventh/GateTravel.cs | 1 - Projects/UOContent/Spells/Sixth/Explosion.cs | 2 - .../UOContent/Spells/Sixth/ParalyzeField.cs | 1 - .../UOContent/Spells/Third/WallOfStone.cs | 1 - Projects/UOContent/Spells/UnsummonTimer.cs | 1 - Projects/UOContent/UOContent.csproj | 2 +- azure-pipelines.yml | 4 +- 138 files changed, 468 insertions(+), 802 deletions(-) delete mode 100644 Projects/SerializationGenerator.Tests/SerializationGenerator.Tests.csproj delete mode 100644 Projects/SerializationGenerator.Tests/Tests/GenerateClassTests.cs create mode 100644 Projects/Server.Tests/Tests/Timer/TimerTests.cs create mode 100644 Projects/Server/Timer/Timer.TimerWheel.cs diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index c4f097913..8c677d1c3 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -26,7 +26,7 @@ jobs: - name: Setup .NET 5 uses: actions/setup-dotnet@v1 with: - dotnet-version: 5.0.203 + dotnet-version: 5.0.301 - name: Build run: ./publish.cmd - name: Test diff --git a/Directory.Build.props b/Directory.Build.props index 1113fce2c..c1bdcd062 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -54,7 +54,10 @@ latest - + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ModernUO.sln b/ModernUO.sln index 238c627b9..75eb761a4 100644 --- a/ModernUO.sln +++ b/ModernUO.sln @@ -14,8 +14,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmarks", "Projects\Benc EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SerializationGenerator", "Projects\SerializationGenerator\SerializationGenerator.csproj", "{07DDB8CF-F926-44F4-A584-FF2997D2C9D0}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SerializationGenerator.Tests", "Projects\SerializationGenerator.Tests\SerializationGenerator.Tests.csproj", "{2BC92375-BB66-4CA5-B39C-36215749FE64}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SerializationSchemaGenerator", "Projects\SerializationSchemaGenerator\SerializationSchemaGenerator.csproj", "{A30150A3-796C-4C6D-B3E4-B7BEB0021701}" EndProject Global @@ -61,12 +59,6 @@ Global {07DDB8CF-F926-44F4-A584-FF2997D2C9D0}.Debug|x64.Build.0 = Debug|x64 {07DDB8CF-F926-44F4-A584-FF2997D2C9D0}.Release|x64.ActiveCfg = Release|x64 {07DDB8CF-F926-44F4-A584-FF2997D2C9D0}.Release|x64.Build.0 = Release|x64 - {2BC92375-BB66-4CA5-B39C-36215749FE64}.Analyze|x64.ActiveCfg = Analyze|x64 - {2BC92375-BB66-4CA5-B39C-36215749FE64}.Analyze|x64.Build.0 = Analyze|x64 - {2BC92375-BB66-4CA5-B39C-36215749FE64}.Debug|x64.ActiveCfg = Debug|x64 - {2BC92375-BB66-4CA5-B39C-36215749FE64}.Debug|x64.Build.0 = Debug|x64 - {2BC92375-BB66-4CA5-B39C-36215749FE64}.Release|x64.ActiveCfg = Release|x64 - {2BC92375-BB66-4CA5-B39C-36215749FE64}.Release|x64.Build.0 = Release|x64 {A30150A3-796C-4C6D-B3E4-B7BEB0021701}.Analyze|x64.ActiveCfg = Analyze|x64 {A30150A3-796C-4C6D-B3E4-B7BEB0021701}.Analyze|x64.Build.0 = Analyze|x64 {A30150A3-796C-4C6D-B3E4-B7BEB0021701}.Debug|x64.ActiveCfg = Debug|x64 diff --git a/Projects/Benchmarks/Benchmarks.csproj b/Projects/Benchmarks/Benchmarks.csproj index 291c5811d..e0ab71eea 100644 --- a/Projects/Benchmarks/Benchmarks.csproj +++ b/Projects/Benchmarks/Benchmarks.csproj @@ -10,9 +10,6 @@ - - - diff --git a/Projects/SerializationGenerator.Tests/SerializationGenerator.Tests.csproj b/Projects/SerializationGenerator.Tests/SerializationGenerator.Tests.csproj deleted file mode 100644 index 597fc3414..000000000 --- a/Projects/SerializationGenerator.Tests/SerializationGenerator.Tests.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - net5.0 - true - true - false - - - - - - - runtime; build; native; contentfiles; analyzers; buildtransitive - all - - - - - - - - diff --git a/Projects/SerializationGenerator.Tests/Tests/GenerateClassTests.cs b/Projects/SerializationGenerator.Tests/Tests/GenerateClassTests.cs deleted file mode 100644 index 03f8db598..000000000 --- a/Projects/SerializationGenerator.Tests/Tests/GenerateClassTests.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Collections.Immutable; -using System.Text; -using Microsoft.CodeAnalysis; -using SerializationGenerator; -using Xunit; - -namespace SerializationGeneratorTests -{ - public class GenerateClassTests - { - [Fact] - public void Test1() - { - var source = new StringBuilder(); - source.GenerateClassStart( - "TestClass", - ImmutableArray.Empty - ); - - Assert.NotEmpty(source.ToString()); - } - } -} diff --git a/Projects/Server.Tests/Fixtures/ServerFixture.cs b/Projects/Server.Tests/Fixtures/ServerFixture.cs index 48d7b369a..d7bb4056b 100644 --- a/Projects/Server.Tests/Fixtures/ServerFixture.cs +++ b/Projects/Server.Tests/Fixtures/ServerFixture.cs @@ -18,12 +18,15 @@ namespace Server.Tests // Configure the world World.Configure(); + Timer.Initialize(0); + // Load the world World.Load(); } public void Dispose() { + Timer.Initialize(0); } } } diff --git a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/MobilePacketTests.cs b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/MobilePacketTests.cs index 90d437abe..962936108 100644 --- a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/MobilePacketTests.cs +++ b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/MobilePacketTests.cs @@ -4,6 +4,7 @@ using Xunit; namespace Server.Tests.Network { + [Collection("Sequential Tests")] public class MobilePacketTests : IClassFixture { [Fact] @@ -328,11 +329,7 @@ namespace Server.Tests.Network var result = ns.SendPipe.Reader.TryRead(); AssertThat.Equal(result.Buffer[0].AsSpan(0), expected); } - } - [Collection("Sequential Tests")] - public class SequentialMobilePacketTests : IClassFixture - { [Fact] public void TestMobileHits() { diff --git a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/PlayerPacketTests.cs b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/PlayerPacketTests.cs index 43b1b2356..07287b17a 100644 --- a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/PlayerPacketTests.cs +++ b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/PlayerPacketTests.cs @@ -5,6 +5,7 @@ using Xunit; namespace Server.Tests.Network { + [Collection("Sequential Tests")] public class PlayerPacketTests : IClassFixture { [Theory] diff --git a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorBuyPacketTests.cs b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorBuyPacketTests.cs index 9e01e5883..5f6ceb4ae 100644 --- a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorBuyPacketTests.cs +++ b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorBuyPacketTests.cs @@ -6,6 +6,7 @@ using Xunit; namespace Server.Tests.Network { + [Collection("Sequential Tests")] public class VendorBuyPacketTests : IClassFixture { [Theory] diff --git a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorSellPacketTests.cs b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorSellPacketTests.cs index 89fe26fdd..35725ce1a 100644 --- a/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorSellPacketTests.cs +++ b/Projects/Server.Tests/Tests/Network/Packets/Outgoing/VendorSellPacketTests.cs @@ -5,6 +5,7 @@ using Xunit; namespace Server.Tests.Network { + [Collection("Sequential Tests")] public class VendorSellPacketTests : IClassFixture { [Fact] diff --git a/Projects/Server.Tests/Tests/Timer/TimerTests.cs b/Projects/Server.Tests/Tests/Timer/TimerTests.cs new file mode 100644 index 000000000..1e42c076d --- /dev/null +++ b/Projects/Server.Tests/Tests/Timer/TimerTests.cs @@ -0,0 +1,78 @@ +using System; +using Xunit; + +namespace Server.Tests +{ + [Collection("Sequential Tests")] + public class TimerTests : IClassFixture + { + [Theory] + [InlineData(0L, 8L)] + [InlineData(80L, 80L)] + [InlineData(65L, 72L)] + [InlineData(32767L, 32768L)] + [InlineData(32768L, 32768L)] + [InlineData(32833L, 32840L)] + [InlineData(134217729L, 134217736L)] + public void TestVariousTimes(long ticks, long expectedTicks) + { + var timerTicks = new TimerTicks(); + void action() + { + Assert.Equal(expectedTicks, timerTicks.Ticks); + timerTicks.ExecutedCount++; + } + + Timer.Initialize(timerTicks.Ticks); + + var timer = Timer.DelayCall(TimeSpan.FromMilliseconds(ticks), action); + timer.Start(); + + var tickCount = expectedTicks / 8; + + for (int i = 1; i <= tickCount; i++) + { + timerTicks.Ticks = i * 8; + + Timer.Slice(timerTicks.Ticks); + } + + Assert.Equal(1, timerTicks.ExecutedCount); + } + + [Theory] + [InlineData(1000L, 1000L, 30000L, 30000L, 2)] + public void TestIntervals(long delay, long expectedDelayTicks, long interval, long expectedIntervalTicks, int count) + { + var timerTicks = new TimerTicks(); + void action() + { + timerTicks.ExpectedTicks += timerTicks.ExecutedCount++ == 0 ? expectedDelayTicks : expectedIntervalTicks; + Assert.Equal(timerTicks.ExpectedTicks, timerTicks.Ticks); + } + + Timer.Initialize(timerTicks.Ticks); + + var timer = Timer.DelayCall(TimeSpan.FromMilliseconds(delay), TimeSpan.FromMilliseconds(interval), count, action); + timer.Start(); + + var tickCount = (expectedDelayTicks + (expectedIntervalTicks * count - 1)) / 8; + + for (int i = 1; i <= tickCount; i++) + { + timerTicks.Ticks = i * 8; + + Timer.Slice(timerTicks.Ticks); + } + + Assert.Equal(count, timerTicks.ExecutedCount); + } + + private class TimerTicks + { + public long ExpectedTicks; + public long Ticks; + public int ExecutedCount; + } + } +} diff --git a/Projects/Server/AssemblyHandler.cs b/Projects/Server/AssemblyHandler.cs index 1df261e84..c8e91ac1b 100644 --- a/Projects/Server/AssemblyHandler.cs +++ b/Projects/Server/AssemblyHandler.cs @@ -67,7 +67,7 @@ namespace Server for (int i = 0; i < types.Length; i++) { var m = types[i].GetMethod(method, BindingFlags.Static | BindingFlags.Public); - if (m != null) + if (m?.GetParameters().Length == 0) { list.Add(m); } diff --git a/Projects/Server/Main.cs b/Projects/Server/Main.cs index 1f99b0bfe..057653992 100644 --- a/Projects/Server/Main.cs +++ b/Projects/Server/Main.cs @@ -36,7 +36,6 @@ namespace Server private static readonly ILogger logger = LogFactory.GetLogger(typeof(Core)); private static bool _crashed; - private static Thread _timerThread; private static string _baseDirectory; private static bool _profiling; @@ -127,8 +126,8 @@ namespace Server // For Unix Stopwatch.Frequency is normalized to 1ns // We don't anticipate needing this for Windows/OSX - private static long _maxTickCountBeforePrecisionLoss = long.MaxValue / 1000L; - private static long _ticksPerMillisecond = Stopwatch.Frequency / 1000L; + private const long _maxTickCountBeforePrecisionLoss = long.MaxValue / 1000L; + private static readonly long _ticksPerMillisecond = Stopwatch.Frequency / 1000L; public static long TickCount { @@ -145,6 +144,8 @@ namespace Server // No precision loss : 1000L * timestamp / Stopwatch.Frequency; } + // Setting this to a value lower than the previous is bad. Timers will become delayed + // until time catches up. set => _tickCount = value; } @@ -358,8 +359,6 @@ namespace Server { EventSink.InvokeShutdown(); } - - Timer.TimerThread.Set(); } public static void Main(string[] args) @@ -420,12 +419,6 @@ namespace Server logger.Information($"Running on {RuntimeInformation.FrameworkDescription}"); - var ttObj = new Timer.TimerThread(); - _timerThread = new Thread(ttObj.TimerMain) - { - Name = "Timer Thread" - }; - var s = Arguments; if (s.Length > 0) @@ -474,6 +467,8 @@ namespace Server VerifySerialization(); + Timer.Initialize(TickCount); + AssemblyHandler.Invoke("Configure"); TileMatrixLoader.LoadTileMatrix(); @@ -483,8 +478,6 @@ namespace Server AssemblyHandler.Invoke("Initialize"); - _timerThread.Start(); - TcpServer.Start(); EventSink.InvokeServerStarted(); RunEventLoop(); @@ -504,7 +497,7 @@ namespace Server var events = Mobile.ProcessDeltaQueue(); events += Item.ProcessDeltaQueue(); - events += Timer.Slice(); + events += Timer.Slice(_tickCount); // Handle networking events += TcpServer.Slice(); diff --git a/Projects/Server/Mobiles/Mobile.cs b/Projects/Server/Mobiles/Mobile.cs index dc49c0435..436f4cbbf 100644 --- a/Projects/Server/Mobiles/Mobile.cs +++ b/Projects/Server/Mobiles/Mobile.cs @@ -1157,16 +1157,6 @@ namespace Server { m_Player = value; InvalidateProperties(); - - if (!m_Player && m_Dex <= 100 && m_CombatTimer != null) - { - m_CombatTimer.Priority = TimerPriority.FiftyMS; - } - else if (m_CombatTimer != null) - { - m_CombatTimer.Priority = TimerPriority.EveryTick; - } - CheckStatTimers(); } } @@ -6546,15 +6536,6 @@ namespace Server CheckStatTimers(); } - if (!m_Player && m_Dex <= 100 && m_CombatTimer != null) - { - m_CombatTimer.Priority = TimerPriority.FiftyMS; - } - else if (m_CombatTimer != null) - { - m_CombatTimer.Priority = TimerPriority.EveryTick; - } - UpdateRegion(); UpdateResistances(); @@ -9375,7 +9356,6 @@ namespace Server public ManaTimer(Mobile m) : base(GetManaRegenRate(m), GetManaRegenRate(m)) { - Priority = TimerPriority.FiftyMS; m_Owner = m; } @@ -9397,7 +9377,6 @@ namespace Server public HitsTimer(Mobile m) : base(GetHitsRegenRate(m), GetHitsRegenRate(m)) { - Priority = TimerPriority.FiftyMS; m_Owner = m; } @@ -9419,7 +9398,6 @@ namespace Server public StamTimer(Mobile m) : base(GetStamRegenRate(m), GetStamRegenRate(m)) { - Priority = TimerPriority.FiftyMS; m_Owner = m; } @@ -9451,16 +9429,9 @@ namespace Server { private readonly Mobile m_Mobile; - public CombatTimer(Mobile m) : base(TimeSpan.FromSeconds(0.0), TimeSpan.FromSeconds(0.01)) - { + public CombatTimer(Mobile m) : base(TimeSpan.FromSeconds(0.0), TimeSpan.FromSeconds(0.01)) => m_Mobile = m; - if (!m_Mobile.m_Player && m_Mobile.m_Dex <= 100) - { - Priority = TimerPriority.FiftyMS; - } - } - protected override void OnTick() { if (Core.TickCount - m_Mobile.NextCombatTime < 0) diff --git a/Projects/Server/Server.csproj b/Projects/Server/Server.csproj index 83ecf639e..ec8dcca8b 100755 --- a/Projects/Server/Server.csproj +++ b/Projects/Server/Server.csproj @@ -39,9 +39,6 @@ - - - diff --git a/Projects/Server/Targeting/Target.cs b/Projects/Server/Targeting/Target.cs index 65e0a5f33..02e68c609 100644 --- a/Projects/Server/Targeting/Target.cs +++ b/Projects/Server/Targeting/Target.cs @@ -262,23 +262,6 @@ namespace Server.Targeting { m_Target = target; m_Mobile = m; - - if (delay >= ThirtySeconds) - { - Priority = TimerPriority.FiveSeconds; - } - else if (delay >= TenSeconds) - { - Priority = TimerPriority.OneSecond; - } - else if (delay >= OneSecond) - { - Priority = TimerPriority.TwoFiftyMS; - } - else - { - Priority = TimerPriority.TwentyFiveMS; - } } protected override void OnTick() diff --git a/Projects/Server/Timer/Timer.DelayCall.cs b/Projects/Server/Timer/Timer.DelayCall.cs index 5e3b46b4e..1e8783efc 100644 --- a/Projects/Server/Timer/Timer.DelayCall.cs +++ b/Projects/Server/Timer/Timer.DelayCall.cs @@ -29,6 +29,9 @@ namespace Server public partial class Timer { + private static string FormatDelegate(Delegate callback) => + callback == null ? "null" : $"{callback.Method.DeclaringType?.FullName ?? ""}.{callback.Method.Name}"; + public static Timer DelayCall(TimerCallback callback) => DelayCall(TimeSpan.Zero, TimeSpan.Zero, 1, callback); public static Timer DelayCall(TimeSpan delay, TimerCallback callback) => @@ -40,8 +43,6 @@ namespace Server public static Timer DelayCall(TimeSpan delay, TimeSpan interval, int count, TimerCallback callback) { Timer t = new DelayCallTimer(delay, interval, count, callback); - - t.Priority = ComputePriority(count == 1 ? delay : interval); t.Start(); return t; @@ -62,9 +63,6 @@ namespace Server ) { Timer t = new DelayStateCallTimer(delay, interval, count, callback, state); - - t.Priority = ComputePriority(count == 1 ? delay : interval); - t.Start(); return t; @@ -87,9 +85,6 @@ namespace Server ) { Timer t = new DelayStateCallTimer(delay, interval, count, callback, t1, t2); - - t.Priority = ComputePriority(count == 1 ? delay : interval); - t.Start(); return t; @@ -114,9 +109,6 @@ namespace Server ) { Timer t = new DelayStateCallTimer(delay, interval, count, callback, t1, t2, t3); - - t.Priority = ComputePriority(count == 1 ? delay : interval); - t.Start(); return t; @@ -144,9 +136,6 @@ namespace Server ) { Timer t = new DelayStateCallTimer(delay, interval, count, callback, t1, t2, t3, t4); - - t.Priority = ComputePriority(count == 1 ? delay : interval); - t.Start(); return t; @@ -161,13 +150,10 @@ namespace Server ) { Callback = callback; - RegCreation(); } public TimerCallback Callback { get; } - public override bool DefRegCreation => false; - protected override void OnTick() { Callback?.Invoke(); @@ -185,14 +171,10 @@ namespace Server { Callback = callback; m_State = state; - - RegCreation(); } public TimerStateCallback Callback { get; } - public override bool DefRegCreation => false; - protected override void OnTick() { Callback?.Invoke(m_State); @@ -214,14 +196,10 @@ namespace Server Callback = callback; m_T1 = t1; m_T2 = t2; - - RegCreation(); } public TimerStateCallback Callback { get; } - public override bool DefRegCreation => false; - protected override void OnTick() { Callback?.Invoke(m_T1, m_T2); @@ -245,14 +223,10 @@ namespace Server m_T1 = t1; m_T2 = t2; m_T3 = t3; - - RegCreation(); } public TimerStateCallback Callback { get; } - public override bool DefRegCreation => false; - protected override void OnTick() { Callback?.Invoke(m_T1, m_T2, m_T3); @@ -278,14 +252,10 @@ namespace Server m_T2 = t2; m_T3 = t3; m_T4 = t4; - - RegCreation(); } public TimerStateCallback Callback { get; } - public override bool DefRegCreation => false; - protected override void OnTick() { Callback?.Invoke(m_T1, m_T2, m_T3, m_T4); diff --git a/Projects/Server/Timer/Timer.TimerWheel.cs b/Projects/Server/Timer/Timer.TimerWheel.cs new file mode 100644 index 000000000..77277d312 --- /dev/null +++ b/Projects/Server/Timer/Timer.TimerWheel.cs @@ -0,0 +1,263 @@ +/************************************************************************* + * ModernUO * + * Copyright 2019-2021 - ModernUO Development Team * + * Email: hi@modernuo.com * + * File: Timer.TimerWheel.cs * + * * + * This program is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, either version 3 of the License, or * + * (at your option) any later version. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program. If not, see . * + *************************************************************************/ + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace Server +{ + public partial class Timer + { + private const int _ringSizePowerOf2 = 12; + private const int _ringSize = 1 << _ringSizePowerOf2; // 4096 + private const int _ringLayers = 3; + private const int _tickRatePowerOf2 = 3; + private const int _tickRate = 1 << _tickRatePowerOf2; // 8ms + + private static long _lastTickTurned = -1; + + private static readonly Timer[][] _rings = new Timer[_ringLayers][]; + private static readonly int[] _ringIndexes = new int[_ringLayers]; + + public static void Initialize(long tickCount) + { + _lastTickTurned = tickCount; + + for (int i = 0; i < _rings.Length; i++) + { + _rings[i] = new Timer[_ringSize]; + _ringIndexes[i] = 0; + } + } + + public static int Slice(long tickCount) + { + var deltaSinceTurn = tickCount - _lastTickTurned; + var events = 0; + while (deltaSinceTurn >= _tickRate) + { + deltaSinceTurn -= _tickRate; + _lastTickTurned += _tickRate; + events += Turn() ? 1 : 0; + } + + return events; + } + + private static bool Turn() + { + bool events = false; + + for (var i = 0; i < _ringLayers; i++) + { + // Increment the ring index, then get the timer. + var ringIndex = ++_ringIndexes[i]; + bool turnNextWheel = ringIndex >= _ringSize; + + if (turnNextWheel) + { + ringIndex = _ringIndexes[i] = 0; + } + + var timer = _rings[i][ringIndex]; + + if (timer != null) + { + events = true; + + if (i > 0 && timer._remaining > 0) + { + Promote(timer); + } + else + { + Execute(timer); + } + + // Clear the slot + _rings[i][ringIndex] = null; + } + + if (!turnNextWheel) + { + break; + } + } + + return events; + } + + private static void Execute(Timer timer) + { + do + { + var next = timer._nextTimer; + var prof = timer.GetProfile(); + + prof?.Start(); + timer.OnTick(); + prof?.Finish(); + + if (timer.Running) + { + RemoveTimer(timer); + + if (timer.Count == 0 || ++timer.Index < timer.Count) + { + timer.Delay = timer.Interval; + timer.Next = Core.Now + timer.Interval; + AddTimer(timer, (long)timer.Delay.TotalMilliseconds); + } + } + + timer = next; + } while (timer != null); + } + + private static void Promote(Timer timer) + { + do + { + var next = timer._nextTimer; + RemoveTimer(timer); + AddTimer(timer, timer._remaining); + timer = next; + } while (timer != null); + } + + private static void AddTimer(Timer timer, long delay) + { + delay = Math.Max(0, delay); + + var resolutionPowerOf2 = _tickRatePowerOf2; + for (var i = 0; i < _ringLayers; i++) + { + var resolution = 1 << resolutionPowerOf2; + var nextResolutionPowerOf2 = resolutionPowerOf2 + _ringSizePowerOf2; + long max = 1 << nextResolutionPowerOf2; + if (delay < max) + { + var remaining = delay & (resolution - 1); + var slot = (delay >> resolutionPowerOf2) + _ringIndexes[i] + (remaining > 0 ? 1 : 0); + + // Round up if we have a delay of 0 + if (delay == 0) + { + slot++; + remaining = 0; + } + + if (slot >= _ringSize) + { + slot -= _ringSize; + } + + timer._nextTimer = _rings[i][slot]; + if (timer._nextTimer != null) + { + timer._nextTimer._prevTimer = timer; + } + + timer._remaining = remaining; + timer._ring = i; + timer._slot = (int)slot; + + _rings[i][slot] = timer; + break; + } + + // The remaining amount until we turn this ring + delay -= resolution * (_ringSize - _ringIndexes[i]); + resolutionPowerOf2 = nextResolutionPowerOf2; + } + } + + private static void RemoveTimer(Timer timer) + { + if (timer._prevTimer != null) + { + timer._prevTimer._nextTimer = timer._nextTimer; + } + else + { + _rings[timer._ring][timer._slot] = timer._nextTimer; + } + + if (timer._nextTimer != null) + { + timer._nextTimer._prevTimer = timer._prevTimer; + } + + timer._nextTimer = null; + timer._prevTimer = null; + } + + public static void DumpInfo(TextWriter tw) + { + var now = DateTime.UtcNow; + + tw.WriteLine("Date: {0}", now); + tw.WriteLine(); + + var total = 0.0; + var hash = new Dictionary(); + + for (var i = 0; i < _ringLayers; i++) + { + for (var j = 0; j < _ringSize; j++) + { + var t = _rings[i][j]; + + var name = t.ToString(); + + hash.TryGetValue(name, out var count); + hash[name] = count + 1; + + total++; + } + } + + foreach (var (name, count) in hash.OrderByDescending(o => o.Value)) + { + tw.WriteLine($"Type: {name}; Count: {count}; Percent: {count / total}%"); + } + + tw.WriteLine(); + tw.WriteLine(); + } + + public static void ClearAllTimers(long tickCount) + { + _lastTickTurned = tickCount; + + foreach (var t in _rings) + { + for (var i = 0; i < _ringSize; i++) + { + var node = t[i]; + Timer next; + + do + { + next = node?._nextTimer; + node?.Stop(); + } while (next != null); + } + } + } + } +} diff --git a/Projects/Server/Timer/Timer.cs b/Projects/Server/Timer/Timer.cs index 33e959420..0ece60e55 100644 --- a/Projects/Server/Timer/Timer.cs +++ b/Projects/Server/Timer/Timer.cs @@ -14,39 +14,19 @@ *************************************************************************/ using System; -using System.Collections.Generic; -using System.IO; -using System.Threading; using Server.Diagnostics; namespace Server { - public enum TimerPriority - { - EveryTick, - TenMS, - TwentyFiveMS, - FiftyMS, - TwoFiftyMS, - OneSecond, - FiveSeconds, - OneMinute - } - public partial class Timer { - private static readonly Queue m_Queue = new(); + // We need to know what ring/slot we are in so we can be removed if we are "head" of the link list. + private int _ring; + private int _slot; - private static int m_QueueCountAtSlice; - private long m_Delay; - private long m_Interval; - private List m_List; - private long m_Next; - private TimerPriority m_Priority; - private bool m_PrioritySet; - - private bool m_Queued; - private bool m_Running; + private long _remaining; + private Timer _nextTimer; + private Timer _prevTimer; public Timer(TimeSpan delay) : this(delay, TimeSpan.Zero, 1) { @@ -54,130 +34,13 @@ namespace Server public Timer(TimeSpan delay, TimeSpan interval, int count = 0) { - m_Delay = (long)delay.TotalMilliseconds; - m_Interval = (long)interval.TotalMilliseconds; + Delay = delay; + Interval = interval; Count = count; + _nextTimer = null; + _prevTimer = null; + Next = Core.Now + Delay; - if (!m_PrioritySet) - { - m_Priority = ComputePriority(count == 1 ? delay : interval); - m_PrioritySet = true; - } - - if (DefRegCreation) - { - RegCreation(); - } - } - - public TimerPriority Priority - { - get => m_Priority; - set - { - if (!m_PrioritySet) - { - m_PrioritySet = true; - } - - if (m_Priority != value) - { - m_Priority = value; - - if (m_Running) - { - TimerThread.PriorityChange(this, (int)m_Priority); - } - } - } - } - - public DateTime Next => DateTime.UtcNow + TimeSpan.FromMilliseconds(m_Next - Core.TickCount); - - public TimeSpan Delay - { - get => TimeSpan.FromMilliseconds(m_Delay); - set => m_Delay = (long)value.TotalMilliseconds; - } - - public TimeSpan Interval - { - get => TimeSpan.FromMilliseconds(m_Interval); - set => m_Interval = (long)value.TotalMilliseconds; - } - - public int Index { get; private set; } - - public int Count { get; } - - public bool Running - { - get => m_Running; - set - { - if (value) - { - Start(); - } - else - { - Stop(); - } - } - } - - public static int BreakCount { get; set; } = 20000; - - public virtual bool DefRegCreation => true; - - private static string FormatDelegate(Delegate callback) => - callback == null ? "null" : $"{callback.Method.DeclaringType?.FullName ?? ""}.{callback.Method.Name}"; - - public static void DumpInfo(TextWriter tw) - { - TimerThread.DumpInfo(tw); - } - - public TimerProfile GetProfile() - { - if (!Core.Profiling) - { - return null; - } - - var name = ToString(); - - return TimerProfile.Acquire(name); - } - - public static int Slice() - { - var index = 0; - - lock (m_Queue) - { - m_QueueCountAtSlice = m_Queue.Count; - - while (index < BreakCount && m_Queue.Count != 0) - { - var t = m_Queue.Dequeue(); - var prof = t.GetProfile(); - - prof?.Start(); - - t.OnTick(); - t.m_Queued = false; - index++; - - prof?.Finish(); - } - } - - return index; - } - - public void RegCreation() - { var prof = GetProfile(); if (prof != null) @@ -186,321 +49,59 @@ namespace Server } } - public override string ToString() => GetType().FullName ?? ""; + public DateTime Next { get; private set; } + public TimeSpan Delay { get; set; } + public TimeSpan Interval { get; set; } + public int Index { get; private set; } + public int Count { get; } + public bool Running { get; private set; } - public static TimerPriority ComputePriority(TimeSpan ts) + public TimerProfile GetProfile() => !Core.Profiling ? null : TimerProfile.Acquire(ToString() ?? "null"); + + public override string ToString() => GetType().FullName; + + public Timer Start() { - if (ts >= TimeSpan.FromMinutes(1.0)) + if (Running) { - return TimerPriority.FiveSeconds; + return this; } - if (ts >= TimeSpan.FromSeconds(10.0)) + Running = true; + AddTimer(this, (long)Delay.TotalMilliseconds); + + var prof = GetProfile(); + + if (prof != null) { - return TimerPriority.OneSecond; + prof.Started++; } - if (ts >= TimeSpan.FromSeconds(5.0)) - { - return TimerPriority.TwoFiftyMS; - } - - if (ts >= TimeSpan.FromSeconds(2.5)) - { - return TimerPriority.FiftyMS; - } - - if (ts >= TimeSpan.FromSeconds(1.0)) - { - return TimerPriority.TwentyFiveMS; - } - - if (ts >= TimeSpan.FromSeconds(0.5)) - { - return TimerPriority.TenMS; - } - - return TimerPriority.EveryTick; + return this; } - public void Start() + public Timer Stop() { - if (!m_Running) + if (!Running) { - m_Running = true; - TimerThread.AddTimer(this); - - var prof = GetProfile(); - - if (prof != null) - { - prof.Started++; - } + return this; } - } - public void Stop() - { - if (m_Running) + Running = false; + RemoveTimer(this); + + var prof = GetProfile(); + + if (prof != null) { - m_Running = false; - TimerThread.RemoveTimer(this); - - var prof = GetProfile(); - - if (prof != null) - { - prof.Stopped++; - } + prof.Stopped++; } + + return this; } protected virtual void OnTick() { } - - public class TimerThread - { - private static readonly Dictionary - m_Changed = new(); - - private static readonly long[] m_NextPriorities = new long[8]; - - private static readonly long[] m_PriorityDelays = - { - 0, - 10, - 25, - 50, - 250, - 1000, - 5000, - 60000 - }; - - private static readonly List[] m_Timers = - { - new(), - new(), - new(), - new(), - new(), - new(), - new(), - new() - }; - - private static readonly AutoResetEvent m_Signal = new(false); - - public static void DumpInfo(TextWriter tw) - { - for (var i = 0; i < 8; ++i) - { - tw.WriteLine("Priority: {0}", (TimerPriority)i); - tw.WriteLine(); - - var hash = new Dictionary>(); - - for (var j = 0; j < m_Timers[i].Count; ++j) - { - var t = m_Timers[i][j]; - - var key = t.ToString(); - - if (!hash.TryGetValue(key, out var list)) - { - hash[key] = list = new List(); - } - - list.Add(t); - } - - foreach (var kv in hash) - { - var key = kv.Key; - var list = kv.Value; - - tw.WriteLine( - "Type: {0}; Count: {1}; Percent: {2}%", - key, - list.Count, - (int)(100 * (list.Count / (double)m_Timers[i].Count)) - ); - } - - tw.WriteLine(); - tw.WriteLine(); - } - } - - public static void Change(Timer t, int newIndex, bool isAdd) - { - lock (m_Changed) - { - m_Changed[t] = TimerChangeEntry.GetInstance(t, newIndex, isAdd); - } - - m_Signal.Set(); - } - - public static void AddTimer(Timer t) - { - Change(t, (int)t.Priority, true); - } - - public static void PriorityChange(Timer t, int newPrio) - { - Change(t, newPrio, false); - } - - public static void RemoveTimer(Timer t) - { - Change(t, -1, false); - } - - private static void ProcessChanged() - { - lock (m_Changed) - { - var curTicks = Core.TickCount; - - foreach (var tce in m_Changed.Values) - { - var timer = tce.m_Timer; - var newIndex = tce.m_NewIndex; - - timer.m_List?.Remove(timer); - - if (tce.m_IsAdd) - { - timer.m_Next = curTicks + timer.m_Delay; - timer.Index = 0; - } - - if (newIndex >= 0) - { - timer.m_List = m_Timers[newIndex]; - timer.m_List.Add(timer); - } - else - { - timer.m_List = null; - } - - tce.Free(); - } - - m_Changed.Clear(); - } - } - - public static void Set() - { - m_Signal.Set(); - } - - public void TimerMain() - { - while (!Core.Closing) - { - if (World.Loading || World.Saving) - { - m_Signal.WaitOne(1, false); - continue; - } - - ProcessChanged(); - - for (var i = 0; i < m_Timers.Length; i++) - { - var now = Core.TickCount; - if (now < m_NextPriorities[i]) - { - break; - } - - m_NextPriorities[i] = now + m_PriorityDelays[i]; - - for (var j = 0; j < m_Timers[i].Count; j++) - { - var t = m_Timers[i][j]; - - if (!t.m_Queued && now > t.m_Next) - { - t.m_Queued = true; - - lock (m_Queue) - { - m_Queue.Enqueue(t); - } - - if (t.Count != 0 && ++t.Index >= t.Count) - { - t.Stop(); - } - else - { - t.m_Next = now + t.m_Interval; - } - } - } - } - - m_Signal.WaitOne(1, false); - } - } - - private class TimerChangeEntry - { - private static readonly Queue m_InstancePool = new(); - public bool m_IsAdd; - public int m_NewIndex; - public Timer m_Timer; - - private TimerChangeEntry(Timer t, int newIndex, bool isAdd) - { - m_Timer = t; - m_NewIndex = newIndex; - m_IsAdd = isAdd; - } - - public void Free() - { - lock (m_InstancePool) - { - if (m_InstancePool.Count < 200) // Arbitrary - { - m_InstancePool.Enqueue(this); - } - } - } - - public static TimerChangeEntry GetInstance(Timer t, int newIndex, bool isAdd) - { - TimerChangeEntry e = null; - - lock (m_InstancePool) - { - if (m_InstancePool.Count > 0) - { - e = m_InstancePool.Dequeue(); - } - } - - if (e != null) - { - e.m_Timer = t; - e.m_NewIndex = newIndex; - e.m_IsAdd = isAdd; - } - else - { - e = new TimerChangeEntry(t, newIndex, isAdd); - } - - return e; - } - } - } } } diff --git a/Projects/UOContent/Accounting/Account.cs b/Projects/UOContent/Accounting/Account.cs index 38ea02578..918d7ffaa 100644 --- a/Projects/UOContent/Accounting/Account.cs +++ b/Projects/UOContent/Accounting/Account.cs @@ -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() diff --git a/Projects/UOContent/Engines/CannedEvil/CannedEvilTimer.cs b/Projects/UOContent/Engines/CannedEvil/CannedEvilTimer.cs index a708b5969..643a1c2b4 100644 --- a/Projects/UOContent/Engines/CannedEvil/CannedEvilTimer.cs +++ b/Projects/UOContent/Engines/CannedEvil/CannedEvilTimer.cs @@ -61,7 +61,6 @@ namespace Server.Engines.CannedEvil public CannedEvilTimer() : base(TimeSpan.Zero, TimeSpan.FromMinutes(1.0)) { - Priority = TimerPriority.OneMinute; _sliceTime = Core.Now; } diff --git a/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs b/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs index 880682c33..8adcfea1f 100644 --- a/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs +++ b/Projects/UOContent/Engines/ConPVP/Games/BombingRun.cs @@ -798,7 +798,6 @@ namespace Server.Engines.ConPVP { m_Bomb = bomb; m_Count = 0; - Priority = TimerPriority.FiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Engines/ConPVP/Games/KingOfTheHill.cs b/Projects/UOContent/Engines/ConPVP/Games/KingOfTheHill.cs index db04fbd1e..fbfbfe879 100644 --- a/Projects/UOContent/Engines/ConPVP/Games/KingOfTheHill.cs +++ b/Projects/UOContent/Engines/ConPVP/Games/KingOfTheHill.cs @@ -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; } diff --git a/Projects/UOContent/Engines/Help/StuckMenu.cs b/Projects/UOContent/Engines/Help/StuckMenu.cs index 069605537..130af5d44 100644 --- a/Projects/UOContent/Engines/Help/StuckMenu.cs +++ b/Projects/UOContent/Engines/Help/StuckMenu.cs @@ -271,7 +271,6 @@ namespace Server.Menus.Questions TimeSpan.FromSeconds(1.0) ) { - Priority = TimerPriority.TwoFiftyMS; m_Mobile = mobile; m_Destination = destination; diff --git a/Projects/UOContent/Engines/Khaldun/RaisableItem.cs b/Projects/UOContent/Engines/Khaldun/RaisableItem.cs index 33e1635ff..542e9bb3b 100644 --- a/Projects/UOContent/Engines/Khaldun/RaisableItem.cs +++ b/Projects/UOContent/Engines/Khaldun/RaisableItem.cs @@ -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; } diff --git a/Projects/UOContent/Engines/Khaldun/RaiseSwitch.cs b/Projects/UOContent/Engines/Khaldun/RaiseSwitch.cs index f407d160c..a22f6fb76 100644 --- a/Projects/UOContent/Engines/Khaldun/RaiseSwitch.cs +++ b/Projects/UOContent/Engines/Khaldun/RaiseSwitch.cs @@ -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() diff --git a/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs b/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs index cef40714d..4e75a1f2a 100644 --- a/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs +++ b/Projects/UOContent/Engines/Plants/MiscItems/GreenThorns.cs @@ -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() diff --git a/Projects/UOContent/Engines/Quests/Dark Tides/Items/KronusScroll.cs b/Projects/UOContent/Engines/Quests/Dark Tides/Items/KronusScroll.cs index 804ee8976..c27a0be0d 100644 --- a/Projects/UOContent/Engines/Quests/Dark Tides/Items/KronusScroll.cs +++ b/Projects/UOContent/Engines/Quests/Dark Tides/Items/KronusScroll.cs @@ -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; diff --git a/Projects/UOContent/Engines/Quests/Dark Tides/Mobiles/SummonedPaladin.cs b/Projects/UOContent/Engines/Quests/Dark Tides/Mobiles/SummonedPaladin.cs index 03d4e3975..78ef2f36f 100644 --- a/Projects/UOContent/Engines/Quests/Dark Tides/Mobiles/SummonedPaladin.cs +++ b/Projects/UOContent/Engines/Quests/Dark Tides/Mobiles/SummonedPaladin.cs @@ -172,7 +172,6 @@ namespace Server.Engines.Quests.Necro public SummonTimer(PlayerMobile player) : base(TimeSpan.FromSeconds(4.0)) { - Priority = TimerPriority.FiftyMS; m_Player = player; } diff --git a/Projects/UOContent/Engines/Quests/Witch Apprentice/Items/HagStew.cs b/Projects/UOContent/Engines/Quests/Witch Apprentice/Items/HagStew.cs index 5ca45af4a..87448cfe1 100644 --- a/Projects/UOContent/Engines/Quests/Witch Apprentice/Items/HagStew.cs +++ b/Projects/UOContent/Engines/Quests/Witch Apprentice/Items/HagStew.cs @@ -57,7 +57,6 @@ namespace Server.Items public ShowStew(AddonComponent ac) : base(TimeSpan.FromSeconds(30)) { stew = ac; - Priority = TimerPriority.OneSecond; } protected override void OnTick() diff --git a/Projects/UOContent/Engines/Spawners/BaseSpawner.cs b/Projects/UOContent/Engines/Spawners/BaseSpawner.cs index 4917f04ca..7a62c4578 100644 --- a/Projects/UOContent/Engines/Spawners/BaseSpawner.cs +++ b/Projects/UOContent/Engines/Spawners/BaseSpawner.cs @@ -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() { diff --git a/Projects/UOContent/Items/Addons/ElvenSpinningwheelEastAddon.cs b/Projects/UOContent/Items/Addons/ElvenSpinningwheelEastAddon.cs index 474cd199f..16220e475 100644 --- a/Projects/UOContent/Items/Addons/ElvenSpinningwheelEastAddon.cs +++ b/Projects/UOContent/Items/Addons/ElvenSpinningwheelEastAddon.cs @@ -101,7 +101,6 @@ namespace Server.Items m_Callback = callback; m_From = from; m_Hue = hue; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Items/Addons/ElvenSpinningwheelSouthAddon.cs b/Projects/UOContent/Items/Addons/ElvenSpinningwheelSouthAddon.cs index 21aa88ea5..29060eb2c 100644 --- a/Projects/UOContent/Items/Addons/ElvenSpinningwheelSouthAddon.cs +++ b/Projects/UOContent/Items/Addons/ElvenSpinningwheelSouthAddon.cs @@ -103,7 +103,6 @@ namespace Server.Items m_Callback = callback; m_From = from; m_Hue = hue; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Items/Addons/PickpocketDips.cs b/Projects/UOContent/Items/Addons/PickpocketDips.cs index 85436e9c7..d7a3c6f84 100644 --- a/Projects/UOContent/Items/Addons/PickpocketDips.cs +++ b/Projects/UOContent/Items/Addons/PickpocketDips.cs @@ -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() diff --git a/Projects/UOContent/Items/Addons/SpinningwheelEastAddon.cs b/Projects/UOContent/Items/Addons/SpinningwheelEastAddon.cs index afdde123d..bf26d566a 100644 --- a/Projects/UOContent/Items/Addons/SpinningwheelEastAddon.cs +++ b/Projects/UOContent/Items/Addons/SpinningwheelEastAddon.cs @@ -111,7 +111,6 @@ namespace Server.Items m_Callback = callback; m_From = from; m_Hue = hue; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Items/Addons/SpinningwheelSouthAddon.cs b/Projects/UOContent/Items/Addons/SpinningwheelSouthAddon.cs index a6a23d515..d33983e6c 100644 --- a/Projects/UOContent/Items/Addons/SpinningwheelSouthAddon.cs +++ b/Projects/UOContent/Items/Addons/SpinningwheelSouthAddon.cs @@ -103,7 +103,6 @@ namespace Server.Items m_Callback = callback; m_From = from; m_Hue = hue; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Items/Addons/TrainingDummies.cs b/Projects/UOContent/Items/Addons/TrainingDummies.cs index 2d3597e8f..25a6c24e4 100644 --- a/Projects/UOContent/Items/Addons/TrainingDummies.cs +++ b/Projects/UOContent/Items/Addons/TrainingDummies.cs @@ -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() diff --git a/Projects/UOContent/Items/Clothing/OuterTorso.cs b/Projects/UOContent/Items/Clothing/OuterTorso.cs index 95a021a79..7125f219d 100644 --- a/Projects/UOContent/Items/Clothing/OuterTorso.cs +++ b/Projects/UOContent/Items/Clothing/OuterTorso.cs @@ -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() diff --git a/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs b/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs index c9288c4a5..1992b7c68 100644 --- a/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs +++ b/Projects/UOContent/Items/Construction/Doors/BaseDoor.cs @@ -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; } diff --git a/Projects/UOContent/Items/Containers/BaseTreasureChest.cs b/Projects/UOContent/Items/Containers/BaseTreasureChest.cs index 12023115a..8d5276940 100644 --- a/Projects/UOContent/Items/Containers/BaseTreasureChest.cs +++ b/Projects/UOContent/Items/Containers/BaseTreasureChest.cs @@ -203,7 +203,6 @@ namespace Server.Items ) { m_Chest = chest; - Priority = TimerPriority.OneMinute; } protected override void OnTick() diff --git a/Projects/UOContent/Items/Containers/FurnitureContainer.cs b/Projects/UOContent/Items/Containers/FurnitureContainer.cs index 3da897893..406d738cd 100644 --- a/Projects/UOContent/Items/Containers/FurnitureContainer.cs +++ b/Projects/UOContent/Items/Containers/FurnitureContainer.cs @@ -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; diff --git a/Projects/UOContent/Items/Containers/TreasureMapChest.cs b/Projects/UOContent/Items/Containers/TreasureMapChest.cs index ac84b2111..1bf908694 100644 --- a/Projects/UOContent/Items/Containers/TreasureMapChest.cs +++ b/Projects/UOContent/Items/Containers/TreasureMapChest.cs @@ -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() diff --git a/Projects/UOContent/Items/Deeds/VendorRentalContract.cs b/Projects/UOContent/Items/Deeds/VendorRentalContract.cs index 03f3eb442..37969839b 100644 --- a/Projects/UOContent/Items/Deeds/VendorRentalContract.cs +++ b/Projects/UOContent/Items/Deeds/VendorRentalContract.cs @@ -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() diff --git a/Projects/UOContent/Items/Food/Beverage.cs b/Projects/UOContent/Items/Food/Beverage.cs index 15e14a14d..b3c02eb83 100644 --- a/Projects/UOContent/Items/Food/Beverage.cs +++ b/Projects/UOContent/Items/Food/Beverage.cs @@ -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() diff --git a/Projects/UOContent/Items/Lights/BaseLight.cs b/Projects/UOContent/Items/Lights/BaseLight.cs index 56213748a..eb83b594b 100644 --- a/Projects/UOContent/Items/Lights/BaseLight.cs +++ b/Projects/UOContent/Items/Lights/BaseLight.cs @@ -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() diff --git a/Projects/UOContent/Items/Maps/TreasureMap.cs b/Projects/UOContent/Items/Maps/TreasureMap.cs index 36307af81..229d40d7a 100644 --- a/Projects/UOContent/Items/Maps/TreasureMap.cs +++ b/Projects/UOContent/Items/Maps/TreasureMap.cs @@ -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() diff --git a/Projects/UOContent/Items/Misc/Blood.cs b/Projects/UOContent/Items/Misc/Blood.cs index e551fc5e6..6ec171d2c 100644 --- a/Projects/UOContent/Items/Misc/Blood.cs +++ b/Projects/UOContent/Items/Misc/Blood.cs @@ -42,7 +42,6 @@ namespace Server.Items public InternalTimer(Item blood) : base(TimeSpan.FromSeconds(5.0)) { - Priority = TimerPriority.OneSecond; m_Blood = blood; } diff --git a/Projects/UOContent/Items/Misc/Corpses/Corpse.cs b/Projects/UOContent/Items/Misc/Corpses/Corpse.cs index 3c69a01bf..8fe8bc287 100644 --- a/Projects/UOContent/Items/Misc/Corpses/Corpse.cs +++ b/Projects/UOContent/Items/Misc/Corpses/Corpse.cs @@ -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() diff --git a/Projects/UOContent/Items/Misc/Corpses/DecayedCorpse.cs b/Projects/UOContent/Items/Misc/Corpses/DecayedCorpse.cs index 65204f802..9eb2da8ac 100644 --- a/Projects/UOContent/Items/Misc/Corpses/DecayedCorpse.cs +++ b/Projects/UOContent/Items/Misc/Corpses/DecayedCorpse.cs @@ -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() diff --git a/Projects/UOContent/Items/Misc/EffectItem.cs b/Projects/UOContent/Items/Misc/EffectItem.cs index a268e8248..21425c8fa 100644 --- a/Projects/UOContent/Items/Misc/EffectItem.cs +++ b/Projects/UOContent/Items/Misc/EffectItem.cs @@ -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() diff --git a/Projects/UOContent/Items/Misc/MoonstoneGate.cs b/Projects/UOContent/Items/Misc/MoonstoneGate.cs index a7ca5892b..3bd1d75f2 100644 --- a/Projects/UOContent/Items/Misc/MoonstoneGate.cs +++ b/Projects/UOContent/Items/Misc/MoonstoneGate.cs @@ -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() diff --git a/Projects/UOContent/Items/Misc/PowerGenerator.cs b/Projects/UOContent/Items/Misc/PowerGenerator.cs index 1438234bf..8474fef44 100644 --- a/Projects/UOContent/Items/Misc/PowerGenerator.cs +++ b/Projects/UOContent/Items/Misc/PowerGenerator.cs @@ -550,8 +550,6 @@ namespace Server.Items m_Panel = panel; m_To = to; m_Step = 0; - - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Items/Misc/TrashBarrel.cs b/Projects/UOContent/Items/Misc/TrashBarrel.cs index b22cd34c1..43a9fc9eb 100644 --- a/Projects/UOContent/Items/Misc/TrashBarrel.cs +++ b/Projects/UOContent/Items/Misc/TrashBarrel.cs @@ -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() diff --git a/Projects/UOContent/Items/Misc/UnholyBone.cs b/Projects/UOContent/Items/Misc/UnholyBone.cs index 8e7698473..6178f6cd0 100644 --- a/Projects/UOContent/Items/Misc/UnholyBone.cs +++ b/Projects/UOContent/Items/Misc/UnholyBone.cs @@ -83,7 +83,6 @@ namespace Server.Items public SpawnTimer(Item item) : base(TimeSpan.FromSeconds(Utility.RandomMinMax(5, 10))) { - Priority = TimerPriority.FiftyMS; m_Item = item; } diff --git a/Projects/UOContent/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs b/Projects/UOContent/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs index a0ac49105..17bc2cef0 100644 --- a/Projects/UOContent/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs +++ b/Projects/UOContent/Items/Skill Items/Magical/Potions/Conflagration Potions/BaseConflagrationPotion.cs @@ -281,8 +281,6 @@ namespace Server.Items { m_Item = item; m_End = end; - - Priority = TimerPriority.FiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs b/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs index 03a205c69..058cfa1b1 100644 --- a/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs +++ b/Projects/UOContent/Items/Skill Items/Misc/Bandage.cs @@ -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() diff --git a/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs b/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs index d8f690d4b..07b28289d 100644 --- a/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs +++ b/Projects/UOContent/Items/Skill Items/Musical Instruments/BaseInstrument.cs @@ -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() diff --git a/Projects/UOContent/Items/Skill Items/Thief/DisguiseKit.cs b/Projects/UOContent/Items/Skill Items/Thief/DisguiseKit.cs index 7903bb9b4..ff86719d6 100644 --- a/Projects/UOContent/Items/Skill Items/Thief/DisguiseKit.cs +++ b/Projects/UOContent/Items/Skill Items/Thief/DisguiseKit.cs @@ -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() diff --git a/Projects/UOContent/Items/Skill Items/Thief/LockPick.cs b/Projects/UOContent/Items/Skill Items/Thief/LockPick.cs index 67b10b075..e72c7f7cb 100644 --- a/Projects/UOContent/Items/Skill Items/Thief/LockPick.cs +++ b/Projects/UOContent/Items/Skill Items/Thief/LockPick.cs @@ -100,7 +100,6 @@ namespace Server.Items m_From = from; m_Item = item; m_Lockpick = lockpick; - Priority = TimerPriority.TwoFiftyMS; } protected void BrokeLockPickTest() diff --git a/Projects/UOContent/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs b/Projects/UOContent/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs index 0e10092af..ad870ab43 100644 --- a/Projects/UOContent/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs +++ b/Projects/UOContent/Items/Special/Evil Home Decor Collection/AwesomeDisturbingPortrait.cs @@ -145,8 +145,6 @@ namespace Server.Items ) { m_Component = c; - - Priority = TimerPriority.OneMinute; } protected override void OnTick() diff --git a/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs b/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs index 5b2a75a5d..33bb6fd86 100644 --- a/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs +++ b/Projects/UOContent/Items/Special/Gifts/RoseOfTrinsic.cs @@ -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() diff --git a/Projects/UOContent/Items/Special/Holiday/HolidayFoods.cs b/Projects/UOContent/Items/Special/Holiday/HolidayFoods.cs index fbb3ddbc8..499240523 100644 --- a/Projects/UOContent/Items/Special/Holiday/HolidayFoods.cs +++ b/Projects/UOContent/Items/Special/Holiday/HolidayFoods.cs @@ -67,7 +67,6 @@ namespace Server.Items : base(TimeSpan.FromSeconds(30), TimeSpan.FromSeconds(30)) { Eater = eater; - Priority = TimerPriority.FiveSeconds; Start(); } diff --git a/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs b/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs index 122ac2c1c..b29666bfb 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/BleedAttack.cs @@ -115,7 +115,6 @@ namespace Server.Items { m_From = from; m_Mobile = m; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Items/Weapons/Abilities/Block.cs b/Projects/UOContent/Items/Weapons/Abilities/Block.cs index 02a3b50cc..811d71dd6 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/Block.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/Block.cs @@ -80,7 +80,6 @@ namespace Server.Items { m_Bonus = bonus; m_Mobile = m; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Items/Weapons/Abilities/DualWield.cs b/Projects/UOContent/Items/Weapons/Abilities/DualWield.cs index 718ea8bd4..76d2597ff 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/DualWield.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/DualWield.cs @@ -60,7 +60,6 @@ namespace Server.Items { m_Owner = owner; BonusSwingSpeed = bonusSwingSpeed; - Priority = TimerPriority.FiftyMS; } public int BonusSwingSpeed { get; } diff --git a/Projects/UOContent/Items/Weapons/Abilities/Feint.cs b/Projects/UOContent/Items/Weapons/Abilities/Feint.cs index 338b3ed84..70f32fc43 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/Feint.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/Feint.cs @@ -65,7 +65,6 @@ namespace Server.Items { m_Defender = defender; SwingSpeedReduction = swingSpeedReduction; - Priority = TimerPriority.FiftyMS; } public int SwingSpeedReduction { get; } diff --git a/Projects/UOContent/Items/Weapons/Abilities/FrenziedWhirlwind.cs b/Projects/UOContent/Items/Weapons/Abilities/FrenziedWhirlwind.cs index c36ff89b2..974a49f56 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/FrenziedWhirlwind.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/FrenziedWhirlwind.cs @@ -110,8 +110,6 @@ namespace Server.Items m_DamageRemaining = totalDamage; DamagePerTick = (double)totalDamage / 12 + 0.01; - - Priority = TimerPriority.TwentyFiveMS; } protected override void OnTick() diff --git a/Projects/UOContent/Items/Weapons/Abilities/TalonStrike.cs b/Projects/UOContent/Items/Weapons/Abilities/TalonStrike.cs index 51b32dad3..9741fdcb6 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/TalonStrike.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/TalonStrike.cs @@ -65,7 +65,6 @@ namespace Server.Items { m_Defender = defender; m_DamageRemaining = totalDamage; - Priority = TimerPriority.TwentyFiveMS; DamagePerTick = (double)totalDamage / 12 + .01; } diff --git a/Projects/UOContent/Items/Weapons/Abilities/WeaponAbility.cs b/Projects/UOContent/Items/Weapons/Abilities/WeaponAbility.cs index 81d142653..393634e50 100644 --- a/Projects/UOContent/Items/Weapons/Abilities/WeaponAbility.cs +++ b/Projects/UOContent/Items/Weapons/Abilities/WeaponAbility.cs @@ -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() diff --git a/Projects/UOContent/Items/Weapons/Fists.cs b/Projects/UOContent/Items/Weapons/Fists.cs index c3418cfcb..05283b1f5 100644 --- a/Projects/UOContent/Items/Weapons/Fists.cs +++ b/Projects/UOContent/Items/Weapons/Fists.cs @@ -294,8 +294,6 @@ namespace Server.Items { m_Mobile = m; - Priority = TimerPriority.TwoFiftyMS; - m_Mobile.BeginAction(); } diff --git a/Projects/UOContent/Items/Weapons/HitLower.cs b/Projects/UOContent/Items/Weapons/HitLower.cs index a06379cf2..8ac57f4be 100644 --- a/Projects/UOContent/Items/Weapons/HitLower.cs +++ b/Projects/UOContent/Items/Weapons/HitLower.cs @@ -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() diff --git a/Projects/UOContent/Misc/AutoRestart.cs b/Projects/UOContent/Misc/AutoRestart.cs index 7c8bebe2c..6c46c4d99 100644 --- a/Projects/UOContent/Misc/AutoRestart.cs +++ b/Projects/UOContent/Misc/AutoRestart.cs @@ -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) diff --git a/Projects/UOContent/Misc/AutoSave.cs b/Projects/UOContent/Misc/AutoSave.cs index 8c71c1981..1e35d43d9 100644 --- a/Projects/UOContent/Misc/AutoSave.cs +++ b/Projects/UOContent/Misc/AutoSave.cs @@ -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; diff --git a/Projects/UOContent/Misc/FoodDecay.cs b/Projects/UOContent/Misc/FoodDecay.cs index 770666802..7174db5dd 100644 --- a/Projects/UOContent/Misc/FoodDecay.cs +++ b/Projects/UOContent/Misc/FoodDecay.cs @@ -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() { diff --git a/Projects/UOContent/Misc/Guild.cs b/Projects/UOContent/Misc/Guild.cs index b14275b41..908e6361d 100644 --- a/Projects/UOContent/Misc/Guild.cs +++ b/Projects/UOContent/Misc/Guild.cs @@ -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() { diff --git a/Projects/UOContent/Misc/LightCycle.cs b/Projects/UOContent/Misc/LightCycle.cs index 707200c24..88f6aa5ff 100644 --- a/Projects/UOContent/Misc/LightCycle.cs +++ b/Projects/UOContent/Misc/LightCycle.cs @@ -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() diff --git a/Projects/UOContent/Misc/WebStatus.cs b/Projects/UOContent/Misc/WebStatus.cs index 55e4ecd50..0ca406f9b 100644 --- a/Projects/UOContent/Misc/WebStatus.cs +++ b/Projects/UOContent/Misc/WebStatus.cs @@ -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() { diff --git a/Projects/UOContent/Mobiles/AI/BaseAI.cs b/Projects/UOContent/Mobiles/AI/BaseAI.cs index 7ca244892..e24dcc4d3 100644 --- a/Projects/UOContent/Mobiles/AI/BaseAI.cs +++ b/Projects/UOContent/Mobiles/AI/BaseAI.cs @@ -3022,8 +3022,6 @@ namespace Server.Mobiles m_Owner = owner; m_Owner.m_NextDetectHidden = Core.TickCount; - - Priority = TimerPriority.FiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs b/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs index 2b239e194..25cb49cb8 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/Hiryu.cs @@ -262,7 +262,6 @@ namespace Server.Mobiles { m_Mobile = m; m_Mod = mod; - Priority = TimerPriority.TwoFiftyMS; } public void DoExpire() diff --git a/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs b/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs index 5b8bf098c..54a9c1f21 100644 --- a/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs +++ b/Projects/UOContent/Mobiles/Animals/Mounts/LesserHiryu.cs @@ -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() diff --git a/Projects/UOContent/Mobiles/BaseCreature.cs b/Projects/UOContent/Mobiles/BaseCreature.cs index ebcd1ed2f..8275289bb 100644 --- a/Projects/UOContent/Mobiles/BaseCreature.cs +++ b/Projects/UOContent/Mobiles/BaseCreature.cs @@ -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() diff --git a/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/OrcBomber.cs b/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/OrcBomber.cs index 6c6e4a342..c55426b2f 100644 --- a/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/OrcBomber.cs +++ b/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/OrcBomber.cs @@ -155,7 +155,6 @@ namespace Server.Mobiles { m_Mobile = m; m_From = from; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/ShadowFiend.cs b/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/ShadowFiend.cs index 635b9f15e..1003a2724 100644 --- a/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/ShadowFiend.cs +++ b/Projects/UOContent/Mobiles/Monsters/Humanoid/Melee/ShadowFiend.cs @@ -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() diff --git a/Projects/UOContent/Mobiles/Monsters/ML/Bedlam/LadyJennifyr.cs b/Projects/UOContent/Mobiles/Monsters/ML/Bedlam/LadyJennifyr.cs index d4d6cf0e7..92f402904 100644 --- a/Projects/UOContent/Mobiles/Monsters/ML/Bedlam/LadyJennifyr.cs +++ b/Projects/UOContent/Mobiles/Monsters/ML/Bedlam/LadyJennifyr.cs @@ -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() diff --git a/Projects/UOContent/Mobiles/Monsters/ML/Humanoid/Magic/FetidEssence.cs b/Projects/UOContent/Mobiles/Monsters/ML/Humanoid/Magic/FetidEssence.cs index fc7419898..d5fd88ad8 100644 --- a/Projects/UOContent/Mobiles/Monsters/ML/Humanoid/Magic/FetidEssence.cs +++ b/Projects/UOContent/Mobiles/Monsters/ML/Humanoid/Magic/FetidEssence.cs @@ -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; } - + }*/ } } diff --git a/Projects/UOContent/Mobiles/Monsters/ML/Twisted Weald/Swoop.cs b/Projects/UOContent/Mobiles/Monsters/ML/Twisted Weald/Swoop.cs index e542d6eae..bb78f3c18 100644 --- a/Projects/UOContent/Mobiles/Monsters/ML/Twisted Weald/Swoop.cs +++ b/Projects/UOContent/Mobiles/Monsters/ML/Twisted Weald/Swoop.cs @@ -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() diff --git a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/SandVortex.cs b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/SandVortex.cs index c3e320356..6674e685e 100644 --- a/Projects/UOContent/Mobiles/Monsters/Misc/Melee/SandVortex.cs +++ b/Projects/UOContent/Mobiles/Monsters/Misc/Melee/SandVortex.cs @@ -102,7 +102,6 @@ namespace Server.Mobiles { m_Mobile = m; m_From = from; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Mobiles/Monsters/SE/BakeKitsune.cs b/Projects/UOContent/Mobiles/Monsters/SE/BakeKitsune.cs index d0931c050..b509e7dbc 100644 --- a/Projects/UOContent/Mobiles/Monsters/SE/BakeKitsune.cs +++ b/Projects/UOContent/Mobiles/Monsters/SE/BakeKitsune.cs @@ -242,7 +242,6 @@ namespace Server.Mobiles { m_Mobile = m; m_From = from; - Priority = TimerPriority.TwoFiftyMS; } public void DoExpire() diff --git a/Projects/UOContent/Mobiles/Monsters/SE/FanDancer.cs b/Projects/UOContent/Mobiles/Monsters/SE/FanDancer.cs index 50fba7212..49b738f19 100644 --- a/Projects/UOContent/Mobiles/Monsters/SE/FanDancer.cs +++ b/Projects/UOContent/Mobiles/Monsters/SE/FanDancer.cs @@ -175,7 +175,6 @@ namespace Server.Mobiles { m_Mobile = m; m_Mod = mod; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Mobiles/Monsters/SE/Kappa.cs b/Projects/UOContent/Mobiles/Monsters/SE/Kappa.cs index 78690c29f..721937a1e 100644 --- a/Projects/UOContent/Mobiles/Monsters/SE/Kappa.cs +++ b/Projects/UOContent/Mobiles/Monsters/SE/Kappa.cs @@ -189,7 +189,6 @@ namespace Server.Mobiles { m_From = from; m_Mobile = m; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Mobiles/Monsters/SE/KazeKemono.cs b/Projects/UOContent/Mobiles/Monsters/SE/KazeKemono.cs index 39d2ee99c..05ebec43e 100644 --- a/Projects/UOContent/Mobiles/Monsters/SE/KazeKemono.cs +++ b/Projects/UOContent/Mobiles/Monsters/SE/KazeKemono.cs @@ -157,7 +157,6 @@ namespace Server.Mobiles m_Mobile = m; m_Mod = mod; m_Table = table; - Priority = TimerPriority.TwoFiftyMS; } public void DoExpire() diff --git a/Projects/UOContent/Mobiles/Monsters/SE/LadyOfTheSnow.cs b/Projects/UOContent/Mobiles/Monsters/SE/LadyOfTheSnow.cs index 894e141ac..cd3af17f3 100644 --- a/Projects/UOContent/Mobiles/Monsters/SE/LadyOfTheSnow.cs +++ b/Projects/UOContent/Mobiles/Monsters/SE/LadyOfTheSnow.cs @@ -131,7 +131,6 @@ namespace Server.Mobiles { m_Mobile = m; m_From = from; - Priority = TimerPriority.TwoFiftyMS; } public void DoExpire() diff --git a/Projects/UOContent/Mobiles/Monsters/SE/RaiJu.cs b/Projects/UOContent/Mobiles/Monsters/SE/RaiJu.cs index 091f960c1..b0d92e70c 100644 --- a/Projects/UOContent/Mobiles/Monsters/SE/RaiJu.cs +++ b/Projects/UOContent/Mobiles/Monsters/SE/RaiJu.cs @@ -107,7 +107,6 @@ namespace Server.Mobiles public ExpireTimer(Mobile m, TimeSpan delay) : base(delay) { m_Mobile = m; - Priority = TimerPriority.TwoFiftyMS; } public void DoExpire() diff --git a/Projects/UOContent/Mobiles/Monsters/SE/RuneBeetle.cs b/Projects/UOContent/Mobiles/Monsters/SE/RuneBeetle.cs index 8bb8560d1..b705c518f 100644 --- a/Projects/UOContent/Mobiles/Monsters/SE/RuneBeetle.cs +++ b/Projects/UOContent/Mobiles/Monsters/SE/RuneBeetle.cs @@ -248,7 +248,6 @@ namespace Server.Mobiles { m_Mobile = m; m_Mods = mods; - Priority = TimerPriority.TwoFiftyMS; } public void DoExpire() diff --git a/Projects/UOContent/Mobiles/Monsters/SE/TsukiWolf.cs b/Projects/UOContent/Mobiles/Monsters/SE/TsukiWolf.cs index 3117512c9..54ed25ea7 100644 --- a/Projects/UOContent/Mobiles/Monsters/SE/TsukiWolf.cs +++ b/Projects/UOContent/Mobiles/Monsters/SE/TsukiWolf.cs @@ -146,7 +146,6 @@ namespace Server.Mobiles { m_Mobile = m; m_From = from; - Priority = TimerPriority.TwoFiftyMS; } public void DoExpire() diff --git a/Projects/UOContent/Mobiles/Special/Barracoon.cs b/Projects/UOContent/Mobiles/Special/Barracoon.cs index caa77fa8c..71cba9da7 100644 --- a/Projects/UOContent/Mobiles/Special/Barracoon.cs +++ b/Projects/UOContent/Mobiles/Special/Barracoon.cs @@ -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() diff --git a/Projects/UOContent/Mobiles/Special/Dummy.cs b/Projects/UOContent/Mobiles/Special/Dummy.cs index 9a45f9e5b..c56d03f61 100644 --- a/Projects/UOContent/Mobiles/Special/Dummy.cs +++ b/Projects/UOContent/Mobiles/Special/Dummy.cs @@ -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() diff --git a/Projects/UOContent/Mobiles/Special/Harrower.cs b/Projects/UOContent/Mobiles/Special/Harrower.cs index 3f03f66b7..d3151ff41 100644 --- a/Projects/UOContent/Mobiles/Special/Harrower.cs +++ b/Projects/UOContent/Mobiles/Special/Harrower.cs @@ -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; diff --git a/Projects/UOContent/Mobiles/Special/HarrowerTentacles.cs b/Projects/UOContent/Mobiles/Special/HarrowerTentacles.cs index 72716f8da..c86bf35e2 100644 --- a/Projects/UOContent/Mobiles/Special/HarrowerTentacles.cs +++ b/Projects/UOContent/Mobiles/Special/HarrowerTentacles.cs @@ -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() diff --git a/Projects/UOContent/Mobiles/Special/Paragon.cs b/Projects/UOContent/Mobiles/Special/Paragon.cs index 13b5a0c6a..784c32d61 100644 --- a/Projects/UOContent/Mobiles/Special/Paragon.cs +++ b/Projects/UOContent/Mobiles/Special/Paragon.cs @@ -236,7 +236,6 @@ namespace Server.Mobiles public ParagonStamRegen(Mobile m) : base(FastRegenRate, FastRegenRate) { - Priority = TimerPriority.FiftyMS; m_Owner = m as BaseCreature; } diff --git a/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs b/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs index 6c3e06a11..e1db5c9c5 100644 --- a/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs +++ b/Projects/UOContent/Mobiles/Townfolk/BaseEscortable.cs @@ -708,8 +708,6 @@ namespace Server.Mobiles : base(delay) { m_Mobile = m; - - Priority = TimerPriority.OneSecond; } protected override void OnTick() diff --git a/Projects/UOContent/Mobiles/Vendors/PlayerVendor.cs b/Projects/UOContent/Mobiles/Vendors/PlayerVendor.cs index 99f2c8993..f8b9879cc 100644 --- a/Projects/UOContent/Mobiles/Vendors/PlayerVendor.cs +++ b/Projects/UOContent/Mobiles/Vendors/PlayerVendor.cs @@ -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() diff --git a/Projects/UOContent/Mobiles/Vendors/RentedVendor.cs b/Projects/UOContent/Mobiles/Vendors/RentedVendor.cs index 08c3f6244..10ede3f19 100644 --- a/Projects/UOContent/Mobiles/Vendors/RentedVendor.cs +++ b/Projects/UOContent/Mobiles/Vendors/RentedVendor.cs @@ -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() diff --git a/Projects/UOContent/Mobiles/Vendors/VendorInventory.cs b/Projects/UOContent/Mobiles/Vendors/VendorInventory.cs index 528f8bf31..3ca3ec6c0 100644 --- a/Projects/UOContent/Mobiles/Vendors/VendorInventory.cs +++ b/Projects/UOContent/Mobiles/Vendors/VendorInventory.cs @@ -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() diff --git a/Projects/UOContent/Multis/Boats/BaseBoat.cs b/Projects/UOContent/Multis/Boats/BaseBoat.cs index a722b7999..d8491528f 100644 --- a/Projects/UOContent/Multis/Boats/BaseBoat.cs +++ b/Projects/UOContent/Multis/Boats/BaseBoat.cs @@ -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() diff --git a/Projects/UOContent/Multis/Boats/Plank.cs b/Projects/UOContent/Multis/Boats/Plank.cs index 82e7b7f5b..e6c0811e4 100644 --- a/Projects/UOContent/Multis/Boats/Plank.cs +++ b/Projects/UOContent/Multis/Boats/Plank.cs @@ -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() diff --git a/Projects/UOContent/Multis/Houses/MovingCrate.cs b/Projects/UOContent/Multis/Houses/MovingCrate.cs index 819ea013b..2a14a239c 100644 --- a/Projects/UOContent/Multis/Houses/MovingCrate.cs +++ b/Projects/UOContent/Multis/Houses/MovingCrate.cs @@ -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() diff --git a/Projects/UOContent/Multis/Houses/PreviewHouse.cs b/Projects/UOContent/Multis/Houses/PreviewHouse.cs index 4d596ac36..39c69c0ea 100644 --- a/Projects/UOContent/Multis/Houses/PreviewHouse.cs +++ b/Projects/UOContent/Multis/Houses/PreviewHouse.cs @@ -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() diff --git a/Projects/UOContent/Regions/GuardedRegion.cs b/Projects/UOContent/Regions/GuardedRegion.cs index 600acebb3..09af983db 100644 --- a/Projects/UOContent/Regions/GuardedRegion.cs +++ b/Projects/UOContent/Regions/GuardedRegion.cs @@ -369,7 +369,6 @@ namespace Server.Regions public GuardTimer(Mobile m, Dictionary table) : base(TimeSpan.FromSeconds(15.0)) { - Priority = TimerPriority.TwoFiftyMS; m_Mobile = m; m_Table = table; diff --git a/Projects/UOContent/Skills/AnimalTaming.cs b/Projects/UOContent/Skills/AnimalTaming.cs index 343a66508..2c9ebc06d 100644 --- a/Projects/UOContent/Skills/AnimalTaming.cs +++ b/Projects/UOContent/Skills/AnimalTaming.cs @@ -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() diff --git a/Projects/UOContent/Skills/Begging.cs b/Projects/UOContent/Skills/Begging.cs index f694fb12d..21014ab4c 100644 --- a/Projects/UOContent/Skills/Begging.cs +++ b/Projects/UOContent/Skills/Begging.cs @@ -106,7 +106,6 @@ namespace Server.SkillHandlers { m_From = from; m_Target = target; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Skills/Poisoning.cs b/Projects/UOContent/Skills/Poisoning.cs index 1b074cb82..1c8d0ead2 100644 --- a/Projects/UOContent/Skills/Poisoning.cs +++ b/Projects/UOContent/Skills/Poisoning.cs @@ -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() diff --git a/Projects/UOContent/Skills/SpiritSpeak.cs b/Projects/UOContent/Skills/SpiritSpeak.cs index c7d9d9f8b..7bc04ddab 100644 --- a/Projects/UOContent/Skills/SpiritSpeak.cs +++ b/Projects/UOContent/Skills/SpiritSpeak.cs @@ -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() diff --git a/Projects/UOContent/Spells/Base/SpecialMove.cs b/Projects/UOContent/Spells/Base/SpecialMove.cs index 9e36a638c..25fbc38e7 100644 --- a/Projects/UOContent/Spells/Base/SpecialMove.cs +++ b/Projects/UOContent/Spells/Base/SpecialMove.cs @@ -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() diff --git a/Projects/UOContent/Spells/Base/Spell.cs b/Projects/UOContent/Spells/Base/Spell.cs index 261dea6f1..ee84ee119 100644 --- a/Projects/UOContent/Spells/Base/Spell.cs +++ b/Projects/UOContent/Spells/Base/Spell.cs @@ -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() diff --git a/Projects/UOContent/Spells/Base/SpellHelper.cs b/Projects/UOContent/Spells/Base/SpellHelper.cs index deac7860d..341134029 100644 --- a/Projects/UOContent/Spells/Base/SpellHelper.cs +++ b/Projects/UOContent/Spells/Base/SpellHelper.cs @@ -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() diff --git a/Projects/UOContent/Spells/Bushido/Confidence.cs b/Projects/UOContent/Spells/Bushido/Confidence.cs index 02503d836..eeba44bc2 100644 --- a/Projects/UOContent/Spells/Bushido/Confidence.cs +++ b/Projects/UOContent/Spells/Bushido/Confidence.cs @@ -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() diff --git a/Projects/UOContent/Spells/Bushido/Evasion.cs b/Projects/UOContent/Spells/Bushido/Evasion.cs index 2b27533ac..0220fc9d8 100644 --- a/Projects/UOContent/Spells/Bushido/Evasion.cs +++ b/Projects/UOContent/Spells/Bushido/Evasion.cs @@ -231,7 +231,6 @@ namespace Server.Spells.Bushido : base(delay) { m_Mobile = m; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Spells/Chivalry/ConsecrateWeapon.cs b/Projects/UOContent/Spells/Chivalry/ConsecrateWeapon.cs index 66127da2e..def2f58b2 100644 --- a/Projects/UOContent/Spells/Chivalry/ConsecrateWeapon.cs +++ b/Projects/UOContent/Spells/Chivalry/ConsecrateWeapon.cs @@ -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() diff --git a/Projects/UOContent/Spells/Fifth/PoisonField.cs b/Projects/UOContent/Spells/Fifth/PoisonField.cs index 29bbb7509..e70a7cbce 100644 --- a/Projects/UOContent/Spells/Fifth/PoisonField.cs +++ b/Projects/UOContent/Spells/Fifth/PoisonField.cs @@ -233,8 +233,6 @@ namespace Server.Spells.Fifth m_Item = item; m_InLOS = inLOS; m_CanFit = canFit; - - Priority = TimerPriority.FiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Spells/Fourth/ArchProtection.cs b/Projects/UOContent/Spells/Fourth/ArchProtection.cs index a60455db3..874fd3c2f 100644 --- a/Projects/UOContent/Spells/Fourth/ArchProtection.cs +++ b/Projects/UOContent/Spells/Fourth/ArchProtection.cs @@ -125,7 +125,6 @@ namespace Server.Spells.Fourth } Delay = TimeSpan.FromSeconds(time); - Priority = TimerPriority.OneSecond; m_Owner = target; } diff --git a/Projects/UOContent/Spells/Fourth/FireField.cs b/Projects/UOContent/Spells/Fourth/FireField.cs index 0889ed104..e75149664 100644 --- a/Projects/UOContent/Spells/Fourth/FireField.cs +++ b/Projects/UOContent/Spells/Fourth/FireField.cs @@ -229,8 +229,6 @@ namespace Server.Spells.Fourth m_Item = item; m_InLOS = inLOS; m_CanFit = canFit; - - Priority = TimerPriority.FiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Spells/Necromancy/BloodOathSpell.cs b/Projects/UOContent/Spells/Necromancy/BloodOathSpell.cs index c1f6fb684..d68d5c997 100644 --- a/Projects/UOContent/Spells/Necromancy/BloodOathSpell.cs +++ b/Projects/UOContent/Spells/Necromancy/BloodOathSpell.cs @@ -125,8 +125,6 @@ namespace Server.Spells.Necromancy m_Caster = caster; m_Target = target; m_End = Core.Now + delay; - - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Spells/Necromancy/CurseWeapon.cs b/Projects/UOContent/Spells/Necromancy/CurseWeapon.cs index 3061aedc5..eb1ec7582 100644 --- a/Projects/UOContent/Spells/Necromancy/CurseWeapon.cs +++ b/Projects/UOContent/Spells/Necromancy/CurseWeapon.cs @@ -69,7 +69,6 @@ namespace Server.Spells.Necromancy public ExpireTimer(BaseWeapon weapon, TimeSpan delay) : base(delay) { m_Weapon = weapon; - Priority = TimerPriority.OneSecond; } protected override void OnTick() @@ -87,7 +86,6 @@ namespace Server.Spells.Necromancy public SoundEffectTimer(Mobile m) : base(TimeSpan.FromSeconds(0.75)) { m_Mobile = m; - Priority = TimerPriority.FiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Spells/Necromancy/MindRot.cs b/Projects/UOContent/Spells/Necromancy/MindRot.cs index f394b087e..6c2b8240f 100644 --- a/Projects/UOContent/Spells/Necromancy/MindRot.cs +++ b/Projects/UOContent/Spells/Necromancy/MindRot.cs @@ -120,7 +120,6 @@ namespace Server.Spells.Necromancy { m_Target = target; m_End = Core.Now + delay; - Priority = TimerPriority.TwoFiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Spells/Necromancy/PainSpike.cs b/Projects/UOContent/Spells/Necromancy/PainSpike.cs index 7687e9d1f..7a8646016 100644 --- a/Projects/UOContent/Spells/Necromancy/PainSpike.cs +++ b/Projects/UOContent/Spells/Necromancy/PainSpike.cs @@ -95,7 +95,6 @@ namespace Server.Spells.Necromancy public InternalTimer(Mobile m, double toRestore) : base(TimeSpan.FromSeconds(10.0)) { - Priority = TimerPriority.OneSecond; m_Mobile = m; m_ToRestore = (int)toRestore; diff --git a/Projects/UOContent/Spells/Necromancy/Strangle.cs b/Projects/UOContent/Spells/Necromancy/Strangle.cs index 78a471d4f..f92943b7d 100644 --- a/Projects/UOContent/Spells/Necromancy/Strangle.cs +++ b/Projects/UOContent/Spells/Necromancy/Strangle.cs @@ -142,7 +142,6 @@ namespace Server.Spells.Necromancy public InternalTimer(Mobile target, Mobile from) : base(TimeSpan.FromSeconds(0.1), TimeSpan.FromSeconds(0.1)) { - Priority = TimerPriority.FiftyMS; m_Target = target; m_From = from; diff --git a/Projects/UOContent/Spells/Ninjitsu/AnimalForm.cs b/Projects/UOContent/Spells/Ninjitsu/AnimalForm.cs index 28469f9ef..1e8b50f94 100644 --- a/Projects/UOContent/Spells/Ninjitsu/AnimalForm.cs +++ b/Projects/UOContent/Spells/Ninjitsu/AnimalForm.cs @@ -552,8 +552,6 @@ namespace Server.Spells.Ninjitsu m_Body = body; m_Hue = hue; m_Counter = 0; - - Priority = TimerPriority.FiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Spells/Second/Protection.cs b/Projects/UOContent/Spells/Second/Protection.cs index 25f79b7a8..d115ec855 100644 --- a/Projects/UOContent/Spells/Second/Protection.cs +++ b/Projects/UOContent/Spells/Second/Protection.cs @@ -172,7 +172,6 @@ namespace Server.Spells.Second m_Caster = caster; Delay = TimeSpan.FromSeconds(val); - Priority = TimerPriority.OneSecond; } protected override void OnTick() diff --git a/Projects/UOContent/Spells/Seventh/EnergyField.cs b/Projects/UOContent/Spells/Seventh/EnergyField.cs index a153aa14e..8d61cca70 100644 --- a/Projects/UOContent/Spells/Seventh/EnergyField.cs +++ b/Projects/UOContent/Spells/Seventh/EnergyField.cs @@ -191,7 +191,6 @@ namespace Server.Spells.Seventh public InternalTimer(InternalItem item, TimeSpan duration) : base(duration) { - Priority = TimerPriority.OneSecond; m_Item = item; } diff --git a/Projects/UOContent/Spells/Seventh/GateTravel.cs b/Projects/UOContent/Spells/Seventh/GateTravel.cs index aca38e4f7..709b6d42a 100644 --- a/Projects/UOContent/Spells/Seventh/GateTravel.cs +++ b/Projects/UOContent/Spells/Seventh/GateTravel.cs @@ -180,7 +180,6 @@ namespace Server.Spells.Seventh public InternalTimer(Item item) : base(TimeSpan.FromSeconds(30.0)) { - Priority = TimerPriority.OneSecond; m_Item = item; } diff --git a/Projects/UOContent/Spells/Sixth/Explosion.cs b/Projects/UOContent/Spells/Sixth/Explosion.cs index 7047d44e7..407699b5b 100644 --- a/Projects/UOContent/Spells/Sixth/Explosion.cs +++ b/Projects/UOContent/Spells/Sixth/Explosion.cs @@ -72,8 +72,6 @@ namespace Server.Spells.Sixth m_Target = target; m_Spell?.StartDelayedDamageContext(attacker, this); - - Priority = TimerPriority.FiftyMS; } protected override void OnTick() diff --git a/Projects/UOContent/Spells/Sixth/ParalyzeField.cs b/Projects/UOContent/Spells/Sixth/ParalyzeField.cs index 16a7999bf..44d540074 100644 --- a/Projects/UOContent/Spells/Sixth/ParalyzeField.cs +++ b/Projects/UOContent/Spells/Sixth/ParalyzeField.cs @@ -226,7 +226,6 @@ namespace Server.Spells.Sixth public InternalTimer(Item item, TimeSpan duration) : base(duration) { - Priority = TimerPriority.OneSecond; m_Item = item; } diff --git a/Projects/UOContent/Spells/Third/WallOfStone.cs b/Projects/UOContent/Spells/Third/WallOfStone.cs index a2c9a01d6..b05c28078 100644 --- a/Projects/UOContent/Spells/Third/WallOfStone.cs +++ b/Projects/UOContent/Spells/Third/WallOfStone.cs @@ -198,7 +198,6 @@ namespace Server.Spells.Third public InternalTimer(InternalItem item, TimeSpan duration) : base(duration) { - Priority = TimerPriority.OneSecond; m_Item = item; } diff --git a/Projects/UOContent/Spells/UnsummonTimer.cs b/Projects/UOContent/Spells/UnsummonTimer.cs index d038e1620..05e90e593 100644 --- a/Projects/UOContent/Spells/UnsummonTimer.cs +++ b/Projects/UOContent/Spells/UnsummonTimer.cs @@ -12,7 +12,6 @@ namespace Server.Spells { m_Caster = caster; m_Creature = creature; - Priority = TimerPriority.OneSecond; } protected override void OnTick() diff --git a/Projects/UOContent/UOContent.csproj b/Projects/UOContent/UOContent.csproj index d5ca9c443..705f453a2 100755 --- a/Projects/UOContent/UOContent.csproj +++ b/Projects/UOContent/UOContent.csproj @@ -37,7 +37,7 @@ false - + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f6be18dd7..f94c4f523 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,7 @@ jobs: displayName: 'Install .NET 5' inputs: packageType: sdk - version: 5.0.203 + version: 5.0.301 - task: NuGetAuthenticate@0 - script: ./publish.cmd Release win displayName: 'Build' @@ -62,7 +62,7 @@ jobs: displayName: 'Install .NET 5' inputs: packageType: sdk - version: 5.0.203 + version: 5.0.301 - task: NuGetAuthenticate@0 - script: ./publish.cmd Release $(os) displayName: 'Build'