560 lines
16 KiB
C#
560 lines
16 KiB
C#
using ProtoBuf;
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
using Fantasy;
|
|
using Fantasy.Network.Interface;
|
|
using Fantasy.Serialize;
|
|
#pragma warning disable CS8618
|
|
|
|
namespace Fantasy
|
|
{
|
|
/// <summary>
|
|
/// /////////// ******** 物品信息 *******/////////////
|
|
/// </summary>
|
|
/// <summary>
|
|
/// 请求背包列表
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Game_GetItemsRequest : AMessage, ICustomRouteRequest
|
|
{
|
|
public static C2Game_GetItemsRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Game_GetItemsRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Game_GetItemsRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2C_GetItemsResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Game_GetItemsRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.GameRoute;
|
|
}
|
|
/// <summary>
|
|
/// 请求背包列表响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_GetItemsResponse : AMessage, ICustomRouteResponse
|
|
{
|
|
public static Game2C_GetItemsResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_GetItemsResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
Items.Clear();
|
|
Rigs.Clear();
|
|
Slots.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_GetItemsResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_GetItemsResponse; }
|
|
[ProtoMember(1)]
|
|
public List<ItemInfo> Items = new List<ItemInfo>();
|
|
[ProtoMember(2)]
|
|
public List<ItemBindInfo> Rigs = new List<ItemBindInfo>();
|
|
[ProtoMember(3)]
|
|
public List<long> Slots = new List<long>();
|
|
[ProtoMember(4)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 请求使用物品
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Game_UseItemRequest : AMessage, ICustomRouteRequest
|
|
{
|
|
public static C2Game_UseItemRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Game_UseItemRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ItemId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Game_UseItemRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2C_UseItemResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Game_UseItemRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.GameRoute;
|
|
[ProtoMember(1)]
|
|
public long ItemId { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 请求使用物品响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_UseItemResponse : AMessage, ICustomRouteResponse
|
|
{
|
|
public static Game2C_UseItemResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_UseItemResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_UseItemResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_UseItemResponse; }
|
|
[ProtoMember(1)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 物品变化
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_ItemChange : AMessage, ICustomRouteMessage
|
|
{
|
|
public static Game2C_ItemChange Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_ItemChange>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Type = default;
|
|
Items.Clear();
|
|
Removes.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_ItemChange>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_ItemChange; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.GameRoute;
|
|
[ProtoMember(1)]
|
|
public int Type { get; set; }
|
|
[ProtoMember(2)]
|
|
public List<ItemInfo> Items = new List<ItemInfo>();
|
|
[ProtoMember(3)]
|
|
public List<long> Removes = new List<long>();
|
|
}
|
|
/// <summary>
|
|
/// /////////// ******** 钓组 *******/////////////
|
|
/// </summary>
|
|
/// <summary>
|
|
/// 请求安装或取下配件
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Game_RigChangeRequest : AMessage, ICustomRouteRequest
|
|
{
|
|
public static C2Game_RigChangeRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Game_RigChangeRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ItemId = default;
|
|
RigId = default;
|
|
OldRigId = default;
|
|
IsAdd = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Game_RigChangeRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2C_RigChangeResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Game_RigChangeRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.GameRoute;
|
|
[ProtoMember(1)]
|
|
public long ItemId { get; set; }
|
|
[ProtoMember(2)]
|
|
public long RigId { get; set; }
|
|
[ProtoMember(3)]
|
|
public long OldRigId { get; set; }
|
|
[ProtoMember(4)]
|
|
public bool IsAdd { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 请求安装配件响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_RigChangeResponse : AMessage, ICustomRouteResponse
|
|
{
|
|
public static Game2C_RigChangeResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_RigChangeResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
Rigs = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_RigChangeResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_RigChangeResponse; }
|
|
[ProtoMember(1)]
|
|
public ItemBindInfo Rigs { get; set; }
|
|
[ProtoMember(2)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// /////////// ******** 快速使用插槽 *******/////////////
|
|
/// </summary>
|
|
/// <summary>
|
|
/// 请求设置快速使用
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Game_SetSlotRequest : AMessage, ICustomRouteRequest
|
|
{
|
|
public static C2Game_SetSlotRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Game_SetSlotRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Index = default;
|
|
Id = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Game_SetSlotRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2C_SetSlotResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Game_SetSlotRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.GameRoute;
|
|
[ProtoMember(1)]
|
|
public int Index { get; set; }
|
|
[ProtoMember(2)]
|
|
public long Id { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 请求设置快速使用响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_SetSlotResponse : AMessage, ICustomRouteResponse
|
|
{
|
|
public static Game2C_SetSlotResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_SetSlotResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
Slots.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_SetSlotResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_SetSlotResponse; }
|
|
[ProtoMember(1)]
|
|
public List<long> Slots = new List<long>();
|
|
[ProtoMember(2)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// /////////// ******** 鱼护 *******/////////////
|
|
/// </summary>
|
|
/// <summary>
|
|
/// 请求鱼护列表
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Game_GetFishsRequest : AMessage, ICustomRouteRequest
|
|
{
|
|
public static C2Game_GetFishsRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Game_GetFishsRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Game_GetFishsRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2C_GetFishsResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Game_GetFishsRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.GameRoute;
|
|
}
|
|
/// <summary>
|
|
/// 请求鱼护列表响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_GetFishsResponse : AMessage, ICustomRouteResponse
|
|
{
|
|
public static Game2C_GetFishsResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_GetFishsResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
Fishs.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_GetFishsResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_GetFishsResponse; }
|
|
[ProtoMember(1)]
|
|
public List<FishInfo> Fishs = new List<FishInfo>();
|
|
[ProtoMember(2)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 鱼护变化
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_FishChange : AMessage, ICustomRouteMessage
|
|
{
|
|
public static Game2C_FishChange Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_FishChange>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Type = default;
|
|
Fishs.Clear();
|
|
Removes.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_FishChange>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_FishChange; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.GameRoute;
|
|
[ProtoMember(1)]
|
|
public int Type { get; set; }
|
|
[ProtoMember(2)]
|
|
public List<FishInfo> Fishs = new List<FishInfo>();
|
|
[ProtoMember(3)]
|
|
public List<long> Removes = new List<long>();
|
|
}
|
|
/// <summary>
|
|
/// 请求出售
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Game_SellFishRequest : AMessage, ICustomRouteRequest
|
|
{
|
|
public static C2Game_SellFishRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Game_SellFishRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Ids.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Game_SellFishRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2C_SellFishResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Game_SellFishRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.GameRoute;
|
|
[ProtoMember(1)]
|
|
public List<long> Ids = new List<long>();
|
|
}
|
|
/// <summary>
|
|
/// 请求出售响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_SellFishResponse : AMessage, ICustomRouteResponse
|
|
{
|
|
public static Game2C_SellFishResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_SellFishResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
Awards.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_SellFishResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_SellFishResponse; }
|
|
[ProtoMember(1)]
|
|
public List<AwardInfo> Awards = new List<AwardInfo>();
|
|
[ProtoMember(2)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// /////////// ******** 商店 *******/////////////
|
|
/// </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]
|
|
public partial class C2Game_BuyRequest : AMessage, ICustomRouteRequest
|
|
{
|
|
public static C2Game_BuyRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Game_BuyRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
BuyId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Game_BuyRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2C_GetFishsResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Game_BuyRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.GameRoute;
|
|
[ProtoMember(1)]
|
|
public uint BuyId { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 请求购买响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_BuyResponse : AMessage, ICustomRouteResponse
|
|
{
|
|
public static Game2C_BuyResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_BuyResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_BuyResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_BuyResponse; }
|
|
[ProtoMember(1)]
|
|
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>();
|
|
}
|
|
/// <summary>
|
|
/// /////////// ******** GM *******/////////////
|
|
/// </summary>
|
|
/// <summary>
|
|
/// 请求执行GM
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Game_GMRequest : AMessage, ICustomRouteRequest
|
|
{
|
|
public static C2Game_GMRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Game_GMRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Cmd = default;
|
|
Args = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Game_GMRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Game2C_GMResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Game_GMRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.GameRoute;
|
|
[ProtoMember(1)]
|
|
public string Cmd { get; set; }
|
|
[ProtoMember(2)]
|
|
public string Args { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 执行GM返回
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Game2C_GMResponse : AMessage, ICustomRouteResponse
|
|
{
|
|
public static Game2C_GMResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Game2C_GMResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Game2C_GMResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Game2C_GMResponse; }
|
|
[ProtoMember(1)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
}
|
|
|