From c69b03ce6f69b9527a5d9805e071e4bdfce7f55d Mon Sep 17 00:00:00 2001 From: rfi Date: Sat, 6 Apr 2024 08:27:56 +0700 Subject: [PATCH] GuideOpenRequest adding guide entry test --- AscNet.GameServer/Handlers/GuideModule.cs | 4 ++++ AscNet.SDKServer/Controllers/ConfigController.cs | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/AscNet.GameServer/Handlers/GuideModule.cs b/AscNet.GameServer/Handlers/GuideModule.cs index 947a6372..a29524ff 100644 --- a/AscNet.GameServer/Handlers/GuideModule.cs +++ b/AscNet.GameServer/Handlers/GuideModule.cs @@ -40,6 +40,10 @@ namespace AscNet.GameServer.Handlers [RequestPacketHandler("GuideOpenRequest")] public static void GuideOpenRequestHandler(Session session, Packet.Request packet) { + GuideCompleteRequest request = packet.Deserialize(); + + session.player.PlayerData.GuideData.Add(request.GuideGroupId); + session.SendPush(new NotifyGuide() { GuideGroupId = request.GuideGroupId }); session.SendResponse(new GuideOpenResponse(), packet.Id); } diff --git a/AscNet.SDKServer/Controllers/ConfigController.cs b/AscNet.SDKServer/Controllers/ConfigController.cs index 081197b4..4c7c9e43 100644 --- a/AscNet.SDKServer/Controllers/ConfigController.cs +++ b/AscNet.SDKServer/Controllers/ConfigController.cs @@ -106,8 +106,8 @@ namespace AscNet.SDKServer.Controllers { Id = "1", ModifyTime = DateTimeOffset.Now.ToUnixTimeSeconds(), - Content = new ScrollPicNotice.NoticeContent[] - { + Content = + [ new ScrollPicNotice.NoticeContent() { Id = 0, @@ -123,7 +123,7 @@ namespace AscNet.SDKServer.Controllers AppearanceTime = Array.Empty(), DisappearanceCondition = Array.Empty(), } - } + ] }; string serializedObject = JsonConvert.SerializeObject(notice);