Adds back in old benchmarks. Cleans up tests. (#270)
This commit is contained in:
parent
09d80916b8
commit
4e799ddbd7
29 changed files with 498 additions and 160 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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<bool> 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<bool> 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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue