修改协议工具
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
using Fantasy.Entitas;
|
||||
|
||||
namespace NB.Game;
|
||||
|
||||
public class ItemComponent : Entity
|
||||
{
|
||||
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
namespace NB;
|
||||
|
||||
/// <summary>
|
||||
/// 挂这个 玩家Role创建时会自动添加此组件
|
||||
/// 挂这个 玩家Unit创建时会自动添加此组件
|
||||
/// </summary>
|
||||
public class RoleComAttribute : BaseAttribute
|
||||
{
|
||||
|
||||
@@ -4,5 +4,8 @@ namespace NB;
|
||||
|
||||
public class RoleManagerComponent : Entity
|
||||
{
|
||||
/// <summary>
|
||||
/// 游戏列表
|
||||
/// </summary>
|
||||
public readonly Dictionary<long, Role> Roles = new();
|
||||
}
|
||||
@@ -9,6 +9,5 @@ public sealed class Player : Entity
|
||||
public long LoginTime;
|
||||
|
||||
[BsonIgnore]
|
||||
// BsonIgnore特性是让Bson保存到数据库中忽略掉这个字段。
|
||||
public long SessionRunTimeId;
|
||||
}
|
||||
@@ -11,5 +11,5 @@ public sealed class PlayerFlagComponent : Entity
|
||||
// 有一种可能,当在Account在其他地方被销毁
|
||||
// 这时候因为这个Account是会回收到池子中,所以这个引用还是有效的
|
||||
// 那这时候就会出现这个引用的Account可能是其他用户的了。
|
||||
public EntityReference<Player> Account;
|
||||
public EntityReference<Player> Player;
|
||||
}
|
||||
@@ -6,10 +6,10 @@ namespace Fantasy
|
||||
public const int Authentication = 1;
|
||||
public const int Addressable = 2;
|
||||
public const int Gate = 3;
|
||||
public const int Map = 4;
|
||||
public const int CopyDispatcher = 5;
|
||||
public const int CopyManager = 6;
|
||||
public const int Copy = 7;
|
||||
public const int Game = 4;
|
||||
public const int Map = 5;
|
||||
public const int Activity = 6;
|
||||
public const int Cache = 7;
|
||||
public const int Chat = 8;
|
||||
|
||||
public static readonly Dictionary<string, int> SceneTypeDic = new Dictionary<string, int>()
|
||||
@@ -17,10 +17,10 @@ namespace Fantasy
|
||||
{ "Authentication", 1 },
|
||||
{ "Addressable", 2 },
|
||||
{ "Gate", 3 },
|
||||
{ "Map", 4 },
|
||||
{ "CopyDispatcher", 5 },
|
||||
{ "CopyManager", 6 },
|
||||
{ "Copy", 7 },
|
||||
{ "Game", 4 },
|
||||
{ "Map", 5 },
|
||||
{ "Activity", 6 },
|
||||
{ "Cache", 7 },
|
||||
{ "Chat", 8 },
|
||||
};
|
||||
}
|
||||
|
||||
@@ -15,317 +15,6 @@ using Fantasy.Serialize;
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace Fantasy
|
||||
namespace NBC
|
||||
{
|
||||
[ProtoContract]
|
||||
public partial class G2A_TestMessage : AMessage, IRouteMessage, IProto
|
||||
{
|
||||
public static G2A_TestMessage Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2A_TestMessage>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2A_TestMessage>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.G2A_TestMessage; }
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2A_TestRequest : AMessage, IRouteRequest, IProto
|
||||
{
|
||||
public static G2A_TestRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2A_TestRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2A_TestRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public G2A_TestResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return InnerOpcode.G2A_TestRequest; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2A_TestResponse : AMessage, IRouteResponse, IProto
|
||||
{
|
||||
public static G2A_TestResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2A_TestResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2A_TestResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.G2A_TestResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2M_RequestAddressableId : AMessage, IRouteRequest, IProto
|
||||
{
|
||||
public static G2M_RequestAddressableId Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2M_RequestAddressableId>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2M_RequestAddressableId>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public M2G_ResponseAddressableId ResponseType { get; set; }
|
||||
public uint OpCode() { return InnerOpcode.G2M_RequestAddressableId; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class M2G_ResponseAddressableId : AMessage, IRouteResponse, IProto
|
||||
{
|
||||
public static M2G_ResponseAddressableId Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<M2G_ResponseAddressableId>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
AddressableId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<M2G_ResponseAddressableId>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.M2G_ResponseAddressableId; }
|
||||
[ProtoMember(1)]
|
||||
public long AddressableId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 通知Chat服务器创建一个RouteId
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2Chat_CreateRouteRequest : AMessage, IRouteRequest, IProto
|
||||
{
|
||||
public static G2Chat_CreateRouteRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2Chat_CreateRouteRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
GateRouteId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2Chat_CreateRouteRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Chat2G_CreateRouteResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return InnerOpcode.G2Chat_CreateRouteRequest; }
|
||||
[ProtoMember(1)]
|
||||
public long GateRouteId { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Chat2G_CreateRouteResponse : AMessage, IRouteResponse, IProto
|
||||
{
|
||||
public static Chat2G_CreateRouteResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Chat2G_CreateRouteResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
ChatRouteId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Chat2G_CreateRouteResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.Chat2G_CreateRouteResponse; }
|
||||
[ProtoMember(1)]
|
||||
public long ChatRouteId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Map给另外一个Map发送Unit数据
|
||||
/// </summary>
|
||||
public partial class M2M_SendUnitRequest : AMessage, IRouteRequest
|
||||
{
|
||||
public static M2M_SendUnitRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<M2M_SendUnitRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<M2M_SendUnitRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[BsonIgnore]
|
||||
public M2M_SendUnitResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return InnerOpcode.M2M_SendUnitRequest; }
|
||||
}
|
||||
public partial class M2M_SendUnitResponse : AMessage, IRouteResponse
|
||||
{
|
||||
public static M2M_SendUnitResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<M2M_SendUnitResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<M2M_SendUnitResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.M2M_SendUnitResponse; }
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Gate发送Addressable消息给MAP
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2M_SendAddressableMessage : AMessage, IAddressableRouteMessage, IProto
|
||||
{
|
||||
public static G2M_SendAddressableMessage Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2M_SendAddressableMessage>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2M_SendAddressableMessage>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.G2M_SendAddressableMessage; }
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2M_CreateSubSceneRequest : AMessage, IRouteRequest, IProto
|
||||
{
|
||||
public static G2M_CreateSubSceneRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2M_CreateSubSceneRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2M_CreateSubSceneRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public M2G_CreateSubSceneResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return InnerOpcode.G2M_CreateSubSceneRequest; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class M2G_CreateSubSceneResponse : AMessage, IRouteResponse, IProto
|
||||
{
|
||||
public static M2G_CreateSubSceneResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<M2G_CreateSubSceneResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
SubSceneRouteId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<M2G_CreateSubSceneResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.M2G_CreateSubSceneResponse; }
|
||||
[ProtoMember(1)]
|
||||
public long SubSceneRouteId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2SubScene_SentMessage : AMessage, IRouteMessage, IProto
|
||||
{
|
||||
public static G2SubScene_SentMessage Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2SubScene_SentMessage>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2SubScene_SentMessage>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.G2SubScene_SentMessage; }
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Gate通知SubScene创建一个Addressable消息
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2SubScene_AddressableIdRequest : AMessage, IRouteRequest, IProto
|
||||
{
|
||||
public static G2SubScene_AddressableIdRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2SubScene_AddressableIdRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2SubScene_AddressableIdRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public SubScene2G_AddressableIdResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return InnerOpcode.G2SubScene_AddressableIdRequest; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class SubScene2G_AddressableIdResponse : AMessage, IRouteResponse, IProto
|
||||
{
|
||||
public static SubScene2G_AddressableIdResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<SubScene2G_AddressableIdResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
AddressableId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<SubScene2G_AddressableIdResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.SubScene2G_AddressableIdResponse; }
|
||||
[ProtoMember(1)]
|
||||
public long AddressableId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// Chat发送一个漫游消息给Map
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Chat2M_TestMessage : AMessage, IRoamingMessage, IProto
|
||||
{
|
||||
public static Chat2M_TestMessage Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Chat2M_TestMessage>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Chat2M_TestMessage>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return InnerOpcode.Chat2M_TestMessage; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RoamingType.MapRoamingType;
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,21 +2,5 @@ namespace Fantasy
|
||||
{
|
||||
public static partial class InnerOpcode
|
||||
{
|
||||
public const uint G2A_TestMessage = 939534097;
|
||||
public const uint G2A_TestRequest = 1073751825;
|
||||
public const uint G2A_TestResponse = 1207969553;
|
||||
public const uint G2M_RequestAddressableId = 1073751826;
|
||||
public const uint M2G_ResponseAddressableId = 1207969554;
|
||||
public const uint G2Chat_CreateRouteRequest = 1073751827;
|
||||
public const uint Chat2G_CreateRouteResponse = 1207969555;
|
||||
public const uint M2M_SendUnitRequest = 1082140436;
|
||||
public const uint M2M_SendUnitResponse = 1216358164;
|
||||
public const uint G2M_SendAddressableMessage = 1744840465;
|
||||
public const uint G2M_CreateSubSceneRequest = 1073751829;
|
||||
public const uint M2G_CreateSubSceneResponse = 1207969557;
|
||||
public const uint G2SubScene_SentMessage = 939534098;
|
||||
public const uint G2SubScene_AddressableIdRequest = 1073751830;
|
||||
public const uint SubScene2G_AddressableIdResponse = 1207969558;
|
||||
public const uint Chat2M_TestMessage = 2952800017;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,49 +15,8 @@ using Fantasy.Serialize;
|
||||
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace Fantasy
|
||||
namespace NBC
|
||||
{
|
||||
[ProtoContract]
|
||||
public partial class C2A_RegisterRequest : AMessage, IRequest, IProto
|
||||
{
|
||||
public static C2A_RegisterRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2A_RegisterRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Username = default;
|
||||
Password = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2A_RegisterRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public A2C_RegisterResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2A_RegisterRequest; }
|
||||
[ProtoMember(1)]
|
||||
public string Username { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public string Password { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class A2C_RegisterResponse : AMessage, IResponse, IProto
|
||||
{
|
||||
public static A2C_RegisterResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<A2C_RegisterResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<A2C_RegisterResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.A2C_RegisterResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2A_LoginRequest : AMessage, IRequest, IProto
|
||||
{
|
||||
@@ -231,264 +190,4 @@ namespace Fantasy
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2G_TestMessage : AMessage, IMessage, IProto
|
||||
{
|
||||
public static C2G_TestMessage Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_TestMessage>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_TestMessage>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.C2G_TestMessage; }
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2G_TestRequest : AMessage, IRequest, IProto
|
||||
{
|
||||
public static C2G_TestRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_TestRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_TestRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public G2C_TestResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2G_TestRequest; }
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2C_TestResponse : AMessage, IResponse, IProto
|
||||
{
|
||||
public static G2C_TestResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_TestResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_TestResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_TestResponse; }
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2G_CreateAddressableRequest : AMessage, IRequest, IProto
|
||||
{
|
||||
public static C2G_CreateAddressableRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_CreateAddressableRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_CreateAddressableRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public G2C_CreateAddressableResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2G_CreateAddressableRequest; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2C_CreateAddressableResponse : AMessage, IResponse, IProto
|
||||
{
|
||||
public static G2C_CreateAddressableResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_CreateAddressableResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_CreateAddressableResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_CreateAddressableResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2M_TestMessage : AMessage, IAddressableRouteMessage, IProto
|
||||
{
|
||||
public static C2M_TestMessage Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2M_TestMessage>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2M_TestMessage>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.C2M_TestMessage; }
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2M_TestRequest : AMessage, IAddressableRouteRequest, IProto
|
||||
{
|
||||
public static C2M_TestRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2M_TestRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2M_TestRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public M2C_TestResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2M_TestRequest; }
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class M2C_TestResponse : AMessage, IAddressableRouteResponse, IProto
|
||||
{
|
||||
public static M2C_TestResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<M2C_TestResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<M2C_TestResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.M2C_TestResponse; }
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 通知Gate服务器创建一个Chat的Route连接
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2G_CreateChatRouteRequest : AMessage, IRequest, IProto
|
||||
{
|
||||
public static C2G_CreateChatRouteRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_CreateChatRouteRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_CreateChatRouteRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public G2C_CreateChatRouteResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2G_CreateChatRouteRequest; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class G2C_CreateChatRouteResponse : AMessage, IResponse, IProto
|
||||
{
|
||||
public static G2C_CreateChatRouteResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_CreateChatRouteResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_CreateChatRouteResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_CreateChatRouteResponse; }
|
||||
[ProtoMember(1)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 发送一个Route消息给Chat
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Chat_TestMessage : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static C2Chat_TestMessage Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Chat_TestMessage>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Chat_TestMessage>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.C2Chat_TestMessage; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.ChatRoute;
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 发送一个RPCRoute消息给Chat
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Chat_TestMessageRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Chat_TestMessageRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Chat_TestMessageRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Chat_TestMessageRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Chat2C_TestMessageResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Chat_TestMessageRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.ChatRoute;
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Chat2C_TestMessageResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Chat2C_TestMessageResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Chat2C_TestMessageResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Tag = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Chat2C_TestMessageResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Chat2C_TestMessageResponse; }
|
||||
[ProtoMember(1)]
|
||||
public string Tag { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,27 +2,12 @@ namespace Fantasy
|
||||
{
|
||||
public static partial class OuterOpcode
|
||||
{
|
||||
public const uint C2A_RegisterRequest = 268445457;
|
||||
public const uint A2C_RegisterResponse = 402663185;
|
||||
public const uint C2A_LoginRequest = 268445458;
|
||||
public const uint A2C_LoginResponse = 402663186;
|
||||
public const uint C2G_LoginRequest = 268445459;
|
||||
public const uint G2C_LoginResponse = 402663187;
|
||||
public const uint C2A_LoginRequest = 268445457;
|
||||
public const uint A2C_LoginResponse = 402663185;
|
||||
public const uint C2G_LoginRequest = 268445458;
|
||||
public const uint G2C_LoginResponse = 402663186;
|
||||
public const uint G2C_RepeatLogin = 134227729;
|
||||
public const uint C2G_GetAccountInfoRequest = 268445460;
|
||||
public const uint G2C_GetAccountInfoResponse = 402663188;
|
||||
public const uint C2G_TestMessage = 134227730;
|
||||
public const uint C2G_TestRequest = 268445461;
|
||||
public const uint G2C_TestResponse = 402663189;
|
||||
public const uint C2G_CreateAddressableRequest = 268445462;
|
||||
public const uint G2C_CreateAddressableResponse = 402663190;
|
||||
public const uint C2M_TestMessage = 1342187281;
|
||||
public const uint C2M_TestRequest = 1476405009;
|
||||
public const uint M2C_TestResponse = 1610622737;
|
||||
public const uint C2G_CreateChatRouteRequest = 268445463;
|
||||
public const uint G2C_CreateChatRouteResponse = 402663191;
|
||||
public const uint C2Chat_TestMessage = 2147493649;
|
||||
public const uint C2Chat_TestMessageRequest = 2281711377;
|
||||
public const uint Chat2C_TestMessageResponse = 2415929105;
|
||||
public const uint C2G_GetAccountInfoRequest = 268445459;
|
||||
public const uint G2C_GetAccountInfoResponse = 402663187;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user