forked from PGR/ascnet
1
0
Fork 0

Co-op room creation and matchmaking stubs to prevent related softlocks

This commit is contained in:
Kyle Belanger 2024-04-13 01:05:44 -04:00
parent 869e911333
commit fda1754e41
1 changed files with 50 additions and 0 deletions

View File

@ -0,0 +1,50 @@
using MessagePack;
namespace AscNet.GameServer.Handlers
{
#region MsgPackScheme
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
[MessagePackObject(true)]
public class CreateRoomRequest
{
public int StageId;
public int StageLevel;
public bool Automatch;
}
[MessagePackObject(true)]
public class CreateRoomResponse
{
public int Code;
}
[MessagePackObject(true)]
public class MatchRoomRequest
{
public int StageId;
}
[MessagePackObject(true)]
public class MatchRoomResponse
{
public int Code;
}
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
#endregion
internal class CoopModule
{
[RequestPacketHandler("CreateRoomRequest")]
public static void CreateRoomRequestHandler(Session session, Packet.Request packet)
{
session.SendResponse(new CreateRoomResponse() { Code = 1 }, packet.Id);
}
[RequestPacketHandler("MatchRoomRequest")]
public static void MatchRoomRequestHandler(Session session, Packet.Request packet)
{
session.SendResponse(new MatchRoomResponse() { Code = 1 }, packet.Id);
}
}
}