diff --git a/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs b/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs index 83145e79..b59b5ade 100644 --- a/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs +++ b/AxibugEmuOnline.Client/Assets/Script/Manager/AppRoom.cs @@ -425,5 +425,25 @@ namespace AxibugEmuOnline.Client.Manager //解压 byte[] data = Helper.DecompressByteArray(msg.RawBitmap.ToArray()); } - } + } + + public static class RoomEX + { + /// + /// 获取房间空闲席位下标 (返回True表示由余位) + /// + /// + /// + /// + public static bool GetFreeSlot(this Protobuf_Room_MiniInfo roomMiniInfo,out int[] freeSlots) + { + List temp = new List(); + if (roomMiniInfo.Player1UID > 0) temp.Add(0); + if (roomMiniInfo.Player2UID > 1) temp.Add(1); + if (roomMiniInfo.Player3UID > 2) temp.Add(2); + if (roomMiniInfo.Player4UID > 3) temp.Add(3); + freeSlots = temp.ToArray(); + return freeSlots.Length > 0; + } + } } \ No newline at end of file