GuideOpenRequest adding guide entry test

This commit is contained in:
rfi 2024-04-06 08:27:56 +07:00
parent 0c0d6a3f32
commit c69b03ce6f
2 changed files with 7 additions and 3 deletions

View File

@ -40,6 +40,10 @@ namespace AscNet.GameServer.Handlers
[RequestPacketHandler("GuideOpenRequest")]
public static void GuideOpenRequestHandler(Session session, Packet.Request packet)
{
GuideCompleteRequest request = packet.Deserialize<GuideCompleteRequest>();
session.player.PlayerData.GuideData.Add(request.GuideGroupId);
session.SendPush(new NotifyGuide() { GuideGroupId = request.GuideGroupId });
session.SendResponse(new GuideOpenResponse(), packet.Id);
}

View File

@ -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<dynamic>(),
DisappearanceCondition = Array.Empty<dynamic>(),
}
}
]
};
string serializedObject = JsonConvert.SerializeObject(notice);