/// <summary> /// 处理对搜索结果的处理 /// </summary> public void SearchResultDeal(int iParlorId) { ParlorShowPanelData pspd = GameData.Instance.ParlorShowPanelData; int status = 1; //搜索结果的状态 1表示不在玩家的审核和已有麻将馆队列 2表示在已有麻将馆队列 3表示在申请麻将馆队列 for (int i = 0; i < pspd.parlorInfoDef.Length; i++) { if (pspd.parlorInfoDef[i] != null && pspd.parlorInfoDef[i].iParlorId == iParlorId) { status = 2; break; } } if (status != 1) { for (int i = 0; i < pspd.ApplyParlorMessage.Count; i++) { if (pspd.ApplyParlorMessage[i].iParlorId == iParlorId) { status = 3; break; } } } UIMainView.Instance.ParlorShowPanel.joinParlorPanel.BtnClose(); //直接发送馆的申请请求 if (status == 1) { NetMsg.ClientJoinParlorReq msg = new NetMsg.ClientJoinParlorReq(); msg.iUserId = GameData.Instance.PlayerNodeDef.iUserId; msg.iParlorId = iParlorId; NetworkMgr.Instance.LobbyServer.SendJoinParlorReq(msg); } //直接进入申请或者已加入界面 else if (status == 2 || status == 3) { //如果是3给出提示 if (status == 3) { UIMgr.GetInstance().GetUIMessageView().Show("您已申请该麻将馆,请耐心等待老板审核!"); } PlayerPrefs.SetInt(ParlorShowPanelData.SaveLaseParlorId, iParlorId); //请求麻将馆请求信息 Messenger_anhui.Broadcast(MainViewLobbyPanel.MESSAGE_OPENPARLOR); } }
/// <summary> /// 加入麻将馆 /// </summary> public void BtnJoinParlor() { SystemMgr.Instance.AudioSystem.PlayAuto(AudioSystem.AudioType.VIEW_CLOSE); ////判断加馆冷却时间 //if ((int)MahjongCommonMethod.Instance.DateTimeToUnixTimestamp(DateTime.Now) - GameData.Instance.PlayerNodeDef.userDef.iLeaveParlorTime < GameData.Instance.ParlorShowPanelData.ColdTimer // || (int)MahjongCommonMethod.Instance.DateTimeoUnixTimestamp(DateTime.Now) - GameData.Instance.PlayerNodeDef.userDef.iKickParlorTime < GameData.Instance.ParlorShowPanelData.ColdTimer) //{ // MahjongCommonMethod.Instance.ShowRemindFrame("您最近两小时退出或者解散过馆,不可加入!"); // return; //} NetMsg.ClientJoinParlorReq msg = new NetMsg.ClientJoinParlorReq(); msg.iUserId = GameData.Instance.PlayerNodeDef.iUserId; msg.iParlorId = iParlorId; Network.NetworkMgr.Instance.LobbyServer.SendJoinParlorReq(msg); //关闭玩家界面 Destroy(gameObject); }