Files
Fishing2Server/Entity/Generate/NetworkProtocol/OuterMessage.cs
2025-08-12 14:05:23 +08:00

429 lines
12 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
{
[ProtoContract]
public partial class C2A_LoginRequest : AMessage, IRequest, IProto
{
public static C2A_LoginRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2A_LoginRequest>();
}
public override void Dispose()
{
Username = default;
Password = default;
LoginType = default;
Region = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2A_LoginRequest>(this);
#endif
}
[ProtoIgnore]
public A2C_LoginResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2A_LoginRequest; }
[ProtoMember(1)]
public string Username { get; set; }
[ProtoMember(2)]
public string Password { get; set; }
[ProtoMember(3)]
public int LoginType { get; set; }
[ProtoMember(4)]
public int Region { get; set; }
}
[ProtoContract]
public partial class A2C_LoginResponse : AMessage, IResponse, IProto
{
public static A2C_LoginResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<A2C_LoginResponse>();
}
public override void Dispose()
{
ErrorCode = default;
ToKen = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<A2C_LoginResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.A2C_LoginResponse; }
[ProtoMember(1)]
public string ToKen { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 客户端登录到Gate服务器
/// </summary>
[ProtoContract]
public partial class C2G_LoginRequest : AMessage, IRequest, IProto
{
public static C2G_LoginRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2G_LoginRequest>();
}
public override void Dispose()
{
ToKen = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2G_LoginRequest>(this);
#endif
}
[ProtoIgnore]
public G2C_LoginResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2G_LoginRequest; }
[ProtoMember(1)]
public string ToKen { get; set; }
}
[ProtoContract]
public partial class G2C_LoginResponse : AMessage, IResponse, IProto
{
public static G2C_LoginResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2C_LoginResponse>();
}
public override void Dispose()
{
ErrorCode = default;
GameAccountInfo = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2C_LoginResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.G2C_LoginResponse; }
[ProtoMember(1)]
public GameAccountInfo GameAccountInfo { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 通知客户端重复登录
/// </summary>
[ProtoContract]
public partial class G2C_RepeatLogin : AMessage, IMessage, IProto
{
public static G2C_RepeatLogin Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2C_RepeatLogin>();
}
public override void Dispose()
{
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2C_RepeatLogin>(this);
#endif
}
public uint OpCode() { return OuterOpcode.G2C_RepeatLogin; }
}
/// <summary>
/// GameAccount实体类
/// </summary>
[ProtoContract]
public partial class GameAccountInfo : AMessage, IProto
{
public static GameAccountInfo Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<GameAccountInfo>();
}
public override void Dispose()
{
CreateTime = default;
LoginTime = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<GameAccountInfo>(this);
#endif
}
[ProtoMember(1)]
public long CreateTime { get; set; }
[ProtoMember(2)]
public long LoginTime { get; set; }
}
[ProtoContract]
public partial class C2Game_GetRoleInfoRequest : AMessage, ICustomRouteRequest, IProto
{
public static C2Game_GetRoleInfoRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_GetRoleInfoRequest>();
}
public override void Dispose()
{
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_GetRoleInfoRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_GetRoleInfoResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_GetRoleInfoRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
}
[ProtoContract]
public partial class Game2C_GetRoleInfoResponse : AMessage, ICustomRouteResponse, IProto
{
public static Game2C_GetRoleInfoResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_GetRoleInfoResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Name = default;
RoleId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_GetRoleInfoResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_GetRoleInfoResponse; }
[ProtoMember(1)]
public string Name { get; set; }
[ProtoMember(2)]
public string RoleId { get; set; }
[ProtoMember(3)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 请求邮件列表
/// </summary>
[ProtoContract]
public partial class C2Game_GetMailsRequest : AMessage, ICustomRouteRequest, IProto
{
public static C2Game_GetMailsRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Game_GetMailsRequest>();
}
public override void Dispose()
{
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Game_GetMailsRequest>(this);
#endif
}
[ProtoIgnore]
public Game2C_GetMailsResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Game_GetMailsRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
}
/// <summary>
/// 获取邮件列表响应
/// </summary>
[ProtoContract]
public partial class Game2C_GetMailsResponse : AMessage, ICustomRouteResponse, IProto
{
public static Game2C_GetMailsResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_GetMailsResponse>();
}
public override void Dispose()
{
ErrorCode = default;
Mail.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_GetMailsResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_GetMailsResponse; }
[ProtoMember(1)]
public List<MailInfo> Mail = new List<MailInfo>();
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 新邮件推送
/// </summary>
[ProtoContract]
public partial class Game2C_HaveMail : AMessage, ICustomRouteMessage, IProto
{
public static Game2C_HaveMail Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_HaveMail>();
}
public override void Dispose()
{
Mail = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_HaveMail>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_HaveMail; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public MailInfo Mail { get; set; }
}
[ProtoContract]
public partial class Game2C_MailState : AMessage, ICustomRouteMessage, IProto
{
public static Game2C_MailState Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2C_MailState>();
}
public override void Dispose()
{
MailState = default;
MailId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_MailState>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_MailState; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.GameRoute;
[ProtoMember(1)]
public int MailState { get; set; }
[ProtoMember(2)]
public long MailId { get; set; }
}
[ProtoContract]
public partial class C2Chat_JoinChannelRequest : AMessage, ICustomRouteRequest, IProto
{
public static C2Chat_JoinChannelRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Chat_JoinChannelRequest>();
}
public override void Dispose()
{
Target = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Chat_JoinChannelRequest>(this);
#endif
}
[ProtoIgnore]
public Caht2C_JoinChannelResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Chat_JoinChannelRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.ChatRoute;
[ProtoMember(1)]
public long Target { get; set; }
}
/// <summary>
/// 进入频道响应
/// </summary>
[ProtoContract]
public partial class Caht2C_JoinChannelResponse : AMessage, ICustomRouteResponse, IProto
{
public static Caht2C_JoinChannelResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Caht2C_JoinChannelResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Caht2C_JoinChannelResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Caht2C_JoinChannelResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 发送聊天
/// </summary>
[ProtoContract]
public partial class C2Chat_SendMessageRequest : AMessage, ICustomRouteRequest, IProto
{
public static C2Chat_SendMessageRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2Chat_SendMessageRequest>();
}
public override void Dispose()
{
Type = default;
Message = default;
Target = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2Chat_SendMessageRequest>(this);
#endif
}
[ProtoIgnore]
public Caht2C_SendMessageResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2Chat_SendMessageRequest; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.ChatRoute;
[ProtoMember(1)]
public int Type { get; set; }
[ProtoMember(2)]
public string Message { get; set; }
[ProtoMember(3)]
public long Target { get; set; }
}
/// <summary>
/// 发送聊天响应
/// </summary>
[ProtoContract]
public partial class Caht2C_SendMessageResponse : AMessage, ICustomRouteResponse, IProto
{
public static Caht2C_SendMessageResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Caht2C_SendMessageResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Caht2C_SendMessageResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Caht2C_SendMessageResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 推送消息
/// </summary>
[ProtoContract]
public partial class Chat2C_Message : AMessage, ICustomRouteMessage, IProto
{
public static Chat2C_Message Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Chat2C_Message>();
}
public override void Dispose()
{
Message = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Chat2C_Message>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Chat2C_Message; }
[ProtoIgnore]
public int RouteType => Fantasy.RouteType.ChatRoute;
[ProtoMember(1)]
public ChatMessageInfo Message { get; set; }
}
[ProtoContract]
public partial class C2G_LoginRequest1 : AMessage, IRequest, IProto
{
public static C2G_LoginRequest1 Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<C2G_LoginRequest1>();
}
public override void Dispose()
{
ToKen = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<C2G_LoginRequest1>(this);
#endif
}
[ProtoIgnore]
public G2C_LoginResponse ResponseType { get; set; }
public uint OpCode() { return OuterOpcode.C2G_LoginRequest1; }
[ProtoMember(1)]
public string ToKen { get; set; }
}
}