协议修改

This commit is contained in:
2025-09-25 23:22:07 +08:00
parent ddffaac7b3
commit 5218bc7585
16 changed files with 159 additions and 125 deletions

View File

@@ -66,11 +66,23 @@ public static class RoomManageComponentSystem
return true;
}
public static void Check(this RoomManageComponent self, int roomId)
{
if (self.Rooms.TryGetValue(roomId, out var room))
{
if (room.Units.Count < 1)
{
Log.Info($"房间没人了解散房间id={roomId}");
// self.Remove(roomId);
}
}
}
public static MapRoom? Get(this RoomManageComponent self, int roomId)
{
return self.Rooms.GetValueOrDefault(roomId);
}
// public static MapRoom? Get(this RoomManageComponent self, long roomId)
// {
// return self.Rooms.GetValueOrDefault(roomId);