Files
Fishing2/Assets/Scripts/Generate/NetworkProtocol/OuterMessage.cs
2025-08-12 17:28:40 +08:00

188 lines
5.1 KiB
C#

using ProtoBuf;
using System.Collections.Generic;
using Fantasy;
using NBC;
using NBC.Network.Interface;
using NBC.Serialize;
#pragma warning disable CS8618
namespace NBC
{
[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;
Roles = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2C_GetRoleInfoResponse>(this);
#endif
}
public uint OpCode() { return OuterOpcode.Game2C_GetRoleInfoResponse; }
[ProtoMember(1)]
public RoleSimpleInfo Roles { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
}