diff --git a/Assets/Temp/Scripts/View_Panel2.cs b/Assets/Temp/Scripts/View_Panel2.cs
index 91832a2b..3ff00ae9 100644
--- a/Assets/Temp/Scripts/View_Panel2.cs
+++ b/Assets/Temp/Scripts/View_Panel2.cs
@@ -479,10 +479,15 @@ public class View_Panel2 : XUIPanel
//加入房间
Debug.Log("进入训练");
-
-
- string RoomName = "joinroom " + currentRoomName;
- _ = AdamSync.SyncCreateRoom.SendMessageAsync(RoomName);
+ if (UIBootstrap.Instance.IsAllocate())
+ {
+ string RoomName = "joinroom " + currentRoomName;
+ _ = AdamSync.SyncCreateRoom.SendMessageAsync(RoomName);
+ }
+ else
+ {
+ Debug.Log($"没有分配席位");
+ }
});
///进入导调
entering_key_btn.onClick.AddListener(() =>
@@ -519,7 +524,7 @@ public class View_Panel2 : XUIPanel
{
//if (roomdata.data[i].State != 2)
//{
- CreateRoomBase(roomdata.data[i].Id, roomdata.data[i].Name);
+ CreateRoomBase(roomdata.data[i].Id, roomdata.data[i].Name);
//}
}
diff --git a/Assets/Zion/Scripts/Adam/UIBootstrap.cs b/Assets/Zion/Scripts/Adam/UIBootstrap.cs
index 46c0ad8a..50947acb 100644
--- a/Assets/Zion/Scripts/Adam/UIBootstrap.cs
+++ b/Assets/Zion/Scripts/Adam/UIBootstrap.cs
@@ -101,17 +101,18 @@ public class UIBootstrap : MonoSingleton
}
return "0";
}
- /////
- ///// 是否分配角色
- /////
- //public bool IsAllocate()
- //{
- // string currentName =
- // for(int i = 0;i < subjectInfo.Count; i++)
- // {
-
- // }
- //}
+ ///
+ /// 是否分配角色
+ ///
+ public bool IsAllocate()
+ {
+ for (int i = 0; i < subjectInfo.Count; i++)
+ {
+ if(subjectInfo[i].UserAccount== GlobalFlag.currentUser.login_name)
+ return true;
+ }
+ return false;
+ }