feat(content): Adds configuration for extended status override (UOML) (#634)

This commit is contained in:
romanlysenko 2021-06-03 19:31:18 +03:00 committed by GitHub
parent e51334cc0f
commit 20422e5f11
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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<byte> 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
{