Example #1
0
 public void HandleBtnInSeat(int index)
 {
     //发送占座消息
     NetMsg.ClientUserBespeakReqDef msg = new NetMsg.ClientUserBespeakReqDef();
     msg.byFromType = 2;                                                   //消息来源,1来自大厅,2来自游戏客户端
     msg.iUserId    = GameData.Instance.PlayerNodeDef.iUserId;             // 用户编号
     msg.iSeatNum   = (byte)(index);                                       //座位号
     Debug.LogError("发送占座消息:" + msg.iSeatNum);
     msg.iRoomNum  = Convert.ToInt32(MahjongCommonMethod.Instance.RoomId); //房间号
     msg.iParlorId = MahjongLobby_AH.GameData.Instance.ParlorShowPanelData.iParlorId;
     NetworkMgr.Instance.GameServer.SendClientUserBespeakReq(msg);
 }
        /// <summary>
        /// 打开MainViweImportantMessagePanel面板
        /// </summary>
        void OnOpenImportantPanel(int seat)
        {
            //Debug.Log ("===========================1");
            m_gImportantMessagePanel.OnOpen(m_openRoomInfo.iOpenRoomTime, m_openRoomInfo.caOpenRoomParam[4], () =>
            {
                SystemMgr.Instance.AudioSystem.PlayAuto(AudioSystem.AudioType.VIEW_CLOSE);
                //发送占座消息
                NetMsg.ClientUserBespeakReqDef msg = new NetMsg.ClientUserBespeakReqDef();
                msg.byFromType = 1;                                       //消息来源,1来自大厅,2来自游戏客户端
                msg.iUserId    = GameData.Instance.PlayerNodeDef.iUserId; // 用户编号
                msg.iSeatNum   = (byte)(seat + 1);                        //座位号
                msg.iRoomNum   = m_openRoomInfo.iRoomNum;                 //房间号
                msg.iParlorId  = GameData.Instance.ParlorShowPanelData.iParlorId;
                NetworkMgr.Instance.LobbyServer.SendClientUserBespeakReq(msg);

                //大厅桌面显示房间开始倒计时
                //UIMainView.Instance.LobbyPanel.OnShowYuYueRoom(m_openRoomInfo.caOpenRoomParam[m_openRoomInfo.caOpenRoomParam.Length - 2]*60);
            });
        }