Exemple #1
0
 /// <summary>
 /// 处理点击解散房间按钮
 /// </summary>
 void HandleBtnDissolveRoom()
 {
     //发送玩家申请解散房间请求
     NetMsg.ClientDismissRoomReq msg = new NetMsg.ClientDismissRoomReq();
     msg.iUserId = GameData.Instance.PlayerNodeDef.iUserId;
     msg.cType   = 1;
     NetworkMgr.Instance.GameServer.SendDisMissRoomReq(msg);
 }
Exemple #2
0
 /// <summary>
 /// 发送同意解散房间的消息
 /// </summary>
 /// <param name="status">1发起,2表示同意,3表示拒绝</param>
 public void SendDissolveMessage(int status)
 {
     NetMsg.ClientDismissRoomReq msg = new NetMsg.ClientDismissRoomReq();
     msg.iUserId = GameData.Instance.PlayerNodeDef.iUserId;
     msg.cType   = (byte)status;
     NetworkMgr.Instance.GameServer.SendDisMissRoomReq(msg);
     //发送准备请求
     if (status == 3 && GameData.Instance.PlayerPlayingPanelData.iDissolveStatus == 1)
     {
         GameData.Instance.PlayerPlayingPanelData.iDissolveStatus = 0;
         NetMsg.ClientReadyReq ready = new NetMsg.ClientReadyReq();
         ready.iUserId = GameData.Instance.PlayerNodeDef.iUserId;
         NetworkMgr.Instance.GameServer.SendReadyReq(ready);
     }
 }