Restore ability to login with microsoft broken after yggdrasil login implementation

This commit is contained in:
mcflurrybaby 2023-12-02 12:39:52 +02:00
parent 1c17da2665
commit ceff78a821
3 changed files with 6 additions and 4 deletions

View file

@ -2619,8 +2619,8 @@ namespace MinecraftClient.Protocol.Handlers
if (needCheckSession)
{
string serverHash = CryptoHandler.GetServerHash(serverIDhash, serverPublicKey, secretKey);
if ((type == LoginType.mojang && ProtocolHandler.SessionCheck(uuid, sessionID, serverHash) )|| (type == LoginType.yggdrasil && ProtocolHandler.YggdrasilSessionCheck(uuid, sessionID, serverHash)))
bool notYggdrasil = type == LoginType.mojang || type == LoginType.microsoft;
if ((notYggdrasil && ProtocolHandler.SessionCheck(uuid, sessionID, serverHash) )|| (type == LoginType.yggdrasil && ProtocolHandler.YggdrasilSessionCheck(uuid, sessionID, serverHash)))
{
session.ServerIDhash = serverIDhash;
session.ServerPublicKey = serverPublicKey;