From abe7e6639bb3e73881cc9146550ab0bd67c43c2d Mon Sep 17 00:00:00 2001 From: Kyle Belanger Date: Sat, 13 Apr 2024 01:16:44 -0400 Subject: [PATCH] UseCdKeyRequest stub to prevent softlock when using a promo code --- AscNet.GameServer/Handlers/AccountModule.cs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/AscNet.GameServer/Handlers/AccountModule.cs b/AscNet.GameServer/Handlers/AccountModule.cs index c3c90cec..816e9ccb 100644 --- a/AscNet.GameServer/Handlers/AccountModule.cs +++ b/AscNet.GameServer/Handlers/AccountModule.cs @@ -21,6 +21,18 @@ namespace AscNet.GameServer.Handlers 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. #endregion @@ -120,7 +132,7 @@ namespace AscNet.GameServer.Handlers ReconnectToken = request.Token }, packet.Id); } - + /* TODO [RequestPacketHandler("ReconnectAck")] 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. static void DoLogin(Session session) {