2024-04-11 05:21:06 +00:00
|
|
|
|
using MessagePack;
|
2023-11-19 07:44:27 +00:00
|
|
|
|
|
|
|
|
|
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.
|
2024-04-13 06:30:53 +00:00
|
|
|
|
[MessagePackObject(true)]
|
|
|
|
|
public class MailReadRequest
|
|
|
|
|
{
|
|
|
|
|
public string Id;
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-19 07:44:27 +00:00
|
|
|
|
[MessagePackObject(true)]
|
|
|
|
|
public class MailReadResponse
|
|
|
|
|
{
|
|
|
|
|
public int Code;
|
|
|
|
|
}
|
2024-04-13 06:30:53 +00:00
|
|
|
|
|
|
|
|
|
[MessagePackObject(true)]
|
|
|
|
|
public class MailDeleteRequest
|
|
|
|
|
{
|
|
|
|
|
}
|
2023-11-19 07:44:27 +00:00
|
|
|
|
|
|
|
|
|
[MessagePackObject(true)]
|
2024-04-13 06:30:53 +00:00
|
|
|
|
public class MailDeleteResponse
|
2023-11-19 07:44:27 +00:00
|
|
|
|
{
|
2024-04-13 06:30:53 +00:00
|
|
|
|
public int Code;
|
2023-11-19 07:44:27 +00:00
|
|
|
|
}
|
|
|
|
|
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
internal class MailModule
|
|
|
|
|
{
|
2024-04-13 06:30:53 +00:00
|
|
|
|
// TODO: Read mail
|
2023-11-19 07:44:27 +00:00
|
|
|
|
[RequestPacketHandler("MailReadRequest")]
|
|
|
|
|
public static void MailReadRequestHandler(Session session, Packet.Request packet)
|
|
|
|
|
{
|
|
|
|
|
session.SendResponse(new MailReadResponse(), packet.Id);
|
|
|
|
|
}
|
2024-04-13 06:30:53 +00:00
|
|
|
|
|
|
|
|
|
// TODO: Delete mail
|
|
|
|
|
[RequestPacketHandler("MailDeleteRequest")]
|
|
|
|
|
public static void MailDeleteRequestHandler(Session session, Packet.Request packet)
|
|
|
|
|
{
|
|
|
|
|
session.SendResponse(new MailDeleteResponse(), packet.Id);
|
|
|
|
|
}
|
2023-11-19 07:44:27 +00:00
|
|
|
|
}
|
|
|
|
|
}
|