376 lines
11 KiB
C#
376 lines
11 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
|
|
{
|
|
/// <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; }
|
|
}
|
|
/// <summary>
|
|
/// /////////// ******** 聊天 *******/////////////
|
|
/// </summary>
|
|
/// <summary>
|
|
/// 创建频道
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Chat_CreateChannelRequest : AMessage, ICustomRouteRequest, IProto
|
|
{
|
|
public static C2Chat_CreateChannelRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Chat_CreateChannelRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Name = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Chat_CreateChannelRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Caht2C_CreateChannelResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Chat_CreateChannelRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.ChatRoute;
|
|
[ProtoMember(1)]
|
|
public string Name { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 创建频道响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Caht2C_CreateChannelResponse : AMessage, ICustomRouteResponse, IProto
|
|
{
|
|
public static Caht2C_CreateChannelResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Caht2C_CreateChannelResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
ChannelId = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Caht2C_CreateChannelResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Caht2C_CreateChannelResponse; }
|
|
[ProtoMember(1)]
|
|
public long ChannelId { get; set; }
|
|
[ProtoMember(2)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 请求进入频道
|
|
/// </summary>
|
|
[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 C2Chat_GetOfflineMessageRequest : AMessage, ICustomRouteRequest, IProto
|
|
{
|
|
public static C2Chat_GetOfflineMessageRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Chat_GetOfflineMessageRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Chat_GetOfflineMessageRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Caht2C_GetOfflineMessageResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Chat_GetOfflineMessageRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.ChatRoute;
|
|
}
|
|
/// <summary>
|
|
/// 发送聊天响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Caht2C_GetOfflineMessageResponse : AMessage, ICustomRouteResponse, IProto
|
|
{
|
|
public static Caht2C_GetOfflineMessageResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Caht2C_GetOfflineMessageResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
Message.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Caht2C_GetOfflineMessageResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Caht2C_GetOfflineMessageResponse; }
|
|
[ProtoMember(1)]
|
|
public List<ChatMessageInfo> Message = new List<ChatMessageInfo>();
|
|
[ProtoMember(2)]
|
|
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; }
|
|
}
|
|
/// <summary>
|
|
/// 获取聊天记录请求
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class C2Chat_GetChatRecordRequest : AMessage, ICustomRouteRequest, IProto
|
|
{
|
|
public static C2Chat_GetChatRecordRequest Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<C2Chat_GetChatRecordRequest>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
Target = default;
|
|
Type = default;
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<C2Chat_GetChatRecordRequest>(this);
|
|
#endif
|
|
}
|
|
[ProtoIgnore]
|
|
public Caht2C_GetChatRecordResponse ResponseType { get; set; }
|
|
public uint OpCode() { return OuterOpcode.C2Chat_GetChatRecordRequest; }
|
|
[ProtoIgnore]
|
|
public int RouteType => Fantasy.RouteType.ChatRoute;
|
|
[ProtoMember(1)]
|
|
public long Target { get; set; }
|
|
[ProtoMember(2)]
|
|
public int Type { get; set; }
|
|
}
|
|
/// <summary>
|
|
/// 获取聊天记录响应
|
|
/// </summary>
|
|
[ProtoContract]
|
|
public partial class Caht2C_GetChatRecordResponse : AMessage, ICustomRouteResponse, IProto
|
|
{
|
|
public static Caht2C_GetChatRecordResponse Create(Scene scene)
|
|
{
|
|
return scene.MessagePoolComponent.Rent<Caht2C_GetChatRecordResponse>();
|
|
}
|
|
public override void Dispose()
|
|
{
|
|
ErrorCode = default;
|
|
Messages.Clear();
|
|
#if FANTASY_NET || FANTASY_UNITY
|
|
GetScene().MessagePoolComponent.Return<Caht2C_GetChatRecordResponse>(this);
|
|
#endif
|
|
}
|
|
public uint OpCode() { return OuterOpcode.Caht2C_GetChatRecordResponse; }
|
|
[ProtoMember(1)]
|
|
public List<ChatMessageInfo> Messages = new List<ChatMessageInfo>();
|
|
[ProtoMember(2)]
|
|
public uint ErrorCode { get; set; }
|
|
}
|
|
}
|