ascnet/AscNet.GameServer/Handlers/TaskModule.cs

38 lines
1.2 KiB
C#
Raw Normal View History

using AscNet.Common.MsgPack;
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 GetCourseRewardRequest
{
public int StageId;
}
[MessagePackObject(true)]
public class GetCourseRewardResponse
{
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 TaskModule
{
[RequestPacketHandler("DoClientTaskEventRequest")]
public static void DoClientTaskEventRequestHandler(Session session, Packet.Request packet)
{
session.SendResponse(new DoClientTaskEventResponse(), packet.Id);
}
[RequestPacketHandler("GetCourseRewardRequest")]
public static void GetCourseRewardRequestHandler(Session session, Packet.Request packet)
{
session.SendResponse(new GetCourseRewardResponse() { Code = 1 }, packet.Id);
}
}
}