using ProtoBuf; using System; using System.Collections.Generic; using MongoDB.Bson.Serialization.Attributes; using Fantasy; using Fantasy.Network.Interface; using Fantasy.Serialize; // ReSharper disable InconsistentNaming // ReSharper disable RedundantUsingDirective // ReSharper disable RedundantOverriddenMember // ReSharper disable PartialTypeWithSinglePart // ReSharper disable UnusedAutoPropertyAccessor.Global // ReSharper disable MemberCanBePrivate.Global // ReSharper disable CheckNamespace #pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type. #pragma warning disable CS8618 namespace Fantasy { /// /// /////////// ******** 物品信息 *******///////////// /// /// /// 请求背包列表 /// [ProtoContract] public partial class C2Game_GetItemsRequest : AMessage, ICustomRouteRequest { public static C2Game_GetItemsRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } [ProtoIgnore] public Game2C_GetItemsResponse ResponseType { get; set; } public uint OpCode() { return OuterOpcode.C2Game_GetItemsRequest; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; } /// /// 请求背包列表响应 /// [ProtoContract] public partial class Game2C_GetItemsResponse : AMessage, ICustomRouteResponse { public static Game2C_GetItemsResponse Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { ErrorCode = default; Items.Clear(); Rigs.Clear(); #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.Game2C_GetItemsResponse; } [ProtoMember(1)] public List Items = new List(); [ProtoMember(2)] public List Rigs = new List(); [ProtoMember(3)] public uint ErrorCode { get; set; } } /// /// 请求使用物品 /// [ProtoContract] public partial class C2Game_UseItemRequest : AMessage, ICustomRouteRequest { public static C2Game_UseItemRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } [ProtoIgnore] public Game2C_UseItemResponse ResponseType { get; set; } public uint OpCode() { return OuterOpcode.C2Game_UseItemRequest; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; } /// /// 请求使用物品响应 /// [ProtoContract] public partial class Game2C_UseItemResponse : AMessage, ICustomRouteResponse { public static Game2C_UseItemResponse Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { ErrorCode = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.Game2C_UseItemResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } } /// /// 物品变化 /// [ProtoContract] public partial class Game2C_ItemChange : AMessage, ICustomRouteMessage { public static Game2C_ItemChange Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { Type = default; Items.Clear(); Removes.Clear(); #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(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 Items = new List(); [ProtoMember(3)] public List Removes = new List(); } /// /// /////////// ******** 钓组 *******///////////// /// /// /// 请求安装或取下配件 /// [ProtoContract] public partial class C2Game_RigChangeRequest : AMessage, ICustomRouteRequest { public static C2Game_RigChangeRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { RodId = default; RigId = default; IsAdd = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(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 RodId { get; set; } [ProtoMember(2)] public long RigId { get; set; } [ProtoMember(3)] public bool IsAdd { get; set; } } /// /// 请求安装配件响应 /// [ProtoContract] public partial class Game2C_RigChangeResponse : AMessage, ICustomRouteResponse { public static Game2C_RigChangeResponse Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { ErrorCode = default; Rigs = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.Game2C_RigChangeResponse; } [ProtoMember(1)] public ItemBindInfo Rigs { get; set; } [ProtoMember(2)] public uint ErrorCode { get; set; } } /// /// /////////// ******** 鱼护 *******///////////// /// /// /// 请求鱼护列表 /// [ProtoContract] public partial class C2Game_GetFishsRequest : AMessage, ICustomRouteRequest { public static C2Game_GetFishsRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } [ProtoIgnore] public Game2C_GetFishsResponse ResponseType { get; set; } public uint OpCode() { return OuterOpcode.C2Game_GetFishsRequest; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; } /// /// 请求鱼护列表响应 /// [ProtoContract] public partial class Game2C_GetFishsResponse : AMessage, ICustomRouteResponse { public static Game2C_GetFishsResponse Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { ErrorCode = default; Fishs.Clear(); #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.Game2C_GetFishsResponse; } [ProtoMember(1)] public List Fishs = new List(); [ProtoMember(2)] public uint ErrorCode { get; set; } } /// /// 鱼护变化 /// [ProtoContract] public partial class Game2C_FishChange : AMessage, ICustomRouteMessage { public static Game2C_FishChange Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { Type = default; Fishs.Clear(); Removes.Clear(); #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(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 Fishs = new List(); [ProtoMember(3)] public List Removes = new List(); } /// /// 请求出售 /// [ProtoContract] public partial class C2Game_SellFishRequest : AMessage, ICustomRouteRequest { public static C2Game_SellFishRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { Ids.Clear(); #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(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 Ids = new List(); } /// /// 请求出售响应 /// [ProtoContract] public partial class Game2C_SellFishResponse : AMessage, ICustomRouteResponse { public static Game2C_SellFishResponse Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { ErrorCode = default; Awards.Clear(); #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.Game2C_SellFishResponse; } [ProtoMember(1)] public List Awards = new List(); [ProtoMember(2)] public uint ErrorCode { get; set; } } /// /// /////////// ******** 商店 *******///////////// /// /// /// 请求购买 /// [ProtoContract] public partial class C2Game_BuyRequest : AMessage, ICustomRouteRequest { public static C2Game_BuyRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } [ProtoIgnore] public Game2C_GetFishsResponse ResponseType { get; set; } public uint OpCode() { return OuterOpcode.C2Game_BuyRequest; } [ProtoIgnore] public int RouteType => Fantasy.RouteType.GameRoute; } /// /// 请求购买响应 /// [ProtoContract] public partial class Game2C_BuyResponse : AMessage, ICustomRouteResponse { public static Game2C_BuyResponse Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { ErrorCode = default; Awards.Clear(); #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.Game2C_BuyResponse; } [ProtoMember(1)] public List Awards = new List(); [ProtoMember(2)] public uint ErrorCode { get; set; } } }