2023-12-02 07:28:19 +00:00
|
|
|
|
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 GetAndroidOrIosMoneyCardResponse
|
|
|
|
|
{
|
|
|
|
|
public int Code;
|
|
|
|
|
public int MoneyCard;
|
|
|
|
|
public int Count;
|
|
|
|
|
}
|
2024-04-13 04:47:55 +00:00
|
|
|
|
|
|
|
|
|
[MessagePackObject(true)]
|
|
|
|
|
public class ItemUseRequest
|
|
|
|
|
{
|
|
|
|
|
public int Id;
|
|
|
|
|
public int Count;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[MessagePackObject(true)]
|
|
|
|
|
public class ItemUseResponse
|
|
|
|
|
{
|
|
|
|
|
public int Code;
|
|
|
|
|
}
|
2023-12-02 07:28:19 +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 ItemModule
|
|
|
|
|
{
|
|
|
|
|
[RequestPacketHandler("GetAndroidOrIosMoneyCardRequest")]
|
|
|
|
|
public static void GetAndroidOrIosMoneyCardRequestHandler(Session session, Packet.Request packet)
|
|
|
|
|
{
|
|
|
|
|
session.SendResponse(new GetAndroidOrIosMoneyCardResponse()
|
|
|
|
|
{
|
|
|
|
|
Code = 0,
|
|
|
|
|
Count = 0,
|
|
|
|
|
MoneyCard = 0
|
|
|
|
|
}, packet.Id);
|
|
|
|
|
}
|
2024-04-13 04:47:55 +00:00
|
|
|
|
|
|
|
|
|
[RequestPacketHandler("ItemUseRequest")]
|
2024-04-13 04:53:57 +00:00
|
|
|
|
public static void ItemUseRequestHandler(Session session, Packet.Request packet)
|
2024-04-13 04:47:55 +00:00
|
|
|
|
{
|
|
|
|
|
session.SendResponse(new ItemUseResponse() { Code = 1 }, packet.Id);
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-12-02 07:28:19 +00:00
|
|
|
|
}
|