Exemplo n.º 1
0
    //申请解散房间返回用户选择信息
    public void OnEventRequestReply(byte[] buffer, int size)
    {
        CMD_GR_RequestReply requestReply = NetUtil.BytesToStruct <CMD_GR_RequestReply>(buffer);

        MyDebug.Log(requestReply.cbAgree + "================请求答复===================" + requestReply.dwUserID);
        DissloveRoomResponseVo vo = new DissloveRoomResponseVo();

        vo.result = requestReply.cbAgree;
        vo.userId = (int)requestReply.dwUserID;
        SocketEventHandle.Instance.SetClientResponse(APIS.DISSOLIVE_ROOM_RESPONSE, NetUtil.ObjToJson(vo));
    }
Exemplo n.º 2
0
    private void DissolveRoomReply(ClientResponse response)
    {
        DissloveRoomResponseVo req = NetUtil.JsonToObj <DissloveRoomResponseVo>(response.message);

        MyDebug.Log(req.userId + "--------++++++++++++++++++++++++++++++++++++++++++++++++++++--------" + req.result);

        if (req.userId == 0)
        {
            CloseUI();
            return;
        }
        doDissoliveRoomRequest((int)req.userId, req.result);
    }
Exemplo n.º 3
0
    //返回最终请求解散结果
    public void OnEventCancelResult(byte[] buffer)
    {
        CMD_GR_RequestResult requestResult = NetUtil.BytesToStruct <CMD_GR_RequestResult>(buffer);

        MyDebug.Log("===============================" + requestResult.cbResult);
        DissloveRoomResponseVo vo = new DissloveRoomResponseVo();

        vo.result  = requestResult.cbResult;
        vo.tableId = (int)requestResult.dwTableID;
        SocketEventHandle.Instance.SetClientResponse(APIS.DISSOLIVE_ROOM_RESPONSE, NetUtil.ObjToJson(vo));
        if (requestResult.cbResult == 1)
        {
            isDisslove = true;
        }
    }