房间创建和进入相关逻辑和协议

This commit is contained in:
2025-08-27 00:04:40 +08:00
parent 7325e268ce
commit f6d85a1e0a
45 changed files with 1246 additions and 729 deletions

Binary file not shown.

View File

@@ -1 +1 @@
{"WorksheetNames":[-8419147776733210060,-3495952183970875596,1720330851179383898,5812538452563588342],"Tables":{"-3495952183970875596":1756136538067,"-1088042625810372120":1753532052628,"1720330851179383898":1753711757684,"3730651590607244245":1753532052629,"5812538452563588342":1753532052630}} {"WorksheetNames":[-8419147776733210060,-3495952183970875596,1720330851179383898,5812538452563588342],"Tables":{"-3495952183970875596":1756213540397,"-1088042625810372120":1753532052628,"1720330851179383898":1753711757684,"3730651590607244245":1753532052629,"5812538452563588342":1753532052630}}

View File

@@ -1,5 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package Sining.Message; package Sining.Message;
///通知游戏服角色进入该游戏服 ///通知游戏服角色进入该游戏服
message G2Common_EnterRequest // IRouteRequest,G2Common_EnterResponse message G2Common_EnterRequest // IRouteRequest,G2Common_EnterResponse
{ {
@@ -10,7 +11,7 @@ message G2Common_EnterRequest // IRouteRequest,G2Common_EnterResponse
message G2Common_EnterResponse // IRouteResponse message G2Common_EnterResponse // IRouteResponse
{ {
int64 RoleRouteId = 1; //实体的路由id int64 UnitRouteId = 1; //实体的路由id
int32 RouteType = 2; //登陆的场景类型 int32 RouteType = 2; //登陆的场景类型
} }
@@ -50,3 +51,19 @@ message Club2Chat_CreateChannel // IRouteMessage
{ {
int64 ChannelId = 1; //频道id int64 ChannelId = 1; //频道id
} }
/// 请求进入房间
message G2Map_EnterRoomRequest // IRouteRequest,Map2G_EnterRoomResponse
{
string RoomCode = 1; //房间代码
int64 AccountId = 2; //账号id
}
/// 请求进入房间响应
message Map2G_EnterRoomResponse // IRouteResponse
{
string RoomCode = 1; //房间代码
repeated MapUnitInfo Units = 2; //房间玩家列表
}

View File

@@ -1,44 +1,3 @@
syntax = "proto3"; syntax = "proto3";
package Fantasy.Network.Message; package Fantasy.Network.Message;
/// 请求创建房间
message C2Game_CreateRoomRequest // ICustomRouteRequest,Game2C_CreateRoomResponse,MapRoute
{
int32 MapId = 1;//地图id
string Password = 2;//进入密码
}
/// 请求创建房间成功
message Game2C_CreateRoomResponse // ICustomRouteResponse
{
int32 MapId = 1;//地图id
int64 RoomId = 2;//房间id
}
/// 请求进入地图
message C2Game_EnterMapRequest // ICustomRouteRequest,Game2C_EnterMapResponse,MapRoute
{
int32 MapId = 1; //房间id
int32 Type = 2; //进入地图方式
}
/// 请求进入地图响应
message Game2C_EnterMapResponse // ICustomRouteResponse
{
int32 MapId = 1; //地图id
int Pos = 2; //位置
}
/// 请求进入房间
message C2Game_EnterRoomRequest // ICustomRouteRequest,Game2C_EnterRoomResponse,MapRoute
{
int32 MapId = 1;//房间id
string Password = 2;//进入密码
}
/// 请求进入房间响应
message Game2C_EnterRoomResponse // ICustomRouteResponse
{
int32 MapId = 1;//地图id
int64 RoomId = 2;//房间id
}

View File

@@ -0,0 +1,40 @@
syntax = "proto3";
package Fantasy.Network.Message;
/// 请求创建房间
message C2Map_CreateRoomRequest // ICustomRouteRequest,Map2C_CreateRoomResponse,MapRoute
{
int32 MapId = 1;//地图id
}
/// 请求创建房间成功
message Map2C_CreateRoomResponse // ICustomRouteResponse
{
string RoomCode = 1; //房间代码
repeated MapUnitInfo Units = 2; //房间玩家列表
}
/// 请求网关进入房间
message C2G_EnterRoomRequest // IRequest,G2C_EnterRoomResponse
{
string RoomCode = 1; //房间代码
}
/// 请求网关进入房间响应
message G2C_EnterRoomResponse // IResponse
{
string RoomCode = 1; //房间代码
repeated MapUnitInfo Units = 2; //房间玩家列表
}
message C2Map_EnterMapRequest // ICustomRouteRequest,Map2C_EnterMapResponse,MapRoute
{
int32 MapId = 1;//地图id
int64 RoomId = 2;//房间id如果联机则有
}
message Map2C_EnterMapResponse // ICustomRouteResponse
{
int32 MapId = 1; //地图id
}

View File

@@ -31,16 +31,7 @@ message G2C_LoginResponse // IResponse
int64 RoleId = 1; int64 RoleId = 1;
} }
/// 客户端登陆聊天服
message C2G_LoginChatRequest
{
int32 Type = 1;
}
/// 客户端登陆聊天服响应
message G2C_LoginChatResponse // IResponse
{
int64 RouteId = 1;
}
/// 通知客户端重复登录 /// 通知客户端重复登录
message G2C_RepeatLogin // IMessage message G2C_RepeatLogin // IMessage

View File

@@ -1,72 +1,6 @@
syntax = "proto3"; syntax = "proto3";
package Fantasy.Network.Message; package Fantasy.Network.Message;
message UnitGearItemInfo
{
int64 Id = 1; //唯一id
int32 ConfigId = 2; //配置id
}
message UnitGearInfo
{
UnitGearItemInfo Rod = 1;
UnitGearItemInfo Reel = 2;
UnitGearItemInfo Bobber = 3;
UnitGearItemInfo Hook = 4;
UnitGearItemInfo Bait = 5;
UnitGearItemInfo Lure = 6;
UnitGearItemInfo Weight = 7;
UnitGearItemInfo Line = 8;
UnitGearItemInfo Leader = 9;
UnitGearItemInfo Feeder = 10;
}
message Vector3Info
{
float x = 1;
float y = 2;
float z = 3;
}
message QuaternionInfo
{
float x = 1;
float y = 2;
float z = 3;
float w = 4;
}
message UnitFishingInfo
{
float LineLength = 1;//线长度
float ReelSpeed = 2;//收线速度
bool OpenLight = 3;//打开手电筒
int RodSetting = 4;
}
message UnitStateInfo
{
int32 State = 1; //状态id
repeated string Args = 2; //状态参数
}
message MapUnitInfo
{
int64 Id = 1; //用户id
RoleSimpleInfo RoleInfo = 2; //基础信息
MapUnitPositionInfo Location = 3; //位置信息
UnitStateInfo State = 4; //状态信息
UnitGearInfo Gears = 5; //钓组数据
UnitFishingInfo FishingInfo = 6; //钓鱼状态信息
repeated KeyValueInt32 KV = 7; //属性信息
}
message MapUnitPositionInfo
{
Vector3Info Position = 1;
QuaternionInfo Rotation = 2;
}
message C2Map_EnterRoomRequest // ICustomRouteRequest,Map2C_EnterRoomResponse,MapRoute message C2Map_EnterRoomRequest // ICustomRouteRequest,Map2C_EnterRoomResponse,MapRoute
{ {
@@ -80,17 +14,7 @@ message Map2C_EnterRoomResponse // ICustomRouteResponse
int64 RoomId = 2;//房间id int64 RoomId = 2;//房间id
} }
message C2Map_EnterMapRequest // ICustomRouteRequest,Map2C_EnterMapResponse,MapRoute
{
int32 MapId = 1;//地图id
int64 RoomId = 2;//房间id如果联机则有
}
message Map2C_EnterMapResponse // ICustomRouteResponse
{
repeated MapUnitInfo Roles = 1; //地图玩家列表
int64 MapId = 2; //地图id
}
message C2Map_Move // ICustomRouteMessage,MapRoute message C2Map_Move // ICustomRouteMessage,MapRoute

View File

@@ -0,0 +1,65 @@
message UnitGearItemInfo
{
int64 Id = 1; //唯一id
int32 ConfigId = 2; //配置id
}
message UnitGearInfo
{
UnitGearItemInfo Rod = 1;
UnitGearItemInfo Reel = 2;
UnitGearItemInfo Bobber = 3;
UnitGearItemInfo Hook = 4;
UnitGearItemInfo Bait = 5;
UnitGearItemInfo Lure = 6;
UnitGearItemInfo Weight = 7;
UnitGearItemInfo Line = 8;
UnitGearItemInfo Leader = 9;
UnitGearItemInfo Feeder = 10;
}
message Vector3Info
{
float x = 1;
float y = 2;
float z = 3;
}
message QuaternionInfo
{
float x = 1;
float y = 2;
float z = 3;
float w = 4;
}
message UnitFishingInfo
{
float LineLength = 1;//线长度
float ReelSpeed = 2;//收线速度
bool OpenLight = 3;//打开手电筒
int RodSetting = 4;
}
message UnitStateInfo
{
int32 State = 1; //状态id
repeated string Args = 2; //状态参数
}
message MapUnitInfo
{
int64 Id = 1; //用户id
RoleSimpleInfo RoleInfo = 2; //基础信息
MapUnitPositionInfo Location = 3; //位置信息
UnitStateInfo State = 4; //状态信息
UnitGearInfo Gears = 5; //钓组数据
UnitFishingInfo FishingInfo = 6; //钓鱼状态信息
repeated KeyValueInt32 KV = 7; //属性信息
}
message MapUnitPositionInfo
{
Vector3Info Position = 1;
QuaternionInfo Rotation = 2;
}

View File

@@ -29,7 +29,6 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Room\" />
<Folder Include="Social\Entity\" /> <Folder Include="Social\Entity\" />
<Folder Include="Social\Mail\" /> <Folder Include="Social\Mail\" />
</ItemGroup> </ItemGroup>

View File

@@ -17,169 +17,4 @@ using Fantasy.Serialize;
namespace Fantasy namespace Fantasy
{ {
/// <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; }
}
} }

View File

@@ -56,7 +56,7 @@ namespace Fantasy
public override void Dispose() public override void Dispose()
{ {
ErrorCode = default; ErrorCode = default;
RoleRouteId = default; UnitRouteId = default;
RouteType = default; RouteType = default;
#if FANTASY_NET || FANTASY_UNITY #if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2Common_EnterResponse>(this); GetScene().MessagePoolComponent.Return<G2Common_EnterResponse>(this);
@@ -64,7 +64,7 @@ namespace Fantasy
} }
public uint OpCode() { return InnerOpcode.G2Common_EnterResponse; } public uint OpCode() { return InnerOpcode.G2Common_EnterResponse; }
[ProtoMember(1)] [ProtoMember(1)]
public long RoleRouteId { get; set; } public long UnitRouteId { get; set; }
[ProtoMember(2)] [ProtoMember(2)]
public int RouteType { get; set; } public int RouteType { get; set; }
[ProtoMember(3)] [ProtoMember(3)]
@@ -200,4 +200,57 @@ namespace Fantasy
[ProtoMember(1)] [ProtoMember(1)]
public long ChannelId { get; set; } public long ChannelId { get; set; }
} }
/// <summary>
/// 请求进入房间
/// </summary>
[ProtoContract]
public partial class G2Map_EnterRoomRequest : AMessage, IRouteRequest, IProto
{
public static G2Map_EnterRoomRequest Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<G2Map_EnterRoomRequest>();
}
public override void Dispose()
{
RoomCode = default;
AccountId = default;
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<G2Map_EnterRoomRequest>(this);
#endif
}
[ProtoIgnore]
public Map2G_EnterRoomResponse ResponseType { get; set; }
public uint OpCode() { return InnerOpcode.G2Map_EnterRoomRequest; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public long AccountId { get; set; }
}
/// <summary>
/// 请求进入房间响应
/// </summary>
[ProtoContract]
public partial class Map2G_EnterRoomResponse : AMessage, IRouteResponse, IProto
{
public static Map2G_EnterRoomResponse Create(Scene scene)
{
return scene.MessagePoolComponent.Rent<Map2G_EnterRoomResponse>();
}
public override void Dispose()
{
ErrorCode = default;
RoomCode = default;
Units.Clear();
#if FANTASY_NET || FANTASY_UNITY
GetScene().MessagePoolComponent.Return<Map2G_EnterRoomResponse>(this);
#endif
}
public uint OpCode() { return InnerOpcode.Map2G_EnterRoomResponse; }
[ProtoMember(1)]
public string RoomCode { get; set; }
[ProtoMember(2)]
public List<MapUnitInfo> Units = new List<MapUnitInfo>();
[ProtoMember(3)]
public uint ErrorCode { get; set; }
}
} }

View File

@@ -10,5 +10,7 @@ namespace Fantasy
public const uint G2S_GetPlayerBasicInfoResponse = 1207969555; public const uint G2S_GetPlayerBasicInfoResponse = 1207969555;
public const uint S2G_ChatMessage = 939534097; public const uint S2G_ChatMessage = 939534097;
public const uint Club2Chat_CreateChannel = 939534098; public const uint Club2Chat_CreateChannel = 939534098;
public const uint G2Map_EnterRoomRequest = 1073751828;
public const uint Map2G_EnterRoomResponse = 1207969556;
} }
} }

View File

@@ -17,4 +17,152 @@ using Fantasy.Serialize;
namespace Fantasy namespace Fantasy
{ {
/// <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; }
}
} }

View File

@@ -0,0 +1,234 @@
using ProtoBuf;
using System.Collections.Generic;
using MongoDB.Bson.Serialization.Attributes;
using Fantasy;
using Fantasy.Network.Interface;
using Fantasy.Serialize;
// ReSharper disable InconsistentNaming
// ReSharper disable RedundantUsingDirective
// ReSharper disable RedundantOverriddenMember
// ReSharper disable PartialTypeWithSinglePart
// ReSharper disable UnusedAutoPropertyAccessor.Global
// ReSharper disable MemberCanBePrivate.Global
// ReSharper disable CheckNamespace
#pragma warning disable CS8625 // Cannot convert null literal to non-nullable reference type.
#pragma warning disable CS8618
namespace Fantasy
{
[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; }
}
}

View File

@@ -112,50 +112,6 @@ namespace Fantasy
public uint ErrorCode { get; set; } public uint ErrorCode { get; set; }
} }
/// <summary> /// <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> /// </summary>
[ProtoContract] [ProtoContract]

View File

@@ -2,61 +2,58 @@ namespace Fantasy
{ {
public static partial class OuterOpcode public static partial class OuterOpcode
{ {
public const uint C2Game_CreateRoomRequest = 2281711377; public const uint C2Map_CreateRoomRequest = 2281711377;
public const uint Game2C_CreateRoomResponse = 2415929105; public const uint Map2C_CreateRoomResponse = 2415929105;
public const uint C2Game_EnterMapRequest = 2281711378; public const uint C2G_EnterRoomRequest = 268445457;
public const uint Game2C_EnterMapResponse = 2415929106; public const uint G2C_EnterRoomResponse = 402663185;
public const uint C2Game_EnterRoomRequest = 2281711379; public const uint C2Map_EnterMapRequest = 2281711378;
public const uint Game2C_EnterRoomResponse = 2415929107; public const uint Map2C_EnterMapResponse = 2415929106;
public const uint C2A_LoginRequest = 268445457; public const uint C2A_LoginRequest = 268445458;
public const uint A2C_LoginResponse = 402663185; public const uint A2C_LoginResponse = 402663186;
public const uint C2G_LoginRequest = 268445458; public const uint C2G_LoginRequest = 268445459;
public const uint G2C_LoginResponse = 402663186; public const uint G2C_LoginResponse = 402663187;
public const uint G2C_LoginChatResponse = 402663187;
public const uint G2C_RepeatLogin = 134227729; public const uint G2C_RepeatLogin = 134227729;
public const uint C2Game_GetRoleInfoRequest = 2281711380; public const uint C2Game_GetRoleInfoRequest = 2281711379;
public const uint Game2C_GetRoleInfoResponse = 2415929108; public const uint Game2C_GetRoleInfoResponse = 2415929107;
public const uint C2Map_EnterRoomRequest = 2281711381; public const uint C2Map_EnterRoomRequest = 2281711380;
public const uint Map2C_EnterRoomResponse = 2415929109; public const uint Map2C_EnterRoomResponse = 2415929108;
public const uint C2Map_EnterMapRequest = 2281711382;
public const uint Map2C_EnterMapResponse = 2415929110;
public const uint C2Map_Move = 2147493649; public const uint C2Map_Move = 2147493649;
public const uint Map2C_RoleEnterMapNotify = 2147493650; public const uint Map2C_RoleEnterMapNotify = 2147493650;
public const uint Map2C_RoleExitMapNotify = 2147493651; public const uint Map2C_RoleExitMapNotify = 2147493651;
public const uint Map2C_RoleStateNotify = 2147493652; public const uint Map2C_RoleStateNotify = 2147493652;
public const uint Map2C_RoleGearStateNotify = 2147493653; public const uint Map2C_RoleGearStateNotify = 2147493653;
public const uint Map2C_RoleGearChangeNotify = 2147493654; public const uint Map2C_RoleGearChangeNotify = 2147493654;
public const uint C2S_GetConversationsRequest = 2281711383; public const uint C2S_GetConversationsRequest = 2281711381;
public const uint S2C_GetConversationsResponse = 2415929111; public const uint S2C_GetConversationsResponse = 2415929109;
public const uint C2S_SendMailRequest = 2281711384; public const uint C2S_SendMailRequest = 2281711382;
public const uint S2C_SendMailResponse = 2415929112; public const uint S2C_SendMailResponse = 2415929110;
public const uint C2S_DeleteMailRequest = 2281711385; public const uint C2S_DeleteMailRequest = 2281711383;
public const uint S2C_DeleteMailResponse = 2415929113; public const uint S2C_DeleteMailResponse = 2415929111;
public const uint S2C_HaveMail = 2147493655; public const uint S2C_HaveMail = 2147493655;
public const uint S2C_MailState = 2147493656; public const uint S2C_MailState = 2147493656;
public const uint C2S_CreateChannelRequest = 2281711386; public const uint C2S_CreateChannelRequest = 2281711384;
public const uint S2C_CreateChannelResponse = 2415929114; public const uint S2C_CreateChannelResponse = 2415929112;
public const uint C2S_JoinChannelRequest = 2281711387; public const uint C2S_JoinChannelRequest = 2281711385;
public const uint S2C_JoinChannelResponse = 2415929115; public const uint S2C_JoinChannelResponse = 2415929113;
public const uint C2S_SendMessageRequest = 2281711388; public const uint C2S_SendMessageRequest = 2281711386;
public const uint S2C_SendMessageResponse = 2415929116; public const uint S2C_SendMessageResponse = 2415929114;
public const uint S2C_Message = 2147493657; public const uint S2C_Message = 2147493657;
public const uint C2S_CreateClubRequest = 2281711389; public const uint C2S_CreateClubRequest = 2281711387;
public const uint S2C_CreateClubResponse = 2415929117; public const uint S2C_CreateClubResponse = 2415929115;
public const uint C2S_GetClubInfoRequest = 2281711390; public const uint C2S_GetClubInfoRequest = 2281711388;
public const uint S2C_GetClubInfoResponse = 2415929118; public const uint S2C_GetClubInfoResponse = 2415929116;
public const uint C2S_GetMemberListRequest = 2281711391; public const uint C2S_GetMemberListRequest = 2281711389;
public const uint S2C_GetMemberListResponse = 2415929119; public const uint S2C_GetMemberListResponse = 2415929117;
public const uint C2S_GetClubListRequest = 2281711392; public const uint C2S_GetClubListRequest = 2281711390;
public const uint S2C_GetClubListResponse = 2415929120; public const uint S2C_GetClubListResponse = 2415929118;
public const uint C2S_JoinClubRequest = 2281711393; public const uint C2S_JoinClubRequest = 2281711391;
public const uint S2C_JoinClubResponse = 2415929121; public const uint S2C_JoinClubResponse = 2415929119;
public const uint C2S_LeaveClubRequest = 2281711394; public const uint C2S_LeaveClubRequest = 2281711392;
public const uint S2C_LeaveClubResponse = 2415929122; public const uint S2C_LeaveClubResponse = 2415929120;
public const uint C2S_DissolveClubRequest = 2281711395; public const uint C2S_DissolveClubRequest = 2281711393;
public const uint S2C_DissolveClubResponse = 2415929123; public const uint S2C_DissolveClubResponse = 2415929121;
public const uint C2S_DisposeJoinRequest = 2281711396; public const uint C2S_DisposeJoinRequest = 2281711394;
public const uint S2C_DisposeJoinResponse = 2415929124; public const uint S2C_DisposeJoinResponse = 2415929122;
public const uint S2C_ClubChange = 2147493658; public const uint S2C_ClubChange = 2147493658;
} }
} }

View File

@@ -17,220 +17,6 @@ using Fantasy.Serialize;
namespace Fantasy namespace Fantasy
{ {
[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] [ProtoContract]
public partial class C2Map_EnterRoomRequest : AMessage, ICustomRouteRequest, IProto public partial class C2Map_EnterRoomRequest : AMessage, ICustomRouteRequest, IProto
{ {
@@ -281,55 +67,6 @@ namespace Fantasy
public uint ErrorCode { get; set; } public uint ErrorCode { get; set; }
} }
[ProtoContract] [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 partial class C2Map_Move : AMessage, ICustomRouteMessage, IProto
{ {
public static C2Map_Move Create(Scene scene) public static C2Map_Move Create(Scene scene)

View File

@@ -0,0 +1,8 @@
using Fantasy.Entitas;
namespace NB.Map;
public class MapManageComponent: Entity
{
public readonly Dictionary<long, Map> Maps = new();
}

View File

@@ -0,0 +1,8 @@
using Fantasy.Entitas;
namespace NB.Map;
public class MapUnitManageComponent : Entity
{
public readonly Dictionary<long, MapUnit> Units = new();
}

View File

@@ -0,0 +1,11 @@
using Fantasy.Entitas;
namespace NB.Map;
public class RoomManageComponent : Entity
{
public readonly Dictionary<long, MapRoom> Rooms = new();
public readonly PriorityQueue<int, int> FreeIds = new();
public readonly HashSet<int> InUseID = new();
}

7
Entity/Map/Entity/Map.cs Normal file
View File

@@ -0,0 +1,7 @@
using Fantasy.Entitas;
namespace NB.Map;
public class Map : Entity
{
}

View File

@@ -1,4 +1,5 @@
using Fantasy.Entitas; using Fantasy.Entitas;
using NB.Map;
namespace NB.Map; namespace NB.Map;
@@ -7,10 +8,20 @@ namespace NB.Map;
/// </summary> /// </summary>
public class MapRoom : Entity public class MapRoom : Entity
{ {
/// <summary>
/// 房间序号id
/// </summary>
public int RoomId;
/// <summary>
/// 房间代码
/// </summary>
public string Code = string.Empty;
/// <summary> /// <summary>
/// 房间密码 /// 房间密码
/// </summary> /// </summary>
public string Password; public string Password = string.Empty;
/// <summary> /// <summary>
/// 房间玩家 /// 房间玩家

View File

@@ -17,4 +17,16 @@ public class MapUnit : Entity
/// 旋转 /// 旋转
/// </summary> /// </summary>
public float4 Rotation; public float4 Rotation;
/// <summary>
/// 当前所在地图id
/// </summary>
public int MapId;
/// <summary>
/// 当前所在房间id
/// </summary>
public int RoomId;
public long GateRouteId;
} }

View File

@@ -49,4 +49,24 @@ public class ErrorCode
/// 没回复前不能再发消息 /// 没回复前不能再发消息
/// </summary> /// </summary>
public const uint MailNotReply = 12021; public const uint MailNotReply = 12021;
/// <summary>
/// 创建房间失败,不在地图中
/// </summary>
public const uint MapCreateRoomNotEnter = 13001;
/// <summary>
/// 创建房间失败,房间数量超限
/// </summary>
public const uint MapCreateRoomMax = 13002;
/// <summary>
/// 房间id 错误
/// </summary>
public const uint MapRoomIdError = 13003;
/// <summary>
/// 已在房间,不能加入另一个
/// </summary>
public const uint MapRoomHave = 13004;
} }

View File

@@ -3,6 +3,7 @@ using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
using NB.Chat; using NB.Chat;
using NB.Game; using NB.Game;
using NB.Map;
namespace NB.Common; namespace NB.Common;
@@ -28,6 +29,7 @@ public class G2Common_EnterRequestHandler : RouteRPC<Scene, G2Common_EnterReques
} }
case SceneType.Map: case SceneType.Map:
{ {
await RunMap(scene, request, response);
break; break;
} }
} }
@@ -39,14 +41,15 @@ public class G2Common_EnterRequestHandler : RouteRPC<Scene, G2Common_EnterReques
{ {
// 在缓存中检查该账号是否存在 // 在缓存中检查该账号是否存在
var gameAccountManageComponent = scene.GetComponent<PlayerManageComponent>(); var gameAccountManageComponent = scene.GetComponent<PlayerManageComponent>();
var account = await gameAccountManageComponent.Online(scene, request.AccountId, request.GateRouteId); var account = await gameAccountManageComponent.Online(request.AccountId, request.GateRouteId);
if (account == null) if (account == null)
{ {
response.ErrorCode = ErrorCode.ErrServer; response.ErrorCode = ErrorCode.ErrServer;
return; return;
} }
response.RoleRouteId = account.RuntimeId; response.UnitRouteId = account.RuntimeId;
Log.Info($"登录到游戏服成功id={response.UnitRouteId}");
} }
private async FTask RunSocial(Scene scene, G2Common_EnterRequest request, G2Common_EnterResponse response) private async FTask RunSocial(Scene scene, G2Common_EnterRequest request, G2Common_EnterResponse response)
@@ -61,6 +64,23 @@ public class G2Common_EnterRequestHandler : RouteRPC<Scene, G2Common_EnterReques
return; return;
} }
response.RoleRouteId = account.RuntimeId; response.UnitRouteId = account.RuntimeId;
Log.Info($"登录到社交服成功id={response.UnitRouteId}");
}
private async FTask RunMap(Scene scene, G2Common_EnterRequest request, G2Common_EnterResponse response)
{
// 在缓存中检查该账号是否存在
var chatUnitManageComponent = scene.GetComponent<MapUnitManageComponent>();
var account = await chatUnitManageComponent.Online(scene, request.AccountId, request.GateRouteId);
if (account == null)
{
response.ErrorCode = ErrorCode.ErrServer;
return;
}
response.UnitRouteId = account.RuntimeId;
Log.Info($"登录到地图服成功id={response.UnitRouteId}");
} }
} }

View File

@@ -2,6 +2,8 @@
using Fantasy.Async; using Fantasy.Async;
using Fantasy.Network.Interface; using Fantasy.Network.Interface;
using NB.Chat; using NB.Chat;
using NB.Game;
using NB.Map;
namespace NB.Common; namespace NB.Common;
@@ -25,6 +27,7 @@ public class G2Common_ExitRequestHandler : RouteRPC<Scene, G2Common_ExitRequest,
} }
case SceneType.Map: case SceneType.Map:
{ {
await RunMap(scene, request, response);
break; break;
} }
} }
@@ -34,16 +37,10 @@ public class G2Common_ExitRequestHandler : RouteRPC<Scene, G2Common_ExitRequest,
private async FTask RunGame(Scene scene, G2Common_ExitRequest request, Common2G_ExitResponse response) private async FTask RunGame(Scene scene, G2Common_ExitRequest request, Common2G_ExitResponse response)
{ {
// // 在缓存中检查该账号是否存在 // 在缓存中检查该账号是否存在
// var gameAccountManageComponent = scene.GetComponent<PlayerManageComponent>(); var gameAccountManageComponent = scene.GetComponent<PlayerManageComponent>();
// var account = await gameAccountManageComponent.Online(scene, request.AccountId, request.GateRouteId); await gameAccountManageComponent.Offline(request.AccountId, request.GateRouteId);
// if (account == null) Log.Info("退出游戏服成功==");
// {
// response.ErrorCode = ErrorCode.ErrServer;
// return;
// }
//
// response.RoleRouteId = account.RuntimeId;
} }
private async FTask RunSocial(Scene scene, G2Common_ExitRequest request, Common2G_ExitResponse response) private async FTask RunSocial(Scene scene, G2Common_ExitRequest request, Common2G_ExitResponse response)
@@ -51,5 +48,14 @@ public class G2Common_ExitRequestHandler : RouteRPC<Scene, G2Common_ExitRequest,
// 在缓存中检查该账号是否存在 // 在缓存中检查该账号是否存在
var chatUnitManageComponent = scene.GetComponent<SocialUnitManageComponent>(); var chatUnitManageComponent = scene.GetComponent<SocialUnitManageComponent>();
await chatUnitManageComponent.Offline(scene, request.AccountId, request.GateRouteId); await chatUnitManageComponent.Offline(scene, request.AccountId, request.GateRouteId);
Log.Info("退出聊天服成功==");
}
private async FTask RunMap(Scene scene, G2Common_ExitRequest request, Common2G_ExitResponse response)
{
// 在缓存中检查该账号是否存在
var chatUnitManageComponent = scene.GetComponent<MapUnitManageComponent>();
await chatUnitManageComponent.Offline(scene, request.AccountId, request.GateRouteId);
Log.Info("退出房间服成功==");
} }
} }

View File

@@ -3,12 +3,38 @@ using Fantasy.Platform.Net;
namespace NB.Common; namespace NB.Common;
public class SceneConfigHelper public static class SceneConfigHelper
{ {
public static SceneConfig GetConfigByRouteType(int routeType)
{
var sceneType = SceneType.Game;
if (routeType == RouteType.GameRoute)
{
sceneType = SceneType.Game;
}
else if (routeType == RouteType.SocialRoute)
{
sceneType = SceneType.Social;
}
else if (routeType == RouteType.MapRoute)
{
sceneType = SceneType.Map;
}
else if (routeType == RouteType.GateRoute)
{
sceneType = SceneType.Gate;
}
return GetConfig(sceneType);
}
public static SceneConfig GetConfig(int sceneType) public static SceneConfig GetConfig(int sceneType)
{ {
var gameSceneConfigs = SceneConfigData.Instance.GetSceneBySceneType(sceneType); var gameSceneConfigs = SceneConfigData.Instance.GetSceneBySceneType(sceneType);
return gameSceneConfigs.First(); return gameSceneConfigs.First();
} }
} }

View File

@@ -1,29 +0,0 @@
// using Fantasy;
// using Fantasy.Async;
// using Fantasy.Entitas;
// using Fantasy.Helper;
// using Fantasy.Network;
// using Fantasy.Network.Interface;
// using NB;
// using NB.Gate;
//
// namespace NB.Game;
//
// public class G2Game_EnterRequestHandler : RouteRPC<Scene, G2Game_EnterRequest, Game2G_EnterResponse>
// {
// protected override async FTask Run(Scene scene, G2Game_EnterRequest request, Game2G_EnterResponse response,
// Action reply)
// {
// Log.Debug("收到 G2Game_EnterRequestHandler");
//
//
// // 在缓存中检查该账号是否存在
// var gameAccountManageComponent = scene.GetComponent<PlayerManageComponent>();
//
// var account = await gameAccountManageComponent.Online(scene, request.AccountId, request.GateRouteId);
//
// response.RoleRouteId = account.RuntimeId;
// response.RoleInfo = account.GetRoleSimpleInfo();
// await FTask.CompletedTask;
// }
// }

View File

@@ -40,24 +40,22 @@ public static class PlayerManageComponentSystem
/// 玩家上线 /// 玩家上线
/// </summary> /// </summary>
/// <param name="self"></param> /// <param name="self"></param>
/// <param name="scene"></param>
/// <param name="accountId"></param> /// <param name="accountId"></param>
/// <param name="gateRouteId"></param> /// <param name="gateRouteId"></param>
public static async FTask<Player?> Online(this PlayerManageComponent self, Scene scene, long accountId, public static async FTask<Player?> Online(this PlayerManageComponent self, long accountId, long gateRouteId)
long gateRouteId)
{ {
Log.Debug("检查账号是否在缓存中"); Log.Debug("检查账号是否在缓存中");
if (!self.TryGet(accountId, out var account)) if (!self.TryGet(accountId, out var account))
{ {
// 首先要先到数据库中查询是否有这个账号 // 首先要先到数据库中查询是否有这个账号
account = await PlayerHelper.LoadDataBase(scene, accountId); account = await PlayerHelper.LoadDataBase(self.Scene, accountId);
// 如果有的话,就直接加入在缓存中就可以了 // 如果有的话,就直接加入在缓存中就可以了
if (account == null) if (account == null)
{ {
Log.Debug("检查到账号没有在数据库中,需要创建一个新的账号并且保存到数据库中"); Log.Debug("检查到账号没有在数据库中,需要创建一个新的账号并且保存到数据库中");
// 如果没有,就要创建一个新的并且保存到数据库。 // 如果没有,就要创建一个新的并且保存到数据库。
// 如果不存在,表示这是一个新的账号,需要创建一下这个账号。 // 如果不存在,表示这是一个新的账号,需要创建一下这个账号。
account = PlayerFactory.Create(scene, accountId); account = PlayerFactory.Create(self.Scene, accountId);
account.Level = 99; account.Level = 99;
@@ -111,6 +109,19 @@ public static class PlayerManageComponentSystem
return account; return account;
} }
public static async FTask Offline(this PlayerManageComponent self, long accountId, long sessionId)
{
if (self.TryGet(accountId, out var account))
{
if (account.SessionRunTimeId == sessionId)
{
//退出的是当前的
await account.Save();
self.Remove(accountId);
}
}
}
#endregion #endregion
#region & #region &

View File

@@ -0,0 +1,63 @@
using Fantasy;
using Fantasy.Async;
using Fantasy.Network;
using Fantasy.Network.Interface;
using Fantasy.Platform.Net;
using NB.Common;
using NB.Map;
namespace NB.Gate.Handler;
public class C2G_EnterRoomRequestHandler : MessageRPC<C2G_EnterRoomRequest, G2C_EnterRoomResponse>
{
protected override async FTask Run(Session session, C2G_EnterRoomRequest request, G2C_EnterRoomResponse response,
Action reply)
{
if (string.IsNullOrEmpty(request.RoomCode))
{
response.ErrorCode = ErrorCode.MapRoomIdError;
return;
}
var gateUnitSessionComponent = session.GetComponent<GateUnitSessionComponent>();
if (gateUnitSessionComponent == null)
{
response.ErrorCode = ErrorCode.ErrServer;
return;
}
// 在缓存中检查该账号是否存在
var gateUnitManageComponent = session.Scene.GetComponent<GateUnitManageComponent>();
if (gateUnitManageComponent == null)
{
response.ErrorCode = ErrorCode.ErrServer;
return;
}
var gateUnit = gateUnitManageComponent.Get(gateUnitSessionComponent.AccountID);
if (gateUnit == null)
{
response.ErrorCode = ErrorCode.ErrServer;
return;
}
RoomHelper.ParseCode(request.RoomCode, out var serviceId, out var roomId);
if (serviceId < 1 || roomId < 1)
{
response.ErrorCode = ErrorCode.MapRoomIdError;
return;
}
var sceneConfig = SceneConfigData.Instance.Get(serviceId);
if (sceneConfig == null)
{
response.ErrorCode = ErrorCode.MapRoomIdError;
return;
}
//先判断是否需要更好地图服务器
var mapRouteId = gateUnit.GetAddress(RouteType.MapRoute);
//执行进入房间操作
}
}

View File

@@ -5,7 +5,7 @@ using Fantasy.Network.Interface;
using Fantasy.Platform.Net; using Fantasy.Platform.Net;
using NB.Game; using NB.Game;
namespace NB.Gate.Handler; namespace NB.Gate;
public sealed class C2G_LoginRequestHandler : MessageRPC<C2G_LoginRequest, G2C_LoginResponse> public sealed class C2G_LoginRequestHandler : MessageRPC<C2G_LoginRequest, G2C_LoginResponse>
{ {

View File

@@ -21,7 +21,7 @@ public static class GateUnitSystem
{ {
#region Address #region Address
private static void RemoveAddress(this GateUnit self, int routType, long routeId) public static void RemoveAddress(this GateUnit self, int routType, long routeId)
{ {
if (self.SceneRoutes.TryGetValue(routType, out var route)) if (self.SceneRoutes.TryGetValue(routType, out var route))
{ {
@@ -32,12 +32,12 @@ public static class GateUnitSystem
} }
} }
private static void AddAddress(this GateUnit self, int routType, long routeId) public static void AddAddress(this GateUnit self, int routType, long routeId)
{ {
self.SceneRoutes[routType] = routeId; self.SceneRoutes[routType] = routeId;
} }
private static long GetAddress(this GateUnit self, int routType) public static long GetAddress(this GateUnit self, int routType)
{ {
return self.SceneRoutes.GetValueOrDefault(routType, 0); return self.SceneRoutes.GetValueOrDefault(routType, 0);
} }
@@ -69,10 +69,10 @@ public static class GateUnitSystem
{ {
routeComponent = session.AddComponent<RouteComponent>(); routeComponent = session.AddComponent<RouteComponent>();
} }
var gameSceneConfig = SceneConfigHelper.GetConfig(routeType); var gameSceneConfig = SceneConfigHelper.GetConfigByRouteType(routeType);
var gameRouteId = gameSceneConfig.RouteId; var gameRouteId = gameSceneConfig.RouteId;
//连接到游戏中心服
var gameResponse = (G2Common_EnterResponse)await self.Scene.NetworkMessagingComponent.CallInnerRoute( var gameResponse = (G2Common_EnterResponse)await self.Scene.NetworkMessagingComponent.CallInnerRoute(
gameRouteId, new G2Common_EnterRequest() gameRouteId, new G2Common_EnterRequest()
{ {
@@ -85,8 +85,8 @@ public static class GateUnitSystem
return gameResponse.ErrorCode; return gameResponse.ErrorCode;
} }
routeComponent.AddAddress(routeType, gameRouteId); routeComponent.AddAddress(routeType, gameResponse.UnitRouteId);
self.AddAddress(routeType, gameRouteId); self.AddAddress(routeType, gameResponse.UnitRouteId);
return ErrorCode.Successful; return ErrorCode.Successful;
} }

View File

@@ -13,10 +13,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Folder Include="Game\Handler\" />
<Folder Include="Game\Helper\" /> <Folder Include="Game\Helper\" />
<Folder Include="Map\Helper\" />
<Folder Include="Map\System\" />
<Folder Include="Room\" />
<Folder Include="Social\Chat\" /> <Folder Include="Social\Chat\" />
<Folder Include="Social\Club\" /> <Folder Include="Social\Club\" />
<Folder Include="Social\Mail\Handler\Inner\" /> <Folder Include="Social\Mail\Handler\Inner\" />

View File

@@ -1,15 +1,44 @@
// using Fantasy; using Fantasy;
// using Fantasy.Async; using Fantasy.Async;
// using Fantasy.Network.Interface; using Fantasy.Entitas;
// using Fantasy.Network.Interface;
// namespace NB.Map;
// namespace NB.Map;
// public class C2Map_CreateRoomRequestHandler : RouteRPC<Scene, C2Map_CreateRoomRequest, Map2C_CreateRoomResponse>
// { public class C2Map_CreateRoomRequestHandler : RouteRPC<MapUnit, C2Map_CreateRoomRequest, Map2C_CreateRoomResponse>
// protected override async FTask Run(Scene entity, C2Map_CreateRoomRequest request, Map2C_CreateRoomResponse response, {
// Action reply) protected override async FTask Run(MapUnit entity, C2Map_CreateRoomRequest request,
// { Map2C_CreateRoomResponse response,
// Log.Info($"创建房间=== map:{request.MapId} pass:{request.Password}"); Action reply)
// await FTask.CompletedTask; {
// } if (entity.MapId != request.MapId)
// } {
response.ErrorCode = ErrorCode.MapCreateRoomNotEnter;
return;
}
var roomManageComponent = entity.Scene.GetComponent<RoomManageComponent>();
if (roomManageComponent == null)
{
response.ErrorCode = ErrorCode.ErrServer;
return;
}
var roomId = roomManageComponent.AllocateId();
if (roomId < 1)
{
response.ErrorCode = ErrorCode.MapCreateRoomMax;
return;
}
// roomManageComponent.on
var room = Entity.Create<MapRoom>(entity.Scene, true, true);
room.Owner = entity.Id;
room.RoomId = roomId;
room.Code = RoomHelper.GenerateCode(entity.Scene.SceneConfigId, roomId);
roomManageComponent.Add(room);
Log.Info(
$"创建房间=== sId={entity.Scene.SceneConfigId} map:{request.MapId} id={room.RoomId} code={room.Code}");
await FTask.CompletedTask;
}
}

View File

@@ -0,0 +1,33 @@
using Fantasy;
using Fantasy.Async;
using Fantasy.Network.Interface;
namespace NB.Map;
public class C2Map_EnterMapRequestHandler : RouteRPC<MapUnit, C2Map_EnterMapRequest, Map2C_EnterMapResponse>
{
protected override async FTask Run(MapUnit entity, C2Map_EnterMapRequest request, Map2C_EnterMapResponse response,
Action reply)
{
var roomManageComponent = entity.Scene.GetComponent<RoomManageComponent>();
if (roomManageComponent == null)
{
response.ErrorCode = ErrorCode.ErrServer;
return;
}
// if (entity.RoomId > 0)
// {
// response.ErrorCode = ErrorCode.MapRoomHave;
// return;
// }
//
// roomManageComponent.Enter(entity, request.RoomId);
Log.Info($"进入地图=== map:{request.MapId}");
entity.MapId = request.MapId;
response.MapId = request.MapId;
await FTask.CompletedTask;
}
}

View File

@@ -0,0 +1,27 @@
using Fantasy;
using Fantasy.Async;
using Fantasy.Network.Interface;
namespace NB.Map.Inner;
public class G2Map_EnterRequestHandler : RouteRPC<Scene, G2Map_EnterRoomRequest, Map2G_EnterRoomResponse>
{
protected override async FTask Run(Scene entity, G2Map_EnterRoomRequest request, Map2G_EnterRoomResponse response,
Action reply)
{
var roomManageComponent = entity.GetComponent<RoomManageComponent>();
if (roomManageComponent == null)
{
response.ErrorCode = ErrorCode.ErrServer;
return;
}
RoomHelper.ParseCode(request.RoomCode, out var serviceId, out var roomId);
if (serviceId < 1 || roomId < 1)
{
response.ErrorCode = ErrorCode.MapRoomIdError;
return;
}
// roomManageComponent.Enter();
}
}

View File

@@ -0,0 +1,19 @@
using Fantasy;
using Fantasy.Entitas;
namespace NB.Map;
public static class MapUnitFactory
{
/// <summary>
/// 创建一个新的Player
/// </summary>
/// <param name="scene"></param>
/// <param name="aId">ToKen令牌传递过来的aId</param>
/// <returns></returns>
public static MapUnit Create(Scene scene, long aId)
{
var player = Entity.Create<MapUnit>(scene, aId, true, true);
return player;
}
}

View File

@@ -0,0 +1,69 @@
using System.Text;
namespace NB.Map;
public static class RoomHelper
{
#region id
private const string Base36Chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
private const int RoomSeqBits = 16; // 每个服务最多 65535 个房间
/// <summary>
/// 生成房间码固定5位
/// </summary>
/// <param name="serviceId"></param>
/// <param name="roomSeq"></param>
/// <returns></returns>
public static string GenerateCode(uint serviceId, int roomSeq)
{
long packed = ((long)serviceId << RoomSeqBits) | (uint)roomSeq;
string code = EncodeBase36(packed);
// 固定5位不够左侧补0
return code.PadLeft(5, '0');
}
/// <summary>
/// 解析房间码
/// </summary>
/// <param name="code"></param>
/// <param name="serviceId"></param>
/// <param name="roomSeq"></param>
public static void ParseCode(string code, out uint serviceId, out int roomSeq)
{
long packed = DecodeBase36(code);
roomSeq = (int)(packed & ((1 << RoomSeqBits) - 1));
serviceId = (uint)(packed >> RoomSeqBits);
}
private static string EncodeBase36(long value)
{
if (value == 0) return "0";
StringBuilder sb = new StringBuilder();
while (value > 0)
{
int remainder = (int)(value % 36);
sb.Insert(0, Base36Chars[remainder]);
value /= 36;
}
return sb.ToString();
}
private static long DecodeBase36(string str)
{
long result = 0;
foreach (char c in str)
{
int val = Base36Chars.IndexOf(c);
if (val < 0) throw new ArgumentException("Invalid Base36 character: " + c);
result = result * 36 + val;
}
return result;
}
#endregion
}

View File

@@ -0,0 +1,19 @@
using Fantasy.Entitas.Interface;
namespace NB.Map;
public class MapRoomDestroySystem : DestroySystem<MapRoom>
{
protected override void Destroy(MapRoom self)
{
self.Map = 0;
self.Password = string.Empty;
self.CreateTime = 0;
self.Owner = 0;
self.Units.Clear();
}
}
public static class MapRoomSystem
{
}

View File

@@ -0,0 +1,84 @@
using Fantasy;
using Fantasy.Async;
namespace NB.Map;
public static class MapUnitManageComponentSystem
{
#region 线线
/// <summary>
/// 玩家上线
/// </summary>
/// <param name="self"></param>
/// <param name="scene"></param>
/// <param name="accountId"></param>
/// <param name="gateRouteId"></param>
public static async FTask<MapUnit?> Online(this MapUnitManageComponent self, Scene scene,
long accountId,
long gateRouteId)
{
if (!self.TryGet(accountId, out var unit))
{
unit = MapUnitFactory.Create(scene, accountId);
self.Add(unit);
}
if (unit != null)
{
unit.GateRouteId = gateRouteId;
}
await FTask.CompletedTask;
return unit;
}
public static async FTask Offline(this MapUnitManageComponent self, Scene scene, long accountId, long gateRouteId)
{
if (self.TryGet(accountId, out var unit) && unit != null)
{
if (unit.GateRouteId == gateRouteId)
{
self.Remove(accountId); //如果当前网关和下线的网关一致
}
}
await FTask.CompletedTask;
}
#endregion
#region &
public static void Add(this MapUnitManageComponent self, MapUnit unit)
{
self.Units.Add(unit.Id, unit);
}
public static MapUnit? Get(this MapUnitManageComponent self, long accountId)
{
return self.Units.GetValueOrDefault(accountId);
}
public static bool TryGet(this MapUnitManageComponent self, long accountId, out MapUnit? unit)
{
return self.Units.TryGetValue(accountId, out unit);
}
public static void Remove(this MapUnitManageComponent self, long accountId, bool isDispose = true)
{
if (!self.Units.Remove(accountId, out var account))
{
return;
}
if (!isDispose)
{
return;
}
account.Dispose();
}
#endregion
}

View File

@@ -0,0 +1,93 @@
using Fantasy.Entitas;
using Fantasy.Entitas.Interface;
namespace NB.Map;
public class RoomManageComponentAwakeSystem : AwakeSystem<RoomManageComponent>
{
protected override void Awake(RoomManageComponent self)
{
for (int i = 1; i <= 65535; i++)
{
self.FreeIds.Enqueue(i, i);
}
}
}
public class RoomManageComponentDestroySystem : DestroySystem<RoomManageComponent>
{
protected override void Destroy(RoomManageComponent self)
{
foreach (var (_, room) in self.Rooms)
{
room.Dispose();
}
self.Rooms.Clear();
}
}
public static class RoomManageComponentSystem
{
#region
public static void Add(this RoomManageComponent self, MapRoom room)
{
self.Rooms[room.RoomId] = room;
}
public static bool Remove(this RoomManageComponent self, int roomId)
{
if (self.Rooms.TryGetValue(roomId, out var room))
{
self.ReleaseId(room.RoomId);
room.Dispose();
}
return true;
}
#endregion
#region Id
/// <summary>
/// 分配一个新的房间ID
/// </summary>
/// <returns></returns>
/// <exception cref="Exception"></exception>
public static int AllocateId(this RoomManageComponent self)
{
if (self.FreeIds.Count == 0) return 0;
int id = self.FreeIds.Dequeue();
self.InUseID.Add(id);
return id;
}
/// <summary>
/// 释放房间ID
/// </summary>
/// <param name="self"></param>
/// <param name="id"></param>
public static void ReleaseId(this RoomManageComponent self, int id)
{
if (self.InUseID.Remove(id))
{
self.FreeIds.Enqueue(id, id);
}
}
#endregion
#region 退
public static void Enter(this RoomManageComponent self, MapUnit unit, long roomId)
{
}
public static void Exit(this RoomManageComponent self, MapUnit unit)
{
}
#endregion
}

View File

@@ -6,6 +6,7 @@ using Fantasy.Event;
using Fantasy.Helper; using Fantasy.Helper;
using Fantasy.Serialize; using Fantasy.Serialize;
using NB.Game; using NB.Game;
using NB.Map;
using ProtoBuf; using ProtoBuf;
namespace NB; namespace NB;
@@ -66,6 +67,14 @@ public sealed class OnCreateSceneEvent : AsyncEventSystem<OnCreateScene>
case SceneType.Map: case SceneType.Map:
{ {
Log.Debug($"Map Scene SceneRuntimeId:{scene.RuntimeId}"); Log.Debug($"Map Scene SceneRuntimeId:{scene.RuntimeId}");
// uint serverId = 25255;
// for (int i = 1; i < 65535; i++)
// {
// var roomId = RoomHelper.GenerateCode(serverId, i);
// RoomHelper.ParseCode(roomId, out var pId, out var rId);
// Log.Info($"生成id测试房间id={roomId} 原始服务id{serverId} 原始房间id={i} 解析={pId} {rId}");
// }
break; break;
} }
case SceneType.Social: case SceneType.Social:
@@ -74,7 +83,6 @@ public sealed class OnCreateSceneEvent : AsyncEventSystem<OnCreateScene>
} }
case SceneType.Game: case SceneType.Game:
{ {
// // Begins transaction // // Begins transaction
// using (var session = mongoClient.StartSession()) // using (var session = mongoClient.StartSession())
// { // {
@@ -131,8 +139,8 @@ public sealed class OnCreateSceneEvent : AsyncEventSystem<OnCreateScene>
// //
// stopwatch.Stop(); // stopwatch.Stop();
// Log.Info($"创建100个号入库耗时={stopwatch.ElapsedMilliseconds}ms"); // Log.Info($"创建100个号入库耗时={stopwatch.ElapsedMilliseconds}ms");
break; break;
} }
case SceneType.Gate: case SceneType.Gate:

View File

@@ -5,6 +5,7 @@ using NB.Authentication;
using NB.Chat; using NB.Chat;
using NB.Game; using NB.Game;
using NB.Gate; using NB.Gate;
using NB.Map;
namespace NB; namespace NB;
@@ -50,6 +51,9 @@ public class OnSceneCreate_Init : AsyncEventSystem<OnCreateScene>
case SceneType.Map: case SceneType.Map:
{ {
Log.Info("创建地图场景==="); Log.Info("创建地图场景===");
scene.AddComponent<MapUnitManageComponent>();
scene.AddComponent<RoomManageComponent>();
scene.AddComponent<MapManageComponent>();
break; break;
} }
} }

View File

@@ -7,4 +7,4 @@
"commandLineArgs": "--m Develop" "commandLineArgs": "--m Develop"
} }
} }
} }

View File

@@ -16,6 +16,7 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADeserializeSystem_00601_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fff8cbe4b3c6c469b86633ea0c41accd783200_003Fba_003Fb30c4cb2_003FDeserializeSystem_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADeserializeSystem_00601_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fff8cbe4b3c6c469b86633ea0c41accd783200_003Fba_003Fb30c4cb2_003FDeserializeSystem_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADestroySystem_00601_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fff8cbe4b3c6c469b86633ea0c41accd783200_003F41_003F9b0e4a72_003FDestroySystem_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADestroySystem_00601_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fff8cbe4b3c6c469b86633ea0c41accd783200_003F41_003F9b0e4a72_003FDestroySystem_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F326268ddb927895dce924c78646b4d4ce2b05971ed1d8c9be99051ad1d2_003FDictionary_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F326268ddb927895dce924c78646b4d4ce2b05971ed1d8c9be99051ad1d2_003FDictionary_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F76803a04e31b4fee99d90bcbfc5a6bdde8e930_003F33_003F170c5f2b_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F8bc9cdb23bc146bcaaae0bb9e45e5d46d9dc00_003Fdb_003F02b9a6a5_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F8bc9cdb23bc146bcaaae0bb9e45e5d46d9dc00_003Fdb_003F02b9a6a5_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F77fc0eb92b774686bbae91cb92331703d83600_003Feb_003F3472606c_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F77fc0eb92b774686bbae91cb92331703d83600_003Feb_003F3472606c_003FDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEnumerable_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe8241d251b32455eb32cf531792be2de95400_003F8d_003F7f127f2d_003FEnumerable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AEnumerable_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fe8241d251b32455eb32cf531792be2de95400_003F8d_003F7f127f2d_003FEnumerable_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -55,6 +56,7 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AOuterReadOnlyMemoryPacketParser_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fef6258830955486e8fb0f971e12b16b183200_003F00_003F8c8caea8_003FOuterReadOnlyMemoryPacketParser_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AOuterReadOnlyMemoryPacketParser_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fef6258830955486e8fb0f971e12b16b183200_003F00_003F8c8caea8_003FOuterReadOnlyMemoryPacketParser_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APath_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F77fc0eb92b774686bbae91cb92331703d83600_003Ff3_003F87069e78_003FPath_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APath_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F77fc0eb92b774686bbae91cb92331703d83600_003Ff3_003F87069e78_003FPath_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APipeWriter_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb12a8c0984934a8b9a488164bdec50312ec00_003Ff6_003F9d6126fa_003FPipeWriter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APipeWriter_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb12a8c0984934a8b9a488164bdec50312ec00_003Ff6_003F9d6126fa_003FPipeWriter_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APriorityQueue_00602_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F46b03cd429344aac8ead6cde395f2ffd51918_003Fea_003Ff041a5cb_003FPriorityQueue_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APriorityQueue_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fd8a0b92db29b4e8f99b8db03b74e165943600_003F8e_003F0782b53d_003FPriorityQueue_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003APriorityQueue_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fd8a0b92db29b4e8f99b8db03b74e165943600_003F8e_003F0782b53d_003FPriorityQueue_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AProtoMemberAttribute_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ff4d74acca13b4111aaa523ebe15f4f3348800_003F51_003Fa2613704_003FProtoMemberAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AProtoMemberAttribute_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Ff4d74acca13b4111aaa523ebe15f4f3348800_003F51_003Fa2613704_003FProtoMemberAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AProtoMemberAttribute_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F1ad39110987b317aa178f528f27d9c837589269676a6a2ccc7fbf6b59b7d9_003FProtoMemberAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AProtoMemberAttribute_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003F1ad39110987b317aa178f528f27d9c837589269676a6a2ccc7fbf6b59b7d9_003FProtoMemberAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
@@ -66,6 +68,7 @@
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARouteAttribute_002Ecs_002Fl_003AC_0021_003FUsers_003Fbob_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F0207e94f3a3e4dca931382ccf94981471de930_003Fec_003F9637d33d_003FRouteAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ARouteAttribute_002Ecs_002Fl_003AC_0021_003FUsers_003Fbob_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F0207e94f3a3e4dca931382ccf94981471de930_003Fec_003F9637d33d_003FRouteAttribute_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASocketAsyncEventArgs_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fba482e5718a9464ab7c04f4d908677a5a4a00_003F4d_003F50c46f96_003FSocketAsyncEventArgs_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASocketAsyncEventArgs_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fba482e5718a9464ab7c04f4d908677a5a4a00_003F4d_003F50c46f96_003FSocketAsyncEventArgs_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASocket_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fee58397314f048f4bc5a37ba20f58487a6000_003F8f_003F1ab6f699_003FSocket_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASocket_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fee58397314f048f4bc5a37ba20f58487a6000_003F8f_003F1ab6f699_003FSocket_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASortedDictionary_00602_002Ecs_002Fl_003AC_0021_003FUsers_003F60527_003FAppData_003FRoaming_003FJetBrains_003FRider2025_002E1_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F46b03cd429344aac8ead6cde395f2ffd51918_003F9c_003F7827c220_003FSortedDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASortedDictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fd8a0b92db29b4e8f99b8db03b74e165943600_003Fe4_003Fa30ab96a_003FSortedDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASortedDictionary_00602_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fd8a0b92db29b4e8f99b8db03b74e165943600_003Fe4_003Fa30ab96a_003FSortedDictionary_00602_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASortedSet_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fd35931c05c2c5734c4c1478c8cfaa1f36c5baa3c7ff24f16adbb53adba63f2_003FSortedSet_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASortedSet_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FSourcesCache_003Fd35931c05c2c5734c4c1478c8cfaa1f36c5baa3c7ff24f16adbb53adba63f2_003FSortedSet_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASortedSet_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F1309bdfad9e64c29a23c2fe66eb5be8c43600_003F8a_003F697b2f64_003FSortedSet_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String> <s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ASortedSet_00601_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003F_002E_002E_003FLibrary_003FApplication_0020Support_003FJetBrains_003FRider2024_002E3_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F1309bdfad9e64c29a23c2fe66eb5be8c43600_003F8a_003F697b2f64_003FSortedSet_00601_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>