协议新增
This commit is contained in:
@@ -392,6 +392,55 @@ namespace Fantasy
|
||||
/// /////////// ******** 商店 *******/////////////
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 请求商店商品列表
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Game_GetShopItemsRequest : AMessage, ICustomRouteRequest
|
||||
{
|
||||
public static C2Game_GetShopItemsRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Game_GetShopItemsRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Shop = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_GetShopItemsRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Game2C_GetShopItemsResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Game_GetShopItemsRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public uint Shop { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求商店商品列表响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_GetShopItemsResponse : AMessage, ICustomRouteResponse
|
||||
{
|
||||
public static Game2C_GetShopItemsResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_GetShopItemsResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Items.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_GetShopItemsResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_GetShopItemsResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<ShopItemInfo> Items = new List<ShopItemInfo>();
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求购买
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
@@ -403,6 +452,7 @@ namespace Fantasy
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
BuyId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_BuyRequest>(this);
|
||||
#endif
|
||||
@@ -412,6 +462,8 @@ namespace Fantasy
|
||||
public uint OpCode() { return OuterOpcode.C2Game_BuyRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public uint BuyId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求购买响应
|
||||
@@ -426,16 +478,36 @@ namespace Fantasy
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Awards.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_BuyResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_BuyResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<AwardInfo> Awards = new List<AwardInfo>();
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 活动奖励推送
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_RewardNotify : AMessage, ICustomRouteMessage
|
||||
{
|
||||
public static Game2C_RewardNotify Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_RewardNotify>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Awards.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_RewardNotify>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_RewardNotify; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.GameRoute;
|
||||
[ProtoMember(1)]
|
||||
public List<AwardInfo> Awards = new List<AwardInfo>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user