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(); } public override void Dispose() { Username = default; Password = default; LoginType = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(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; } } [ProtoContract] public partial class A2C_LoginResponse : AMessage, IResponse, IProto { public static A2C_LoginResponse Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { ErrorCode = default; ToKen = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.A2C_LoginResponse; } [ProtoMember(1)] public string ToKen { get; set; } [ProtoMember(2)] public uint ErrorCode { get; set; } } /// /// 客户端登录到Gate服务器 /// [ProtoContract] public partial class C2G_LoginRequest : AMessage, IRequest, IProto { public static C2G_LoginRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { ToKen = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(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(); } public override void Dispose() { ErrorCode = default; GameAccountInfo = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.G2C_LoginResponse; } [ProtoMember(1)] public GameAccountInfo GameAccountInfo { get; set; } [ProtoMember(2)] public uint ErrorCode { get; set; } } /// /// 通知客户端重复登录 /// [ProtoContract] public partial class G2C_RepeatLogin : AMessage, IMessage, IProto { public static G2C_RepeatLogin Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.G2C_RepeatLogin; } } /// /// GameAccount实体类 /// [ProtoContract] public partial class GameAccountInfo : AMessage, IProto { public static GameAccountInfo Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { CreateTime = default; LoginTime = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } [ProtoMember(1)] public long CreateTime { get; set; } [ProtoMember(2)] public long LoginTime { get; set; } } /// /// 拿到当前账号的信息 /// [ProtoContract] public partial class C2G_GetAccountInfoRequest : AMessage, IRequest, IProto { public static C2G_GetAccountInfoRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } [ProtoIgnore] public G2C_GetAccountInfoResponse ResponseType { get; set; } public uint OpCode() { return OuterOpcode.C2G_GetAccountInfoRequest; } } [ProtoContract] public partial class G2C_GetAccountInfoResponse : AMessage, IResponse, IProto { public static G2C_GetAccountInfoResponse Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { ErrorCode = default; GameAccountInfo = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return OuterOpcode.G2C_GetAccountInfoResponse; } [ProtoMember(1)] public GameAccountInfo GameAccountInfo { get; set; } [ProtoMember(2)] public uint ErrorCode { get; set; } } }