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 { /// /// Gate服务器登陆到Mail服务器 /// [ProtoContract] public partial class G2Mail_LoginRequest : AMessage, IRouteRequest, IProto { public static G2Mail_LoginRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { Name = default; AccountId = default; CreateTime = default; GateRouteId = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } [ProtoIgnore] public Mail2G_LoginResponse ResponseType { get; set; } public uint OpCode() { return InnerOpcode.G2Mail_LoginRequest; } [ProtoMember(1)] public string Name { get; set; } [ProtoMember(2)] public long AccountId { get; set; } [ProtoMember(3)] public long CreateTime { get; set; } [ProtoMember(4)] public long GateRouteId { get; set; } } [ProtoContract] public partial class Mail2G_LoginResponse : AMessage, IRouteResponse, IProto { public static Mail2G_LoginResponse Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { ErrorCode = default; MailUnitRouteId = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return InnerOpcode.Mail2G_LoginResponse; } [ProtoMember(1)] public long MailUnitRouteId { get; set; } [ProtoMember(2)] public uint ErrorCode { get; set; } } /// /// 发送一个Gate服务器发送给Mail之间的测试协议 /// [ProtoContract] public partial class G2Mail_TestMessage : AMessage, IRouteMessage, IProto { public static G2Mail_TestMessage Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { Tag = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } public uint OpCode() { return InnerOpcode.G2Mail_TestMessage; } [ProtoMember(1)] public string Tag { get; set; } } /// /// 发送给Mail服务器进行下线 /// [ProtoContract] public partial class G2Mail_ExitRequest : AMessage, IRouteRequest, IProto { public static G2Mail_ExitRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } [ProtoIgnore] public Mail2G_ExitResponse ResponseType { get; set; } public uint OpCode() { return InnerOpcode.G2Mail_ExitRequest; } } [ProtoContract] public partial class Mail2G_ExitResponse : AMessage, IRouteResponse, IProto { public static Mail2G_ExitResponse 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 InnerOpcode.Mail2G_ExitResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } } /// /// 其他服务器发送邮件 /// public partial class Other2Mail_SendMailRequest : AMessage, IRouteRequest { public static Other2Mail_SendMailRequest Create(Scene scene) { return scene.MessagePoolComponent.Rent(); } public override void Dispose() { MailBox = default; #if FANTASY_NET || FANTASY_UNITY GetScene().MessagePoolComponent.Return(this); #endif } [BsonIgnore] public Mail2Other_SendMailResponse ResponseType { get; set; } public uint OpCode() { return InnerOpcode.Other2Mail_SendMailRequest; } public MailBox MailBox { get; set; } } [ProtoContract] public partial class Mail2Other_SendMailResponse : AMessage, IRouteResponse, IProto { public static Mail2Other_SendMailResponse 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 InnerOpcode.Mail2Other_SendMailResponse; } [ProtoMember(1)] public uint ErrorCode { get; set; } } }