mirror of
https://github.com/MikuLeaks/MikuSB.git
synced 2026-06-04 05:23:59 +00:00
enter girl room
This commit is contained in:
@@ -27,6 +27,7 @@ public static class CallGSRouter
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
await handler.Handle(connection, req.Param, seqNo);
|
await handler.Handle(connection, req.Param, seqNo);
|
||||||
|
await connection.Player!.OnHeartBeat();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
|||||||
31
GameServer/Server/CallGS/Handlers/Girl/EnterGirlRoom.cs
Normal file
31
GameServer/Server/CallGS/Handlers/Girl/EnterGirlRoom.cs
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
using System.Text.Json;
|
||||||
|
using System.Text.Json.Nodes;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace MikuSB.GameServer.Server.CallGS.Handlers.Girl;
|
||||||
|
|
||||||
|
[CallGSApi("EnterGirlRoom")]
|
||||||
|
public class EnterGirlRoom : ICallGSHandler
|
||||||
|
{
|
||||||
|
public async Task Handle(Connection connection, string param, ushort seqNo)
|
||||||
|
{
|
||||||
|
var req = JsonSerializer.Deserialize<EnterGirlRoomParam>(param);
|
||||||
|
var response = new JsonObject
|
||||||
|
{
|
||||||
|
["nCardId"] = req?.CardId ?? 1,
|
||||||
|
["nSkinId"] = req?.SkinId ?? 0,
|
||||||
|
["bOpen"] = true
|
||||||
|
};
|
||||||
|
|
||||||
|
await CallGSRouter.SendScript(connection, "EnterGirlRoom", response.ToJsonString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
internal sealed class EnterGirlRoomParam
|
||||||
|
{
|
||||||
|
[JsonPropertyName("nSkinId")]
|
||||||
|
public int SkinId { get; set; }
|
||||||
|
|
||||||
|
[JsonPropertyName("nCardID")]
|
||||||
|
public uint CardId { get; set; }
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user