From 20422e5f11237ef7c1baa81d6dca4af038eb3ba7 Mon Sep 17 00:00:00 2001 From: romanlysenko <58622888+romanlysenko@users.noreply.github.com> Date: Thu, 3 Jun 2021 19:31:18 +0300 Subject: [PATCH] feat(content): Adds configuration for extended status override (UOML) (#634) --- .../Server/Network/Packets/OutgoingMobilePackets.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Projects/Server/Network/Packets/OutgoingMobilePackets.cs b/Projects/Server/Network/Packets/OutgoingMobilePackets.cs index f32e89ad4..36a7a61ef 100644 --- a/Projects/Server/Network/Packets/OutgoingMobilePackets.cs +++ b/Projects/Server/Network/Packets/OutgoingMobilePackets.cs @@ -37,6 +37,13 @@ namespace Server.Network public const int MobileStatusCompactLength = 43; public const int MobileStatusMaxLength = 121; + public static bool ExtendedStatus { get; set; } + + public static void Initialize() + { + ExtendedStatus = ServerConfiguration.GetOrUpdateSetting("extendedStatus", false); + } + public static void CreateBondedStatus(Span buffer, Serial serial, bool bonded) { if (buffer[0] != 0) @@ -462,7 +469,11 @@ namespace Server.Network } else if (Core.ML && ns.SupportsExpansion(Expansion.ML)) { - version = 5; + /* + * For the ML era, the version value must be 5 if the original UO distribution + * is used and the client is not lower than version 5 + */ + version = ExtendedStatus ? 6 : 5; } else {