协议修改
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user