public static void OpenInstanceUI(int instanceID, bool hideTheVisible = false, UIType type = UIType.FullScreen) { InstanceManagerUI.InstanceID = instanceID; ZhuXianPeiZhi zhuXianPeiZhi = DataReader <ZhuXianPeiZhi> .Get(instanceID); int chapterID = zhuXianPeiZhi.chapterId; ZhuXianZhangJiePeiZhi zhuXianZhangJiePeiZhi = DataReader <ZhuXianZhangJiePeiZhi> .Get(chapterID); List <ChapterInfo> dataByInstanceType = DungeonManager.Instance.GetDataByInstanceType(zhuXianZhangJiePeiZhi.chapterType); if (dataByInstanceType.get_Count() == 0 || dataByInstanceType.Find((ChapterInfo a) => a.chapterId == chapterID) == null) { DungeonManager.Instance.SendGetDungeonDataReq(chapterID, (DungeonType.ENUM)zhuXianZhangJiePeiZhi.chapterType, delegate { InstanceManagerUI.OpenInstanceUI(instanceID, hideTheVisible, type); }); return; } FuBenJiChuPeiZhi fuBenJiChuPeiZhi = DataReader <FuBenJiChuPeiZhi> .Get(instanceID); if (fuBenJiChuPeiZhi.type == 103) { InstanceSelectUI instanceSelectUI = UIManagerControl.Instance.OpenUI("InstanceSelectUI", null, true, UIType.FullScreen) as InstanceSelectUI; instanceSelectUI.RefreshUIByInstanceID(instanceID); } else { InstanceSelectUI instanceSelectUI2 = UIManagerControl.Instance.OpenUI("InstanceSelectUI", null, true, UIType.FullScreen) as InstanceSelectUI; instanceSelectUI2.RefreshUIByInstanceID(instanceID); InstanceDetailUI instanceDetailUI = UIManagerControl.Instance.OpenUI("InstanceDetailUI", null, false, UIType.Pop) as InstanceDetailUI; instanceDetailUI.RefreshUI(instanceID); } }
private void OnClcikInstancesLayoutItem(GameObject sender) { InstancesLayoutItem component = sender.GetComponent <InstancesLayoutItem>(); Hashtable hashtable = DungeonManager.Instance.CheckLock(component.instanceID); bool flag = (bool)hashtable.get_Item("ISLock"); string text = (string)hashtable.get_Item("LockReason"); if (flag) { UIManagerControl.Instance.ShowToastText(text); } else { FuBenJiChuPeiZhi fuBenJiChuPeiZhi = DataReader <FuBenJiChuPeiZhi> .Get(component.instanceID); if (fuBenJiChuPeiZhi.type != 103) { UIBase uIIfExist = UIManagerControl.Instance.GetUIIfExist("InstanceSelectUI"); if (uIIfExist != null) { (uIIfExist as InstanceSelectUI).RefreshUIByInstanceID(component.instanceID); } InstanceDetailUI instanceDetailUI = UIManagerControl.Instance.OpenUI("InstanceDetailUI", null, false, UIType.Pop) as InstanceDetailUI; InstanceManagerUI.InstanceID = component.instanceID; instanceDetailUI.RefreshUI(component.instanceID); } } }