完成离线消息发送和上线获取离线消息

This commit is contained in:
2025-08-13 23:44:59 +08:00
parent f8b876ca2f
commit 022cc1ac3e
39 changed files with 499 additions and 85 deletions

View File

@@ -67,6 +67,47 @@ namespace Fantasy
[ProtoMember(3)]
public uint ErrorCode { get; set; }
}
[ProtoContract]
public partial class G2Game_ExitRequest : AMessage, IRouteRequest, IProto
{
public static G2Game_ExitRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2Game_ExitRequest>();
}
public override void Dispose()
{
AccountId = default;
GateRouteId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2Game_ExitRequest>(this);
#endif
}
[ProtoIgnore]
public Game2G_ExitResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2Game_ExitRequest; }
[ProtoMember(1)]
public long AccountId { get; set; }
[ProtoMember(2)]
public long GateRouteId { get; set; }
}
[ProtoContract]
public partial class Game2G_ExitResponse : AMessage, IRouteResponse, IProto
{
public static Game2G_ExitResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2G_ExitResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2G_ExitResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.Game2G_ExitResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 通知游戏服角色进入该聊天服
/// </summary>
@@ -86,7 +127,7 @@ namespace Fantasy
#endif
}
[ProtoIgnore]
public Game2G_EnterResponse ResponseType { get; set; }
public Chat2G_EnterResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2Chat_EnterRequest; }
[ProtoMember(1)]
public RoleSimpleInfo Role { get; set; }
@@ -115,6 +156,47 @@ namespace Fantasy
public uint ErrorCode { get; set; }
}
[ProtoContract]
public partial class G2Chat_ExitRequest : AMessage, IRouteRequest, IProto
{
public static G2Chat_ExitRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2Chat_ExitRequest>();
}
public override void Dispose()
{
AccountId = default;
GateRouteId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2Chat_ExitRequest>(this);
#endif
}
[ProtoIgnore]
public Chat2G_ExitResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2Chat_ExitRequest; }
[ProtoMember(1)]
public long AccountId { get; set; }
[ProtoMember(2)]
public long GateRouteId { get; set; }
}
[ProtoContract]
public partial class Chat2G_ExitResponse : AMessage, IRouteResponse, IProto
{
public static Chat2G_ExitResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Chat2G_ExitResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Chat2G_ExitResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.Chat2G_ExitResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
[ProtoContract]
public partial class Chat2G_ChatMessage : AMessage, IRouteMessage, IProto
{
public static Chat2G_ChatMessage Create(Scene scene)
@@ -124,6 +206,7 @@ namespace Fantasy
public override void Dispose()
{
Message = default;
IdList.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Chat2G_ChatMessage>(this);
#endif
@@ -131,6 +214,8 @@ namespace Fantasy
public uint OpCode() { return InnerOpcode.Chat2G_ChatMessage; }
[ProtoMember(1)]
public ChatMessageInfo Message { get; set; }
[ProtoMember(2)]
public List<long> IdList = new List<long>();
}
/// <summary>
/// 创建聊天频道