forked from PGR/ascnet
ItemUseRequest stub to prevent softlock when using consumables
This commit is contained in:
parent
3e2caf704d
commit
aae1314558
|
@ -3,6 +3,8 @@ 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 GuideGroupFinishRequest
|
||||
{
|
||||
|
@ -34,7 +36,9 @@ namespace AscNet.GameServer.Handlers
|
|||
public int Code;
|
||||
public List<dynamic>? RewardGoodsList;
|
||||
}
|
||||
|
||||
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
#endregion
|
||||
|
||||
internal class GuideModule
|
||||
{
|
||||
[RequestPacketHandler("GuideOpenRequest")]
|
||||
|
|
|
@ -11,6 +11,19 @@ namespace AscNet.GameServer.Handlers
|
|||
public int MoneyCard;
|
||||
public int Count;
|
||||
}
|
||||
|
||||
[MessagePackObject(true)]
|
||||
public class ItemUseRequest
|
||||
{
|
||||
public int Id;
|
||||
public int Count;
|
||||
}
|
||||
|
||||
[MessagePackObject(true)]
|
||||
public class ItemUseResponse
|
||||
{
|
||||
public int Code;
|
||||
}
|
||||
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
|
||||
#endregion
|
||||
|
||||
|
@ -26,5 +39,11 @@ namespace AscNet.GameServer.Handlers
|
|||
MoneyCard = 0
|
||||
}, packet.Id);
|
||||
}
|
||||
}
|
||||
|
||||
[RequestPacketHandler("ItemUseRequest")]
|
||||
public static void ItemUseRequest(Session session, Packet.Request packet)
|
||||
{
|
||||
session.SendResponse(new ItemUseResponse() { Code = 1 }, packet.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue