Files
Fishing2Server/Entity/Generate/NetworkProtocol/GameMessage.cs
2025-10-29 22:41:19 +08:00

379 lines
11 KiB
C#

using ProtoBuf;
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
{
/// <summary>
/// /////////// ******** 物品信息 *******/////////////
/// </summary>
/// <summary>
/// 请求背包列表
/// </summary>
[ProtoContract]
public partial class C2Game_GetItemsRequest : AMessage, ICustomRouteRequest, IProto
{
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, IProto
{
public static Game2C_GetItemsResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_GetItemsResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Items.Clear();
Rigs.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 uint ErrorCode { get; set; }
}
/// <summary>
/// 请求使用物品
/// </summary>
[ProtoContract]
public partial class C2Game_UseItemRequest : AMessage, ICustomRouteRequest, IProto
{
public static C2Game_UseItemRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_UseItemRequest>();
}
public override void Dispose()
{
#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;
}
/// <summary>
/// 请求使用物品响应
/// </summary>
[ProtoContract]
public partial class Game2C_UseItemResponse : AMessage, ICustomRouteResponse, IProto
{
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, IProto
{
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, IProto
{
public static C2Game_RigChangeRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_RigChangeRequest>();
}
public override void Dispose()
{
RodId = default;
RigId = 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 RodId { get; set; }
[ProtoMember(2)]
public long RigId { get; set; }
[ProtoMember(3)]
public bool IsAdd { get; set; }
}
/// <summary>
/// 请求安装配件响应
/// </summary>
[ProtoContract]
public partial class Game2C_RigChangeResponse : AMessage, ICustomRouteResponse, IProto
{
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_GetFishsRequest : AMessage, ICustomRouteRequest, IProto
{
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, IProto
{
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, IProto
{
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, IProto
{
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, IProto
{
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_BuyRequest : AMessage, ICustomRouteRequest, IProto
{
public static C2Game_BuyRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_BuyRequest>();
}
public override void Dispose()
{
#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;
}
/// <summary>
/// 请求购买响应
/// </summary>
[ProtoContract]
public partial class Game2C_BuyResponse : AMessage, ICustomRouteResponse, IProto
{
public static Game2C_BuyResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_BuyResponse>();
}
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; }
}
}