Core/Auth: Refactor client auth key storage to support more future client variants and preserve more information about client version

Port From (https://github.com/TrinityCore/TrinityCore/commit/8e1595265925e0840d07e943b8c9ff1e906d4719)
This commit is contained in:
Hondacrx
2024-10-09 14:28:10 -04:00
parent 71cc76d6b6
commit 37d48ec371
16 changed files with 213 additions and 63 deletions
@@ -5,6 +5,7 @@ using Bgs.Protocol;
using Bgs.Protocol.Authentication.V1;
using Bgs.Protocol.Challenge.V1;
using Framework;
using Framework.ClientBuild;
using Framework.Constants;
using Framework.Database;
using Framework.Realm;
@@ -25,7 +26,7 @@ namespace BNetServer.Networking
return BattlenetRpcErrorCode.BadProgram;
}
if (logonRequest.Platform != "Win" && logonRequest.Platform != "Wn64" && logonRequest.Platform != "Mc64" && logonRequest.Platform != "MacA")
if (!ClientBuildHelper.IsValid(logonRequest.Platform))
{
Log.outDebug(LogFilter.Session, $"Battlenet.LogonRequest: {GetClientInfo()} attempted to log in from an unsupported platform (using {logonRequest.Platform})!");
return BattlenetRpcErrorCode.BadPlatform;