房间创建相关协议
This commit is contained in:
@@ -16,6 +16,16 @@ namespace NBF.Fishing2
|
||||
});
|
||||
Log.Info($"创建房间请求返回={response.MapId}");
|
||||
|
||||
if (response.MapId > 0)
|
||||
{
|
||||
var roomResponse = (Map2C_CreateRoomResponse)await Net.Call(new C2Map_CreateRoomRequest()
|
||||
{
|
||||
MapId = response.MapId,
|
||||
Password = "123456"
|
||||
});
|
||||
Log.Info($"创建房间返回={roomResponse.MapId} Code={roomResponse.RoomCode} 房间玩家数量={roomResponse.Units.Count}");
|
||||
}
|
||||
|
||||
await FTask.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,169 +9,4 @@ using NBC.Serialize;
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
/// <summary>
|
||||
/// 请求创建房间
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Game_CreateRoomRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Game_CreateRoomRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Game_CreateRoomRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MapId = default;
|
||||
Password = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_CreateRoomRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Game2C_CreateRoomResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Game_CreateRoomRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public string Password { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求创建房间成功
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_CreateRoomResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Game2C_CreateRoomResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_CreateRoomResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
MapId = default;
|
||||
RoomId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_CreateRoomResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_CreateRoomResponse; }
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public long RoomId { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求进入地图
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Game_EnterMapRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Game_EnterMapRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Game_EnterMapRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MapId = default;
|
||||
Type = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_EnterMapRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Game2C_EnterMapResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Game_EnterMapRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int Type { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求进入地图响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_EnterMapResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Game2C_EnterMapResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_EnterMapResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
MapId = default;
|
||||
Pos = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_EnterMapResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_EnterMapResponse; }
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int Pos { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求进入房间
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Game_EnterRoomRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Game_EnterRoomRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Game_EnterRoomRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MapId = default;
|
||||
Password = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Game_EnterRoomRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Game2C_EnterRoomResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Game_EnterRoomRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public string Password { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求进入房间响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Game2C_EnterRoomResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Game2C_EnterRoomResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Game2C_EnterRoomResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
MapId = default;
|
||||
RoomId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Game2C_EnterRoomResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Game2C_EnterRoomResponse; }
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public long RoomId { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,4 +9,152 @@ using NBC.Serialize;
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
/// <summary>
|
||||
/// 请求创建房间
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2Map_CreateRoomRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Map_CreateRoomRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Map_CreateRoomRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MapId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Map_CreateRoomRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Map2C_CreateRoomResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Map_CreateRoomRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求创建房间成功
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class Map2C_CreateRoomResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Map2C_CreateRoomResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2C_CreateRoomResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
RoomCode = default;
|
||||
Units.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_CreateRoomResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_CreateRoomResponse; }
|
||||
[ProtoMember(1)]
|
||||
public string RoomCode { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public List<MapUnitInfo> Units = new List<MapUnitInfo>();
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求网关进入房间
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2G_EnterRoomRequest : AMessage, IRequest, IProto
|
||||
{
|
||||
public static C2G_EnterRoomRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_EnterRoomRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
RoomCode = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_EnterRoomRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public G2C_EnterRoomResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2G_EnterRoomRequest; }
|
||||
[ProtoMember(1)]
|
||||
public string RoomCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 请求网关进入房间响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2C_EnterRoomResponse : AMessage, IResponse, IProto
|
||||
{
|
||||
public static G2C_EnterRoomResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_EnterRoomResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
RoomCode = default;
|
||||
Units.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_EnterRoomResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_EnterRoomResponse; }
|
||||
[ProtoMember(1)]
|
||||
public string RoomCode { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public List<MapUnitInfo> Units = new List<MapUnitInfo>();
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2Map_EnterMapRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Map_EnterMapRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Map_EnterMapRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MapId = default;
|
||||
RoomId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Map_EnterMapRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Map2C_EnterMapResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Map_EnterMapRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public long RoomId { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Map2C_EnterMapResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Map2C_EnterMapResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2C_EnterMapResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
MapId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_EnterMapResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_EnterMapResponse; }
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
226
Assets/Scripts/Generate/NetworkProtocol/MapProtoData.cs
Normal file
226
Assets/Scripts/Generate/NetworkProtocol/MapProtoData.cs
Normal file
@@ -0,0 +1,226 @@
|
||||
using ProtoBuf;
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Fantasy;
|
||||
using NBC;
|
||||
using NBC.Network.Interface;
|
||||
using NBC.Serialize;
|
||||
#pragma warning disable CS8618
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
[ProtoContract]
|
||||
public partial class UnitGearItemInfo : AMessage, IProto
|
||||
{
|
||||
public static UnitGearItemInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<UnitGearItemInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
ConfigId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<UnitGearItemInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int ConfigId { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class UnitGearInfo : AMessage, IProto
|
||||
{
|
||||
public static UnitGearInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<UnitGearInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Rod = default;
|
||||
Reel = default;
|
||||
Bobber = default;
|
||||
Hook = default;
|
||||
Bait = default;
|
||||
Lure = default;
|
||||
Weight = default;
|
||||
Line = default;
|
||||
Leader = default;
|
||||
Feeder = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<UnitGearInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public UnitGearItemInfo Rod { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public UnitGearItemInfo Reel { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public UnitGearItemInfo Bobber { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public UnitGearItemInfo Hook { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public UnitGearItemInfo Bait { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public UnitGearItemInfo Lure { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public UnitGearItemInfo Weight { get; set; }
|
||||
[ProtoMember(8)]
|
||||
public UnitGearItemInfo Line { get; set; }
|
||||
[ProtoMember(9)]
|
||||
public UnitGearItemInfo Leader { get; set; }
|
||||
[ProtoMember(10)]
|
||||
public UnitGearItemInfo Feeder { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Vector3Info : AMessage, IProto
|
||||
{
|
||||
public static Vector3Info Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Vector3Info>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
x = default;
|
||||
y = default;
|
||||
z = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Vector3Info>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public float x { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public float y { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public float z { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class QuaternionInfo : AMessage, IProto
|
||||
{
|
||||
public static QuaternionInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<QuaternionInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
x = default;
|
||||
y = default;
|
||||
z = default;
|
||||
w = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<QuaternionInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public float x { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public float y { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public float z { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public float w { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class UnitFishingInfo : AMessage, IProto
|
||||
{
|
||||
public static UnitFishingInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<UnitFishingInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
LineLength = default;
|
||||
ReelSpeed = default;
|
||||
OpenLight = default;
|
||||
RodSetting = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<UnitFishingInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public float LineLength { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public float ReelSpeed { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public bool OpenLight { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public int RodSetting { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class UnitStateInfo : AMessage, IProto
|
||||
{
|
||||
public static UnitStateInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<UnitStateInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
State = default;
|
||||
Args.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<UnitStateInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public int State { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public List<string> Args = new List<string>();
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class MapUnitInfo : AMessage, IProto
|
||||
{
|
||||
public static MapUnitInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<MapUnitInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
RoleInfo = default;
|
||||
Location = default;
|
||||
State = default;
|
||||
Gears = default;
|
||||
FishingInfo = default;
|
||||
KV.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<MapUnitInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public RoleSimpleInfo RoleInfo { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public MapUnitPositionInfo Location { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public UnitStateInfo State { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public UnitGearInfo Gears { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public UnitFishingInfo FishingInfo { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public List<KeyValueInt32> KV = new List<KeyValueInt32>();
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class MapUnitPositionInfo : AMessage, IProto
|
||||
{
|
||||
public static MapUnitPositionInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<MapUnitPositionInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Position = default;
|
||||
Rotation = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<MapUnitPositionInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public Vector3Info Position { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public QuaternionInfo Rotation { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8db9d8408db6ab64aa80d82c2de1e2a1
|
||||
@@ -104,50 +104,6 @@ namespace NBC
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 客户端登陆聊天服
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class C2G_LoginChatRequest : AMessage, IProto
|
||||
{
|
||||
public static C2G_LoginChatRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2G_LoginChatRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Type = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2G_LoginChatRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public int Type { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 客户端登陆聊天服响应
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
public partial class G2C_LoginChatResponse : AMessage, IResponse, IProto
|
||||
{
|
||||
public static G2C_LoginChatResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<G2C_LoginChatResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
RouteId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<G2C_LoginChatResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.G2C_LoginChatResponse; }
|
||||
[ProtoMember(1)]
|
||||
public long RouteId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 通知客户端重复登录
|
||||
/// </summary>
|
||||
[ProtoContract]
|
||||
|
||||
@@ -2,61 +2,58 @@ namespace Fantasy
|
||||
{
|
||||
public static partial class OuterOpcode
|
||||
{
|
||||
public const uint C2Game_CreateRoomRequest = 2281711377;
|
||||
public const uint Game2C_CreateRoomResponse = 2415929105;
|
||||
public const uint C2Game_EnterMapRequest = 2281711378;
|
||||
public const uint Game2C_EnterMapResponse = 2415929106;
|
||||
public const uint C2Game_EnterRoomRequest = 2281711379;
|
||||
public const uint Game2C_EnterRoomResponse = 2415929107;
|
||||
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_LoginChatResponse = 402663187;
|
||||
public const uint C2Map_CreateRoomRequest = 2281711377;
|
||||
public const uint Map2C_CreateRoomResponse = 2415929105;
|
||||
public const uint C2G_EnterRoomRequest = 268445457;
|
||||
public const uint G2C_EnterRoomResponse = 402663185;
|
||||
public const uint C2Map_EnterMapRequest = 2281711378;
|
||||
public const uint Map2C_EnterMapResponse = 2415929106;
|
||||
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 G2C_RepeatLogin = 134227729;
|
||||
public const uint C2Game_GetRoleInfoRequest = 2281711380;
|
||||
public const uint Game2C_GetRoleInfoResponse = 2415929108;
|
||||
public const uint C2Map_EnterRoomRequest = 2281711381;
|
||||
public const uint Map2C_EnterRoomResponse = 2415929109;
|
||||
public const uint C2Map_EnterMapRequest = 2281711382;
|
||||
public const uint Map2C_EnterMapResponse = 2415929110;
|
||||
public const uint C2Game_GetRoleInfoRequest = 2281711379;
|
||||
public const uint Game2C_GetRoleInfoResponse = 2415929107;
|
||||
public const uint C2Map_EnterRoomRequest = 2281711380;
|
||||
public const uint Map2C_EnterRoomResponse = 2415929108;
|
||||
public const uint C2Map_Move = 2147493649;
|
||||
public const uint Map2C_RoleEnterMapNotify = 2147493650;
|
||||
public const uint Map2C_RoleExitMapNotify = 2147493651;
|
||||
public const uint Map2C_RoleStateNotify = 2147493652;
|
||||
public const uint Map2C_RoleGearStateNotify = 2147493653;
|
||||
public const uint Map2C_RoleGearChangeNotify = 2147493654;
|
||||
public const uint C2S_GetConversationsRequest = 2281711383;
|
||||
public const uint S2C_GetConversationsResponse = 2415929111;
|
||||
public const uint C2S_SendMailRequest = 2281711384;
|
||||
public const uint S2C_SendMailResponse = 2415929112;
|
||||
public const uint C2S_DeleteMailRequest = 2281711385;
|
||||
public const uint S2C_DeleteMailResponse = 2415929113;
|
||||
public const uint C2S_GetConversationsRequest = 2281711381;
|
||||
public const uint S2C_GetConversationsResponse = 2415929109;
|
||||
public const uint C2S_SendMailRequest = 2281711382;
|
||||
public const uint S2C_SendMailResponse = 2415929110;
|
||||
public const uint C2S_DeleteMailRequest = 2281711383;
|
||||
public const uint S2C_DeleteMailResponse = 2415929111;
|
||||
public const uint S2C_HaveMail = 2147493655;
|
||||
public const uint S2C_MailState = 2147493656;
|
||||
public const uint C2S_CreateChannelRequest = 2281711386;
|
||||
public const uint S2C_CreateChannelResponse = 2415929114;
|
||||
public const uint C2S_JoinChannelRequest = 2281711387;
|
||||
public const uint S2C_JoinChannelResponse = 2415929115;
|
||||
public const uint C2S_SendMessageRequest = 2281711388;
|
||||
public const uint S2C_SendMessageResponse = 2415929116;
|
||||
public const uint C2S_CreateChannelRequest = 2281711384;
|
||||
public const uint S2C_CreateChannelResponse = 2415929112;
|
||||
public const uint C2S_JoinChannelRequest = 2281711385;
|
||||
public const uint S2C_JoinChannelResponse = 2415929113;
|
||||
public const uint C2S_SendMessageRequest = 2281711386;
|
||||
public const uint S2C_SendMessageResponse = 2415929114;
|
||||
public const uint S2C_Message = 2147493657;
|
||||
public const uint C2S_CreateClubRequest = 2281711389;
|
||||
public const uint S2C_CreateClubResponse = 2415929117;
|
||||
public const uint C2S_GetClubInfoRequest = 2281711390;
|
||||
public const uint S2C_GetClubInfoResponse = 2415929118;
|
||||
public const uint C2S_GetMemberListRequest = 2281711391;
|
||||
public const uint S2C_GetMemberListResponse = 2415929119;
|
||||
public const uint C2S_GetClubListRequest = 2281711392;
|
||||
public const uint S2C_GetClubListResponse = 2415929120;
|
||||
public const uint C2S_JoinClubRequest = 2281711393;
|
||||
public const uint S2C_JoinClubResponse = 2415929121;
|
||||
public const uint C2S_LeaveClubRequest = 2281711394;
|
||||
public const uint S2C_LeaveClubResponse = 2415929122;
|
||||
public const uint C2S_DissolveClubRequest = 2281711395;
|
||||
public const uint S2C_DissolveClubResponse = 2415929123;
|
||||
public const uint C2S_DisposeJoinRequest = 2281711396;
|
||||
public const uint S2C_DisposeJoinResponse = 2415929124;
|
||||
public const uint C2S_CreateClubRequest = 2281711387;
|
||||
public const uint S2C_CreateClubResponse = 2415929115;
|
||||
public const uint C2S_GetClubInfoRequest = 2281711388;
|
||||
public const uint S2C_GetClubInfoResponse = 2415929116;
|
||||
public const uint C2S_GetMemberListRequest = 2281711389;
|
||||
public const uint S2C_GetMemberListResponse = 2415929117;
|
||||
public const uint C2S_GetClubListRequest = 2281711390;
|
||||
public const uint S2C_GetClubListResponse = 2415929118;
|
||||
public const uint C2S_JoinClubRequest = 2281711391;
|
||||
public const uint S2C_JoinClubResponse = 2415929119;
|
||||
public const uint C2S_LeaveClubRequest = 2281711392;
|
||||
public const uint S2C_LeaveClubResponse = 2415929120;
|
||||
public const uint C2S_DissolveClubRequest = 2281711393;
|
||||
public const uint S2C_DissolveClubResponse = 2415929121;
|
||||
public const uint C2S_DisposeJoinRequest = 2281711394;
|
||||
public const uint S2C_DisposeJoinResponse = 2415929122;
|
||||
public const uint S2C_ClubChange = 2147493658;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,220 +9,6 @@ using NBC.Serialize;
|
||||
|
||||
namespace NBC
|
||||
{
|
||||
[ProtoContract]
|
||||
public partial class UnitGearItemInfo : AMessage, IProto
|
||||
{
|
||||
public static UnitGearItemInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<UnitGearItemInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
ConfigId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<UnitGearItemInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public int ConfigId { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class UnitGearInfo : AMessage, IProto
|
||||
{
|
||||
public static UnitGearInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<UnitGearInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Rod = default;
|
||||
Reel = default;
|
||||
Bobber = default;
|
||||
Hook = default;
|
||||
Bait = default;
|
||||
Lure = default;
|
||||
Weight = default;
|
||||
Line = default;
|
||||
Leader = default;
|
||||
Feeder = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<UnitGearInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public UnitGearItemInfo Rod { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public UnitGearItemInfo Reel { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public UnitGearItemInfo Bobber { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public UnitGearItemInfo Hook { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public UnitGearItemInfo Bait { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public UnitGearItemInfo Lure { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public UnitGearItemInfo Weight { get; set; }
|
||||
[ProtoMember(8)]
|
||||
public UnitGearItemInfo Line { get; set; }
|
||||
[ProtoMember(9)]
|
||||
public UnitGearItemInfo Leader { get; set; }
|
||||
[ProtoMember(10)]
|
||||
public UnitGearItemInfo Feeder { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Vector3Info : AMessage, IProto
|
||||
{
|
||||
public static Vector3Info Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Vector3Info>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
x = default;
|
||||
y = default;
|
||||
z = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Vector3Info>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public float x { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public float y { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public float z { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class QuaternionInfo : AMessage, IProto
|
||||
{
|
||||
public static QuaternionInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<QuaternionInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
x = default;
|
||||
y = default;
|
||||
z = default;
|
||||
w = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<QuaternionInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public float x { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public float y { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public float z { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public float w { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class UnitFishingInfo : AMessage, IProto
|
||||
{
|
||||
public static UnitFishingInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<UnitFishingInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
LineLength = default;
|
||||
ReelSpeed = default;
|
||||
OpenLight = default;
|
||||
RodSetting = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<UnitFishingInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public float LineLength { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public float ReelSpeed { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public bool OpenLight { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public int RodSetting { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class UnitStateInfo : AMessage, IProto
|
||||
{
|
||||
public static UnitStateInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<UnitStateInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
State = default;
|
||||
Args.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<UnitStateInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public int State { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public List<string> Args = new List<string>();
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class MapUnitInfo : AMessage, IProto
|
||||
{
|
||||
public static MapUnitInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<MapUnitInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Id = default;
|
||||
RoleInfo = default;
|
||||
Location = default;
|
||||
State = default;
|
||||
Gears = default;
|
||||
FishingInfo = default;
|
||||
KV.Clear();
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<MapUnitInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public long Id { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public RoleSimpleInfo RoleInfo { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public MapUnitPositionInfo Location { get; set; }
|
||||
[ProtoMember(4)]
|
||||
public UnitStateInfo State { get; set; }
|
||||
[ProtoMember(5)]
|
||||
public UnitGearInfo Gears { get; set; }
|
||||
[ProtoMember(6)]
|
||||
public UnitFishingInfo FishingInfo { get; set; }
|
||||
[ProtoMember(7)]
|
||||
public List<KeyValueInt32> KV = new List<KeyValueInt32>();
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class MapUnitPositionInfo : AMessage, IProto
|
||||
{
|
||||
public static MapUnitPositionInfo Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<MapUnitPositionInfo>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
Position = default;
|
||||
Rotation = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<MapUnitPositionInfo>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoMember(1)]
|
||||
public Vector3Info Position { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public QuaternionInfo Rotation { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2Map_EnterRoomRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
@@ -273,55 +59,6 @@ namespace NBC
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2Map_EnterMapRequest : AMessage, ICustomRouteRequest, IProto
|
||||
{
|
||||
public static C2Map_EnterMapRequest Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<C2Map_EnterMapRequest>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
MapId = default;
|
||||
RoomId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<C2Map_EnterMapRequest>(this);
|
||||
#endif
|
||||
}
|
||||
[ProtoIgnore]
|
||||
public Map2C_EnterMapResponse ResponseType { get; set; }
|
||||
public uint OpCode() { return OuterOpcode.C2Map_EnterMapRequest; }
|
||||
[ProtoIgnore]
|
||||
public int RouteType => Fantasy.RouteType.MapRoute;
|
||||
[ProtoMember(1)]
|
||||
public int MapId { get; set; }
|
||||
[ProtoMember(2)]
|
||||
public long RoomId { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class Map2C_EnterMapResponse : AMessage, ICustomRouteResponse, IProto
|
||||
{
|
||||
public static Map2C_EnterMapResponse Create(Scene scene)
|
||||
{
|
||||
return scene.MessagePoolComponent.Rent<Map2C_EnterMapResponse>();
|
||||
}
|
||||
public override void Dispose()
|
||||
{
|
||||
ErrorCode = default;
|
||||
Roles.Clear();
|
||||
MapId = default;
|
||||
#if FANTASY_NET || FANTASY_UNITY
|
||||
GetScene().MessagePoolComponent.Return<Map2C_EnterMapResponse>(this);
|
||||
#endif
|
||||
}
|
||||
public uint OpCode() { return OuterOpcode.Map2C_EnterMapResponse; }
|
||||
[ProtoMember(1)]
|
||||
public List<MapUnitInfo> Roles = new List<MapUnitInfo>();
|
||||
[ProtoMember(2)]
|
||||
public long MapId { get; set; }
|
||||
[ProtoMember(3)]
|
||||
public uint ErrorCode { get; set; }
|
||||
}
|
||||
[ProtoContract]
|
||||
public partial class C2Map_Move : AMessage, ICustomRouteMessage, IProto
|
||||
{
|
||||
public static C2Map_Move Create(Scene scene)
|
||||
|
||||
Reference in New Issue
Block a user