handles draw and comms command
This commit is contained in:
parent
6c5aca3c3a
commit
1a77d304a0
|
@ -1,12 +0,0 @@
|
||||||
namespace AscNet.GameServer.Handlers
|
|
||||||
{
|
|
||||||
internal class CommunicationModule
|
|
||||||
{
|
|
||||||
/* TODO: Need types
|
|
||||||
[RequestPacketHandler("ChangeCommunicationRequest")]
|
|
||||||
public static void ChangeCommunicationRequestHandler(Session session, Packet.Request packet)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
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 DrawGetDrawGroupListResponse
|
||||||
|
{
|
||||||
|
public int Code { get; set; }
|
||||||
|
public List<dynamic> DrawGroupInfoList { get; set; } = new();
|
||||||
|
}
|
||||||
|
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
internal class DrawModule
|
||||||
|
{
|
||||||
|
[RequestPacketHandler("DrawGetDrawGroupListRequest")]
|
||||||
|
public static void DrawGetDrawGroupListRequestHandler(Session session, Packet.Request packet)
|
||||||
|
{
|
||||||
|
session.SendResponse(new DrawGetDrawGroupListResponse(), packet.Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -3,12 +3,23 @@ using MessagePack;
|
||||||
|
|
||||||
namespace AscNet.GameServer.Handlers
|
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)]
|
[MessagePackObject(true)]
|
||||||
public class ChangePlayerMarkRequest
|
public class ChangePlayerMarkRequest
|
||||||
{
|
{
|
||||||
public long MaskId;
|
public long MaskId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class ChangeCommunicationResponse
|
||||||
|
{
|
||||||
|
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 PlayerModule
|
internal class PlayerModule
|
||||||
{
|
{
|
||||||
[RequestPacketHandler("ChangePlayerMarkRequest")]
|
[RequestPacketHandler("ChangePlayerMarkRequest")]
|
||||||
|
@ -25,5 +36,11 @@ namespace AscNet.GameServer.Handlers
|
||||||
session.player.PlayerData.Marks.Add(request.MaskId);
|
session.player.PlayerData.Marks.Add(request.MaskId);
|
||||||
session.SendResponse(new ChangePlayerMarkResponse(), packet.Id);
|
session.SendResponse(new ChangePlayerMarkResponse(), packet.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[RequestPacketHandler("ChangeCommunicationRequest")]
|
||||||
|
public static void ChangeCommunicationRequestHandler(Session session, Packet.Request packet)
|
||||||
|
{
|
||||||
|
session.SendResponse(new ChangeCommunicationResponse(), packet.Id);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue