//玩家开始匹配 public async void StarMathch(params object[] objs) { Log.Debug(SessionComponent.Instance.Session.Id.ToString()); M2C_StartMatch g2CStartMatch = (M2C_StartMatch)await SessionComponent.Instance.Session.Call( new C2M_StartMatch() { MatchRoomId = mJoyLdsRoomData.RoomId }); if (mCurrGameRoomState == JoyLdsGameState.BeingPlayCards) { return; } UIComponent.GetUiView <JoyLandlordsRoomPanelComponent>().StartMath(); mCurrGameRoomState = JoyLdsGameState.BeingMatching;//当前房间的游戏状态 }
//开始匹配 public async ETTask <bool> StartMatch(int roomId) { MatchRoomConfig matchRoomConfig = await GetMatchRoomConfig(roomId); if (IsHaveReliefPayment && UserComponent.Ins.pSelfUser.Beans < 1000) { L2C_GetReliefPayment l2CGetReliefPayment = (L2C_GetReliefPayment)await SessionComponent.Instance.Call(new C2L_GetReliefPayment()); if (!string.IsNullOrEmpty(l2CGetReliefPayment.Message)) { IsHaveReliefPayment = false; UIComponent.GetUiView <NormalHintPanelComponent>().ShowHintPanel(l2CGetReliefPayment.Message); } else { UIComponent.GetUiView <PopUpHintPanelComponent>().ShowOptionWindow("成功领取救济金 每日三次", null, PopOptionType.Single); } } if (matchRoomConfig.BesansLowest > UserComponent.Ins.pSelfUser.Beans) { UIComponent.GetUiView <PopUpHintPanelComponent>().ShowOptionWindow("豆子数低于房间最低限制 是否购买", ShowShop); return(false); } M2C_StartMatch m2CStartMatch = (M2C_StartMatch)await SessionComponent.Instance.Call(new C2M_StartMatch() { MatchRoomId = roomId }); if (!string.IsNullOrEmpty(m2CStartMatch.Message)) { UIComponent.GetUiView <NormalHintPanelComponent>().ShowHintPanel(m2CStartMatch.Message); return(false); } else { return(true); } }