diff --git a/Directory.Build.props b/Directory.Build.props index 22655b102..7fb0e65c9 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -37,6 +37,16 @@ osx-x64 + + TRACE;DEBUG + false + + + true + + + ..\..\Rules.ruleset + diff --git a/ModernUO.sln b/ModernUO.sln index cdbc49c36..e71252615 100644 --- a/ModernUO.sln +++ b/ModernUO.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 16 VisualStudioVersion = 16.0.29102.190 MinimumVisualStudioVersion = 10.0.40219.1 @@ -10,6 +10,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server.Tests", "Projects\Se EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UOContent.Tests", "Projects\UOContent.Tests\UOContent.Tests.csproj", "{3C4797F9-603E-44EF-8E8C-9275CC9EA74B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks", "Projects\Benchmarks\Benchmarks.csproj", "{38B7E4A1-FDDD-486C-98EE-BA7B13712528}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Analyze|x64 = Analyze|x64 @@ -41,6 +43,10 @@ Global {3C4797F9-603E-44EF-8E8C-9275CC9EA74B}.Debug|x64.Build.0 = Debug|x64 {3C4797F9-603E-44EF-8E8C-9275CC9EA74B}.Release|x64.ActiveCfg = Release|x64 {3C4797F9-603E-44EF-8E8C-9275CC9EA74B}.Release|x64.Build.0 = Release|x64 + {38B7E4A1-FDDD-486C-98EE-BA7B13712528}.Debug|x64.ActiveCfg = Debug|x64 + {38B7E4A1-FDDD-486C-98EE-BA7B13712528}.Debug|x64.Build.0 = Debug|x64 + {38B7E4A1-FDDD-486C-98EE-BA7B13712528}.Release|x64.ActiveCfg = Release|x64 + {38B7E4A1-FDDD-486C-98EE-BA7B13712528}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Projects/Benchmarks/Benchmarks.csproj b/Projects/Benchmarks/Benchmarks.csproj new file mode 100644 index 000000000..afd521a92 --- /dev/null +++ b/Projects/Benchmarks/Benchmarks.csproj @@ -0,0 +1,10 @@ + + + Exe + + + + + + + diff --git a/Projects/Benchmarks/FeatureFlags/BenchmarkFeatureFlags.cs b/Projects/Benchmarks/FeatureFlags/BenchmarkFeatureFlags.cs new file mode 100644 index 000000000..84009d385 --- /dev/null +++ b/Projects/Benchmarks/FeatureFlags/BenchmarkFeatureFlags.cs @@ -0,0 +1,90 @@ +using System; +using System.Buffers.Binary; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.Loader; +using System.Security.Cryptography; +using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Jobs; +using Server; +using Server.Items; + +namespace Benchmarks +{ + [SimpleJob(RuntimeMoniker.NetCoreApp31)] + public class BenchmarkFeatureFlags + { + public Dictionary> m_Dictionary; + public ILookup> m_Lookup; + + public Type[] m_TypesToLookUp; + + [GlobalSetup] + public void Setup() + { + RNGCryptoServiceProvider csp = new RNGCryptoServiceProvider(); + + string file = Path.Join(AppDomain.CurrentDomain.BaseDirectory, "UOContent.dll"); + Assembly assembly = AssemblyLoadContext.Default.LoadFromAssemblyPath(file); + + m_Dictionary = new Dictionary>(); + List> m_Types = new List>(); + m_TypesToLookUp = new Type[100]; + + foreach (var type in assembly.GetTypes()) + { + if (typeof(Item).IsAssignableFrom(type)) + { + m_Dictionary.Add(type, new FeatureFlag()); + m_Types.Add(new FeatureFlag{Type = type}); + } + } + + Console.WriteLine("Dictionary Size: {0}", m_Dictionary.Count); + Console.WriteLine("Lookup Size: {0}", m_Types.Count); + + m_Dictionary.TrimExcess(); + m_Lookup = m_Types.ToLookup(f => f.Type); + Span bytes = stackalloc byte[4]; + + for (int i = 0; i < 100; i++) + { + csp.GetBytes(bytes); + m_TypesToLookUp[i] = m_Types[(int)(BinaryPrimitives.ReadUInt32BigEndian(bytes) % m_Types.Count)].Type; + } + } + + [Benchmark] + public FeatureFlag TestDictionary() + { + for (int i = 0; i < 100; i++) + { + m_Dictionary.TryGetValue(typeof(ExplosionPotion), out var ff); + if (i == 99) + { + return ff; + } + } + + return null; + } + + [Benchmark] + public FeatureFlag TestLookup() + { + FeatureFlag ff; + for (int i = 0; i < 100; i++) + { + ff = m_Lookup[typeof(ExplosionPotion)].GetEnumerator().Current; + if (i == 99) + { + return ff; + } + } + + return null; + } + } +} diff --git a/Projects/Benchmarks/FeatureFlags/FeatureFlag.cs b/Projects/Benchmarks/FeatureFlags/FeatureFlag.cs new file mode 100644 index 000000000..f8b04716c --- /dev/null +++ b/Projects/Benchmarks/FeatureFlags/FeatureFlag.cs @@ -0,0 +1,9 @@ +using System; + +namespace Server +{ + public class FeatureFlag where T : Item + { + public Type Type { get; set; } + } +} diff --git a/Projects/Benchmarks/Packets/BenchmarkPacketConstruction.cs b/Projects/Benchmarks/Packets/BenchmarkPacketConstruction.cs new file mode 100644 index 000000000..41988fb85 --- /dev/null +++ b/Projects/Benchmarks/Packets/BenchmarkPacketConstruction.cs @@ -0,0 +1,157 @@ +using System; +using System.Buffers.Binary; +using System.Collections.Generic; +using BenchmarkDotNet.Attributes; +using BenchmarkDotNet.Jobs; +using Server; +using Server.Network; + +namespace Benchmarks +{ + [MemoryDiagnoser] + [SimpleJob(RuntimeMoniker.NetCoreApp31)] + public class BenchmarkPacketConstruction + { + public List m_States; + + [GlobalSetup] + public void SetUp() + { + m_States = new List + { + new BuyItemState("Name 1", 0x1000, 0x2000, 1000, 1, 10, 1024), + new BuyItemState("Name 2", 0x1001, 0x2001, 1001, 1, 10, 1024), + new BuyItemState("Name 3", 0x1002, 0x2002, 1002, 1, 10, 1024), + new BuyItemState("Name 4", 0x1003, 0x2003, 1003, 1, 10, 1024), + new BuyItemState("Name 5", 0x1004, 0x2004, 1004, 1, 10, 1024), + new BuyItemState("Name 6", 0x1005, 0x2005, 1005, 1, 10, 1024), + new BuyItemState("Name 7", 0x1006, 0x2006, 1006, 1, 10, 1024), + new BuyItemState("Name 8", 0x1007, 0x2007, 1007, 1, 10, 1024), + new BuyItemState("Name 9", 0x1008, 0x2008, 1008, 1, 10, 1024), + new BuyItemState("Name A", 0x1009, 0x2009, 1009, 1, 10, 1024), + new BuyItemState("Name 10", 0x1000, 0x2000, 1000, 1, 10, 1024), + new BuyItemState("Name 20", 0x1001, 0x2001, 1001, 1, 10, 1024), + new BuyItemState("Name 30", 0x1002, 0x2002, 1002, 1, 10, 1024), + new BuyItemState("Name 40", 0x1003, 0x2003, 1003, 1, 10, 1024), + new BuyItemState("Name 50", 0x1004, 0x2004, 1004, 1, 10, 1024), + new BuyItemState("Name 60", 0x1005, 0x2005, 1005, 1, 10, 1024), + new BuyItemState("Name 70", 0x1006, 0x2006, 1006, 1, 10, 1024), + new BuyItemState("Name 80", 0x1007, 0x2007, 1007, 1, 10, 1024), + new BuyItemState("Name 90", 0x1008, 0x2008, 1008, 1, 10, 1024), + new BuyItemState("Name A0", 0x1009, 0x2009, 1009, 1, 10, 1024), + new BuyItemState("Name 11", 0x1000, 0x2000, 1000, 1, 10, 1024), + new BuyItemState("Name 21", 0x1001, 0x2001, 1001, 1, 10, 1024), + new BuyItemState("Name 31", 0x1002, 0x2002, 1002, 1, 10, 1024), + new BuyItemState("Name 41", 0x1003, 0x2003, 1003, 1, 10, 1024), + new BuyItemState("Name 51", 0x1004, 0x2004, 1004, 1, 10, 1024), + new BuyItemState("Name 61", 0x1005, 0x2005, 1005, 1, 10, 1024), + new BuyItemState("Name 71", 0x1006, 0x2006, 1006, 1, 10, 1024), + new BuyItemState("Name 81", 0x1007, 0x2007, 1007, 1, 10, 1024), + new BuyItemState("Name 91", 0x1008, 0x2008, 1008, 1, 10, 1024), + new BuyItemState("Name A1", 0x1009, 0x2009, 1009, 1, 10, 1024) + }; + } + + [Benchmark] + public Packet TestPacketConstruction() + { + Packet p = new VendorBuyContent(m_States); + p.Compile(false, out _); + return p; + } + + [Benchmark] + public int TestInlineRefConstruction() + { + var buyStates = m_States; + + int length = 5 + buyStates.Count * 19; + + Span data = stackalloc byte[length]; + + int pos = 0; + data.Write(ref pos, (byte)0x3C); + data.Write(ref pos, (ushort)length); + data.Write(ref pos, (ushort)buyStates.Count); + + for (int i = buyStates.Count - 1; i >= 0; i--) + { + BuyItemState buyState = buyStates[i]; + + data.Write(ref pos, buyState.MySerial); + data.Write(ref pos, (ushort)buyState.ItemID); + data.Write(ref pos, (byte)0); + data.Write(ref pos, (ushort)buyState.Amount); + data.Write(ref pos, (ushort)(i + 1)); + data.Write(ref pos, (ushort)0x1); + data.Write(ref pos, buyState.ContainerSerial); + data.Write(ref pos, (ushort)buyState.Hue); + } + + return data.Length; + } + + [Benchmark] + public int TestInlineConstruction() + { + var buyStates = m_States; + + Span data = stackalloc byte[5 + buyStates.Count * 19]; + data[0] = 0x3C; + BinaryPrimitives.WriteUInt16BigEndian(data.Slice(1, 2), (ushort)data.Length); + BinaryPrimitives.WriteUInt16BigEndian(data.Slice(3, 2), (ushort)buyStates.Count); + int pos = 4; + + + for (int i = buyStates.Count - 1; i >= 0; i--) + { + BuyItemState buyState = buyStates[i]; + BinaryPrimitives.WriteUInt32BigEndian(data.Slice(pos, 4), buyState.MySerial); + pos += 4; + BinaryPrimitives.WriteUInt16BigEndian(data.Slice(pos, 2), (ushort)buyState.ItemID); + pos += 2; + data[pos++] = 0; + BinaryPrimitives.WriteUInt16BigEndian(data.Slice(pos, 2), (ushort)buyState.Amount); + pos += 2; + BinaryPrimitives.WriteUInt16BigEndian(data.Slice(pos, 2), (ushort)(i + 1)); + pos += 2; + BinaryPrimitives.WriteUInt16BigEndian(data.Slice(pos, 2), 0x1); + pos += 2; + BinaryPrimitives.WriteUInt32BigEndian(data.Slice(pos, 4), buyState.ContainerSerial); + pos += 4; + BinaryPrimitives.WriteUInt16BigEndian(data.Slice(pos, 2), (ushort)(buyState.Hue)); + pos += 2; + } + + return data.Length; + } + + [Benchmark] + public int TestSpanWriterConstruction() + { + var buyStates = m_States; + + int length = 5 + buyStates.Count * 19; + + SpanWriter w = new SpanWriter(stackalloc byte[length]); + + w.Write((byte)0x3C); // Packet ID + w.Write((ushort)length); // Length + w.Write((ushort)buyStates.Count); // Length + + for (int i = buyStates.Count - 1; i >= 0; i--) + { + BuyItemState buyState = buyStates[i]; + w.Write(buyState.MySerial); + w.Write((ushort)buyState.ItemID); + w.Write((byte)0); + w.Write((ushort)(i + 1)); // X + w.Write((ushort)0x1); // Y + w.Write(buyState.ContainerSerial); + w.Write((ushort)buyState.Hue); + } + + return w.Pos; + } + } +} diff --git a/Projects/Benchmarks/Packets/PacketTestUtilities.cs b/Projects/Benchmarks/Packets/PacketTestUtilities.cs new file mode 100644 index 000000000..a782423ee --- /dev/null +++ b/Projects/Benchmarks/Packets/PacketTestUtilities.cs @@ -0,0 +1,27 @@ +using System; +using System.Buffers.Binary; +using System.Runtime.CompilerServices; +using Server; + +namespace Benchmarks +{ + public static class PacketTestUtilities + { + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Write(this Span data, ref int pos, Serial serial) + { + BinaryPrimitives.WriteUInt32BigEndian(data.Slice(pos, 4), serial); + pos += 4; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Write(this Span data, ref int pos, ushort value) + { + BinaryPrimitives.WriteUInt16BigEndian(data.Slice(pos, 2), value); + pos += 2; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public static void Write(this Span data, ref int pos, byte value) => data[pos++] = value; + } +} diff --git a/Projects/Benchmarks/Packets/SpanWriter.cs b/Projects/Benchmarks/Packets/SpanWriter.cs new file mode 100644 index 000000000..18cb03a1d --- /dev/null +++ b/Projects/Benchmarks/Packets/SpanWriter.cs @@ -0,0 +1,36 @@ +using System; +using System.Buffers.Binary; +using System.Runtime.CompilerServices; +using Server; + +namespace Benchmarks +{ + public ref struct SpanWriter + { + public Span Span; + public int Pos; + + public SpanWriter(Span span) + { + Span = span; + Pos = 0; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Write(Serial serial) + { + BinaryPrimitives.WriteUInt32BigEndian(Span.Slice(Pos), serial); + Pos += 4; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Write(ushort value) + { + BinaryPrimitives.WriteUInt16BigEndian(Span.Slice(Pos), value); + Pos += 2; + } + + [MethodImpl(MethodImplOptions.AggressiveInlining)] + public void Write(byte value) => Span[Pos++] = value; + } +} diff --git a/Projects/Benchmarks/Program.cs b/Projects/Benchmarks/Program.cs new file mode 100644 index 000000000..c9b023050 --- /dev/null +++ b/Projects/Benchmarks/Program.cs @@ -0,0 +1,13 @@ +using BenchmarkDotNet.Running; + +namespace Benchmarks +{ + public class Program + { + static void Main(string[] args) + { + var featureFlags = BenchmarkRunner.Run(); + var packetConstruction = BenchmarkRunner.Run(); + } + } +} diff --git a/Projects/Server.Tests/Network/Packets/GumpUtilities.cs b/Projects/Server.Tests/Network/Packets/GumpUtilities.cs index 9394b98fa..df6d95755 100644 --- a/Projects/Server.Tests/Network/Packets/GumpUtilities.cs +++ b/Projects/Server.Tests/Network/Packets/GumpUtilities.cs @@ -23,7 +23,7 @@ namespace Server.Tests.Network.Packets if (length == 0) { #if NO_LOCAL_INIT - dest.Write(ref pos, 0); + dest.Write(ref pos, 0); #else pos += 4; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/AccountPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/AccountPacketTests.cs index 8ec3d5004..7e7b10bc6 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/AccountPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/AccountPacketTests.cs @@ -39,7 +39,7 @@ namespace Server.Tests.Network.Packets if (m == null) { #if NO_LOCAL_INIT - expectedData.Clear(ref pos, 60); + expectedData.Clear(ref pos, 60); #else pos += 60; #endif @@ -48,7 +48,7 @@ namespace Server.Tests.Network.Packets { expectedData.WriteAsciiFixed(ref pos, m.Name, 30); #if NO_LOCAL_INIT - expectedData.Clear(ref pos, 30); // Password (empty) + expectedData.Clear(ref pos, 30); // Password (empty) #else pos += 30; #endif @@ -178,7 +178,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (byte)0x1B); // Packet ID expectedData.Write(ref pos, m.Serial); #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, 0); #else pos += 4; #endif @@ -189,13 +189,13 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (short)m.Z); expectedData.Write(ref pos, (byte)m.Direction); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); #else pos++; #endif expectedData.Write(ref pos, 0xFFFFFFFF); #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, 0); #else pos += 4; #endif @@ -263,11 +263,11 @@ namespace Server.Tests.Network.Packets { expectedData.WriteAsciiFixed(ref pos, m.Name, 30); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ushort)0); #else pos += 30; #endif @@ -275,14 +275,14 @@ namespace Server.Tests.Network.Packets else { #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, 0); #else pos += 60; #endif @@ -333,11 +333,11 @@ namespace Server.Tests.Network.Packets { expectedData.WriteAsciiFixed(ref pos, m.Name, 30); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ushort)0); #else pos += 30; #endif @@ -345,14 +345,14 @@ namespace Server.Tests.Network.Packets else { #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, 0); #else pos += 60; #endif @@ -373,7 +373,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, ci.Map.MapID); expectedData.Write(ref pos, ci.Description); #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, 0); #else pos += 4; #endif @@ -442,11 +442,11 @@ namespace Server.Tests.Network.Packets { expectedData.WriteAsciiFixed(ref pos, m.Name, 30); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ushort)0); #else pos += 30; #endif @@ -454,14 +454,14 @@ namespace Server.Tests.Network.Packets else { #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, 0); #else pos += 60; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/ArrowPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/ArrowPacketTests.cs index 1ce42e310..08065c74e 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/ArrowPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/ArrowPacketTests.cs @@ -55,7 +55,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (byte)0xBA); // Packet ID #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // Command + expectedData.Write(ref pos, (byte)0); // Command #else pos++; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/CombatPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/CombatPacketTests.cs index 01aab527d..cf896779c 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/CombatPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/CombatPacketTests.cs @@ -20,7 +20,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (byte)0x2F); // Packet ID #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); #else pos++; #endif @@ -45,7 +45,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, warmode); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); #else pos++; #endif @@ -53,7 +53,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (byte)0x32); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); #else pos++; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/DisplayHuePickerTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/DisplayHuePickerTests.cs index 7116df5ba..74c0a1bb9 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/DisplayHuePickerTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/DisplayHuePickerTests.cs @@ -22,7 +22,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (byte)0x95); expectedData.Write(ref pos, huePicker.Serial); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ushort)0); #else pos += 2; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/EffectPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/EffectPacketTests.cs index 9766c677e..1529b7a47 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/EffectPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/EffectPacketTests.cs @@ -63,7 +63,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, speed); expectedData.Write(ref pos, duration); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ushort)0); #else pos += 2; #endif @@ -125,7 +125,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, speed); expectedData.Write(ref pos, duration); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ushort)0); #else pos += 2; #endif @@ -149,8 +149,8 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (byte)0x70); // Packet ID expectedData.Write(ref pos, (byte)0x04); // Effect #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, 0); #else pos += 8; #endif @@ -158,10 +158,10 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)type); // Screen Effect Type #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, 0); #endif AssertThat.Equal(data, expectedData); @@ -182,16 +182,16 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, entity.Serial); #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ushort)0); #else pos += 6; #endif expectedData.Write(ref pos, entity.Location); expectedData.Write(ref pos, entity.Location); #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ushort)0); #else pos += 6; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/EquipmentPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/EquipmentPacketTests.cs index 8e4b161dc..f7d4c3f59 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/EquipmentPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/EquipmentPacketTests.cs @@ -88,7 +88,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)item.ItemID); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); #else pos++; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/GumpPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/GumpPacketTests.cs index 21903a81b..c22c387b5 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/GumpPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/GumpPacketTests.cs @@ -205,7 +205,7 @@ namespace Server.Tests.Network.Packets } #if NO_LOCAL_INIT - buffer.Write(ref bufferPos, (byte)0); // Layout terminator + buffer.Write(ref bufferPos, (byte)0); // Layout terminator #else bufferPos++; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/ItemPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/ItemPacketTests.cs index 85c01f227..1f6d2a1b0 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/ItemPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/ItemPacketTests.cs @@ -157,7 +157,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)(item.ItemID & (isMulti ? 0x3FFF : 0xFFFF))); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0) + expectedData.Write(ref pos, (byte)0) #else pos++; #endif @@ -212,7 +212,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)(item.ItemID & (isMulti ? 0x3FFF : 0xFFFF))); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); #else pos++; #endif @@ -225,7 +225,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (byte)item.GetPacketFlags()); // Flags #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ushort)0); // ?? + expectedData.Write(ref pos, (ushort)0); // ?? #endif AssertThat.Equal(data, expectedData); @@ -351,20 +351,20 @@ namespace Server.Tests.Network.Packets { expectedData.Write(ref pos, 0x7FFFFFFF - i); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ushort)0); - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (byte)0); #else pos += 3; #endif expectedData.Write(ref pos, (ushort)(i + offset)); #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); // X. Y + expectedData.Write(ref pos, 0); // X. Y #else pos += 4; #endif expectedData.Write(ref pos, serial); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ushort)0); #else pos += 2; #endif @@ -403,21 +403,21 @@ namespace Server.Tests.Network.Packets { expectedData.Write(ref pos, 0x7FFFFFFF - i); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ushort)0); - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (byte)0); #else pos += 3; #endif expectedData.Write(ref pos, (ushort)(i + offset)); #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); // X. Y - expectedData.Write(ref pos, (byte)0); // Grid Location + expectedData.Write(ref pos, 0); // X. Y + expectedData.Write(ref pos, (byte)0); // Grid Location #else pos += 5; #endif expectedData.Write(ref pos, serial); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ushort)0); #else pos += 2; #endif @@ -448,7 +448,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, item.Serial); expectedData.Write(ref pos, (ushort)item.ItemID); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // ItemID offset + expectedData.Write(ref pos, (byte)0); // ItemID offset #else pos++; #endif @@ -476,7 +476,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, item.Serial); expectedData.Write(ref pos, (ushort)item.ItemID); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // ItemID offset + expectedData.Write(ref pos, (byte)0); // ItemID offset #else pos++; #endif @@ -484,7 +484,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)item.X); expectedData.Write(ref pos, (ushort)item.Y); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // Grid Location? + expectedData.Write(ref pos, (byte)0); // Grid Location? #else pos++; #endif @@ -525,7 +525,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, child.Serial); expectedData.Write(ref pos, (ushort)child.ItemID); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // ItemID offset + expectedData.Write(ref pos, (byte)0); // ItemID offset #else pos++; #endif @@ -577,7 +577,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, child.Serial); expectedData.Write(ref pos, (ushort)child.ItemID); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // ItemID offset + expectedData.Write(ref pos, (byte)0); // ItemID offset #else pos++; #endif @@ -585,7 +585,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)child.X); expectedData.Write(ref pos, (ushort)child.Y); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // Grid Location? + expectedData.Write(ref pos, (byte)0); // Grid Location? #else pos++; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/MenuPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/MenuPacketTests.cs index 8814c379a..2e85bee44 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/MenuPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/MenuPacketTests.cs @@ -128,7 +128,7 @@ namespace Server.Tests.Network.Packets { var answer = menu.Answers[i]; #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, 0); #else pos += 4; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/MobilePacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/MobilePacketTests.cs index 4e7bc6309..769bb03c7 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/MobilePacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/MobilePacketTests.cs @@ -23,7 +23,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, killed); expectedData.Write(ref pos, corpse); #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, 0); #endif AssertThat.Equal(data, expectedData); @@ -45,7 +45,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)0x19); // Sub-packet #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // Command + expectedData.Write(ref pos, (byte)0); // Command #else pos++; #endif @@ -124,7 +124,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, m.Serial); expectedData.WriteAsciiFixed(ref pos, m.Name ?? "", 29); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); #endif AssertThat.Equal(data, expectedData); @@ -216,7 +216,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, canBeRenamed); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // type + expectedData.Write(ref pos, (byte)0); // type #endif AssertThat.Equal(data, expectedData); @@ -415,7 +415,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, m.Serial); expectedData.Write(ref pos, (ushort)m.Body); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // Unknown + expectedData.Write(ref pos, (byte)0); // Unknown #else pos++; #endif @@ -424,7 +424,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)m.X); expectedData.Write(ref pos, (ushort)m.Y); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ushort)2); // Unknown + expectedData.Write(ref pos, (ushort)2); // Unknown #else pos += 2; #endif @@ -451,7 +451,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, m.Serial); expectedData.Write(ref pos, (ushort)m.Body); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // Unknown + expectedData.Write(ref pos, (byte)0); // Unknown #else pos++; #endif @@ -460,7 +460,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)m.X); expectedData.Write(ref pos, (ushort)m.Y); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ushort)2); // Unknown + expectedData.Write(ref pos, (ushort)2); // Unknown #else pos += 2; #endif @@ -511,7 +511,7 @@ namespace Server.Tests.Network.Packets Span layers = stackalloc bool[256]; #if NO_LOCAL_INIT - layers.Clear(); + layers.Clear(); #endif var items = beheld.Items; @@ -589,7 +589,7 @@ namespace Server.Tests.Network.Packets } #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); // Zero serial, terminate list + expectedData.Write(ref pos, 0); // Zero serial, terminate list #else pos += 4; #endif @@ -659,7 +659,7 @@ namespace Server.Tests.Network.Packets Span layers = stackalloc bool[256]; #if NO_LOCAL_INIT - layers.Clear(); + layers.Clear(); #endif var items = beheld.Items; @@ -760,7 +760,7 @@ namespace Server.Tests.Network.Packets } #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); // Zero serial, terminate list + expectedData.Write(ref pos, 0); // Zero serial, terminate list #else pos += 4; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/MovementPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/MovementPacketTests.cs index db5ab6826..d19976638 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/MovementPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/MovementPacketTests.cs @@ -98,12 +98,12 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (short)0x1); // Sub-packet #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); // Key 1 - expectedData.Write(ref pos, 0); // Key 2 - expectedData.Write(ref pos, 0); // Key 3 - expectedData.Write(ref pos, 0); // Key 4 - expectedData.Write(ref pos, 0); // Key 5 - expectedData.Write(ref pos, 0); // Key 6 + expectedData.Write(ref pos, 0); // Key 1 + expectedData.Write(ref pos, 0); // Key 2 + expectedData.Write(ref pos, 0); // Key 3 + expectedData.Write(ref pos, 0); // Key 4 + expectedData.Write(ref pos, 0); // Key 5 + expectedData.Write(ref pos, 0); // Key 6 #endif AssertThat.Equal(data, expectedData); diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/PlayerPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/PlayerPacketTests.cs index 3eb0b17c4..26b403ce7 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/PlayerPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/PlayerPacketTests.cs @@ -188,8 +188,8 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)p.Y); expectedData.Write(ref pos, (short)p.Z); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // Unknown - expectedData.Write(ref pos, 0); // Server X, Server Y + expectedData.Write(ref pos, (byte)0); // Unknown + expectedData.Write(ref pos, 0); // Server X, Server Y #else pos += 5; #endif @@ -326,7 +326,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)itemID); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); #else pos++; #endif @@ -404,7 +404,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, soundID); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ushort)0); // Volume + expectedData.Write(ref pos, (ushort)0); // Volume #else pos += 2; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/SecureTradePacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/SecureTradePacketTests.cs index 8955fedbf..73d1d8b66 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/SecureTradePacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/SecureTradePacketTests.cs @@ -152,7 +152,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, itemInCont.Serial); expectedData.Write(ref pos, (short)itemInCont.ItemID); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); #else pos++; #endif @@ -160,7 +160,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (short)itemInCont.X); expectedData.Write(ref pos, (short)itemInCont.Y); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); #else pos++; #endif diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/TargetPacketsTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/TargetPacketsTests.cs index 1fd035520..ab026e84f 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/TargetPacketsTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/TargetPacketsTests.cs @@ -49,12 +49,12 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, t.TargetID); #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, (ushort)0); - expectedData.Write(ref pos, (ushort)0); - expectedData.Write(ref pos, (byte)0); - expectedData.Write(ref pos, (byte)0); - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (ushort)0); #else pos += 12; #endif @@ -65,8 +65,8 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (short)t.Offset.Z); #if NO_LOCAL_INIT - // Hue (4 bytes) - expectedData.Write(ref pos, 0); + // Hue (4 bytes) + expectedData.Write(ref pos, 0); #endif AssertThat.Equal(data, expectedData); @@ -89,12 +89,12 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, t.TargetID); #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, (ushort)0); - expectedData.Write(ref pos, (ushort)0); - expectedData.Write(ref pos, (byte)0); - expectedData.Write(ref pos, (byte)0); - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (ushort)0); #else pos += 12; #endif @@ -121,12 +121,12 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (byte)3); // Beneficial / Harmful #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, (ushort)0); - expectedData.Write(ref pos, (ushort)0); - expectedData.Write(ref pos, (byte)0); - expectedData.Write(ref pos, (byte)0); - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (ushort)0); #endif AssertThat.Equal(data, expectedData); @@ -147,12 +147,12 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (byte)t.Flags); #if NO_LOCAL_INIT - expectedData.Write(ref pos, 0); - expectedData.Write(ref pos, (ushort)0); - expectedData.Write(ref pos, (ushort)0); - expectedData.Write(ref pos, (byte)0); - expectedData.Write(ref pos, (byte)0); - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, 0); + expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (ushort)0); #endif AssertThat.Equal(data, expectedData); diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/UnicodePromptTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/UnicodePromptTests.cs index 8219ad434..b27c372d6 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/UnicodePromptTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/UnicodePromptTests.cs @@ -27,8 +27,8 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, prompt.Serial); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (ulong)0); - expectedData.Write(ref pos, (ushort)0); + expectedData.Write(ref pos, (ulong)0); + expectedData.Write(ref pos, (ushort)0); #endif AssertThat.Equal(data, expectedData); diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/VendorBuyPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/VendorBuyPacketTests.cs index 3c3282872..e54592388 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/VendorBuyPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/VendorBuyPacketTests.cs @@ -82,7 +82,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, (ushort)(i + 1)); // X expectedData.Write(ref pos, (ushort)1); // Y #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); // Grid Location? + expectedData.Write(ref pos, (byte)0); // Grid Location? #else pos++; #endif @@ -189,7 +189,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, vendor.Serial); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)-); + expectedData.Write(ref pos, (byte)-); #endif AssertThat.Equal(data, expectedData); diff --git a/Projects/Server.Tests/Network/Packets/Old/Outgoing/VendorSellPacketTests.cs b/Projects/Server.Tests/Network/Packets/Old/Outgoing/VendorSellPacketTests.cs index 96826e26e..ee4590e24 100644 --- a/Projects/Server.Tests/Network/Packets/Old/Outgoing/VendorSellPacketTests.cs +++ b/Projects/Server.Tests/Network/Packets/Old/Outgoing/VendorSellPacketTests.cs @@ -73,7 +73,7 @@ namespace Server.Tests.Network.Packets expectedData.Write(ref pos, vendor.Serial); #if NO_LOCAL_INIT - expectedData.Write(ref pos, (byte)0); + expectedData.Write(ref pos, (byte)0); #endif AssertThat.Equal(data, expectedData); diff --git a/Projects/Server/Server.csproj b/Projects/Server/Server.csproj index cd00a371e..4dc2e800e 100644 --- a/Projects/Server/Server.csproj +++ b/Projects/Server/Server.csproj @@ -39,16 +39,6 @@ - - TRACE;DEBUG - false - - - true - - - ..\..\Rules.ruleset - diff --git a/Projects/UOContent/UOContent.csproj b/Projects/UOContent/UOContent.csproj index 7b48227c9..a9fd964f6 100644 --- a/Projects/UOContent/UOContent.csproj +++ b/Projects/UOContent/UOContent.csproj @@ -33,16 +33,6 @@ - - TRACE;DEBUG;$(DefineConstants) - false - - - true - - - ..\..\Rules.ruleset - false