From d40273f99d7d19ac940e970bf573698cefd8ce59 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Mon, 15 Mar 2021 18:02:34 -0700 Subject: [PATCH] fix(core): Cleanup UOGateway (#555) --- Projects/UOContent/Network/ConnectUO.cs | 4 ++-- Projects/UOContent/Network/UOGateway.cs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Projects/UOContent/Network/ConnectUO.cs b/Projects/UOContent/Network/ConnectUO.cs index 82a06ba47..a2bb977d9 100644 --- a/Projects/UOContent/Network/ConnectUO.cs +++ b/Projects/UOContent/Network/ConnectUO.cs @@ -113,8 +113,8 @@ namespace Server.Network writer.Write(ConnectUOProtocolVersion); // Version writer.Write((byte)_serverType); writer.Write((int)(Core.TickCount / 1000)); - writer.Write(Accounts.Count); // Shame if you modify this! - writer.Write(TcpServer.Instances.Count); // Shame if you modify this! + writer.Write(Accounts.Count); // Shame if you modify this! + writer.Write(TcpServer.Instances.Count - 1); // Shame if you modify this! ns.Send(writer.Span); } diff --git a/Projects/UOContent/Network/UOGateway.cs b/Projects/UOContent/Network/UOGateway.cs index f3b6c937c..97ecf3a22 100644 --- a/Projects/UOContent/Network/UOGateway.cs +++ b/Projects/UOContent/Network/UOGateway.cs @@ -37,7 +37,7 @@ namespace Server.Network { ns.SendCompactShardStats( (uint)(Core.TickCount / 1000), - TcpServer.Instances.Count, + TcpServer.Instances.Count - 1, // Shame if you modify this! World.Items.Count, World.Mobiles.Count, GC.GetTotalMemory(false) @@ -50,7 +50,7 @@ namespace Server.Network ns.SendExtendedShardStats( ServerList.ServerName, (int)(Core.TickCount / ticksInHour), - TcpServer.Instances.Count, + TcpServer.Instances.Count - 1, // Shame if you modify this! World.Items.Count, World.Mobiles.Count, (int)(GC.GetTotalMemory(false) / 1024) @@ -88,7 +88,7 @@ namespace Server.Network } var str = - $"ModernUO, Name={name}, Age={age}, Clients={clients}, Items={items}, Chars={mobiles}, Mem={mem}, Ver=2"; + $"ModernUO, Name={name}, Age={age}, Clients={clients}, Items={items}, Chars={mobiles}, Mem={mem}K, Ver=2"; var length = Encoding.UTF8.GetMaxByteCount(str.Length);