UseCdKeyRequest stub to prevent softlock when using a promo code

This commit is contained in:
Kyle Belanger 2024-04-13 01:16:44 -04:00
parent fda1754e41
commit abe7e6639b
1 changed files with 19 additions and 1 deletions

View File

@ -21,6 +21,18 @@ namespace AscNet.GameServer.Handlers
public class ShutdownNotify public class ShutdownNotify
{ {
} }
[MessagePackObject(true)]
public class UseCdKeyRequest
{
public string Id;
}
[MessagePackObject(true)]
public class UseCdKeyResponse
{
public int Code;
}
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. #pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
#endregion #endregion
@ -120,7 +132,7 @@ namespace AscNet.GameServer.Handlers
ReconnectToken = request.Token ReconnectToken = request.Token
}, packet.Id); }, packet.Id);
} }
/* TODO /* TODO
[RequestPacketHandler("ReconnectAck")] [RequestPacketHandler("ReconnectAck")]
public static void ReconnectAckHandler(Session session, Packet.Request packet) public static void ReconnectAckHandler(Session session, Packet.Request packet)
@ -128,6 +140,12 @@ namespace AscNet.GameServer.Handlers
} }
*/ */
[RequestPacketHandler("UseCdKeyRequest")]
public static void UseCdKeyRequestHandler(Session session, Packet.Request packet)
{
session.SendResponse(new UseCdKeyResponse() { Code = 1 }, packet.Id);
}
// TODO: Move somewhere else, also split. // TODO: Move somewhere else, also split.
static void DoLogin(Session session) static void DoLogin(Session session)
{ {