forked from PGR/ascnet
PayInitiatedRequest stub to prevent softlock on purchasing Rainbow Cards
This commit is contained in:
parent
443a4393a5
commit
3e2caf704d
|
@ -1,14 +1,37 @@
|
||||||
using AscNet.Common.MsgPack;
|
using AscNet.Common.MsgPack;
|
||||||
|
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)]
|
||||||
|
public class PayInitiatedRequest
|
||||||
|
{
|
||||||
|
public string Key;
|
||||||
|
public string? TargetParam;
|
||||||
|
}
|
||||||
|
|
||||||
|
[MessagePackObject(true)]
|
||||||
|
public class PayInitiatedResponse
|
||||||
|
{
|
||||||
|
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 PayModule
|
internal class PayModule
|
||||||
{
|
{
|
||||||
[RequestPacketHandler("GetPurchaseListRequest")]
|
[RequestPacketHandler("GetPurchaseListRequest")]
|
||||||
public static void GetPurchaseListRequestHandler(Session session, Packet.Request packet)
|
public static void GetPurchaseListRequestHandler(Session session, Packet.Request packet)
|
||||||
{
|
{
|
||||||
GetPurchaseListResponse getPurchaseListResponse = new();
|
session.SendResponse(new GetPurchaseListResponse(), packet.Id);
|
||||||
session.SendResponse(getPurchaseListResponse, packet.Id);
|
}
|
||||||
|
|
||||||
|
[RequestPacketHandler("PayInitiatedRequest")]
|
||||||
|
public static void PayInitiatedRequest(Session session, Packet.Request packet)
|
||||||
|
{
|
||||||
|
session.SendResponse(new PayInitiatedResponse() { Code = 1 }, packet.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue