新增相关协议

This commit is contained in:
2025-08-26 18:03:52 +08:00
parent e0665aae01
commit 7325e268ce
36 changed files with 1402 additions and 1085 deletions

View File

@@ -21,90 +21,93 @@ namespace Fantasy
/// 通知游戏服角色进入该游戏服
/// </summary>
[ProtoContract]
public partial class G2Game_EnterRequest : AMessage, IRouteRequest, IProto
public partial class G2Common_EnterRequest : AMessage, IRouteRequest, IProto
{
public static G2Game_EnterRequest Create(Scene scene)
public static G2Common_EnterRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2Game_EnterRequest>();
return scene.MessagePoolComponent.Rent<G2Common_EnterRequest>();
}
public override void Dispose()
{
AccountId = default;
GateRouteId = default;
RouteType = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2Game_EnterRequest>(this);
GetScene().MessagePoolComponent.Return<G2Common_EnterRequest>(this);
#endif
}
[ProtoIgnore]
public Game2G_EnterResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2Game_EnterRequest; }
public G2Common_EnterResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2Common_EnterRequest; }
[ProtoMember(1)]
public long AccountId { get; set; }
[ProtoMember(2)]
public long GateRouteId { get; set; }
[ProtoMember(3)]
public int RouteType { get; set; }
}
[ProtoContract]
public partial class Game2G_EnterResponse : AMessage, IRouteResponse, IProto
public partial class G2Common_EnterResponse : AMessage, IRouteResponse, IProto
{
public static Game2G_EnterResponse Create(Scene scene)
public static G2Common_EnterResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2G_EnterResponse>();
return scene.MessagePoolComponent.Rent<G2Common_EnterResponse>();
}
public override void Dispose()
{
ErrorCode = default;
RoleRouteId = default;
RoleInfo = default;
RouteType = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2G_EnterResponse>(this);
GetScene().MessagePoolComponent.Return<G2Common_EnterResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.Game2G_EnterResponse; }
public uint OpCode() { return InnerOpcode.G2Common_EnterResponse; }
[ProtoMember(1)]
public long RoleRouteId { get; set; }
[ProtoMember(2)]
public RoleSimpleInfo RoleInfo { get; set; }
public int RouteType { get; set; }
[ProtoMember(3)]
public uint ErrorCode { get; set; }
}
[ProtoContract]
public partial class G2Game_ExitRequest : AMessage, IRouteRequest, IProto
public partial class G2Common_ExitRequest : AMessage, IRouteRequest, IProto
{
public static G2Game_ExitRequest Create(Scene scene)
public static G2Common_ExitRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2Game_ExitRequest>();
return scene.MessagePoolComponent.Rent<G2Common_ExitRequest>();
}
public override void Dispose()
{
AccountId = default;
GateRouteId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2Game_ExitRequest>(this);
GetScene().MessagePoolComponent.Return<G2Common_ExitRequest>(this);
#endif
}
[ProtoIgnore]
public Game2G_ExitResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2Game_ExitRequest; }
public Common2G_ExitResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2Common_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 partial class Common2G_ExitResponse : AMessage, IRouteResponse, IProto
{
public static Game2G_ExitResponse Create(Scene scene)
public static Common2G_ExitResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Game2G_ExitResponse>();
return scene.MessagePoolComponent.Rent<Common2G_ExitResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Game2G_ExitResponse>(this);
GetScene().MessagePoolComponent.Return<Common2G_ExitResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.Game2G_ExitResponse; }
public uint OpCode() { return InnerOpcode.Common2G_ExitResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
@@ -155,94 +158,6 @@ namespace Fantasy
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
/// <summary>
/// 通知游戏服角色进入该聊天服
/// </summary>
[ProtoContract]
public partial class G2S_EnterRequest : AMessage, IRouteRequest, IProto
{
public static G2S_EnterRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2S_EnterRequest>();
}
public override void Dispose()
{
Role = default;
GateRouteId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2S_EnterRequest>(this);
#endif
}
[ProtoIgnore]
public S2G_EnterResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2S_EnterRequest; }
[ProtoMember(1)]
public RoleSimpleInfo Role { get; set; }
[ProtoMember(2)]
public long GateRouteId { get; set; }
}
[ProtoContract]
public partial class S2G_EnterResponse : AMessage, IRouteResponse, IProto
{
public static S2G_EnterResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2G_EnterResponse>();
}
public override void Dispose()
{
ErrorCode = default;
RoleRouteId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2G_EnterResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.S2G_EnterResponse; }
[ProtoMember(1)]
public long RoleRouteId { get; set; }
[ProtoMember(2)]
public uint ErrorCode { get; set; }
}
[ProtoContract]
public partial class G2S_ExitRequest : AMessage, IRouteRequest, IProto
{
public static G2S_ExitRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2S_ExitRequest>();
}
public override void Dispose()
{
AccountId = default;
GateRouteId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2S_ExitRequest>(this);
#endif
}
[ProtoIgnore]
public S2G_ExitResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2S_ExitRequest; }
[ProtoMember(1)]
public long AccountId { get; set; }
[ProtoMember(2)]
public long GateRouteId { get; set; }
}
[ProtoContract]
public partial class S2G_ExitResponse : AMessage, IRouteResponse, IProto
{
public static S2G_ExitResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<S2G_ExitResponse>();
}
public override void Dispose()
{
ErrorCode = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<S2G_ExitResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.S2G_ExitResponse; }
[ProtoMember(1)]
public uint ErrorCode { get; set; }
}
[ProtoContract]
public partial class S2G_ChatMessage : AMessage, IRouteMessage, IProto
{