Exemplo n.º 1
0
    void RecevSQDHZWSuc(MsgGlobal msg)
    {
        MsgChangeSeatInfo  data = msg.change_seat_info;
        ArgsChangeSeatInfo args = new ArgsChangeSeatInfo();

        args.applyId = data.apply_player_id;
        args.toId    = data.to_player_id;
        NotificationCenter.Instance().PostDispatchEvent((uint)ENotificationMsgType.EApplyChangeSeat, args);
    }
Exemplo n.º 2
0
    /// <summary>
    /// 回答是否换座位
    /// </summary>
    /// <param name="toPlayerId"></param>
    public void SendAgreeChangeSeat(ulong applyId, uint result)
    {
        MsgGlobal mGl = new MsgGlobal();

        mGl.change_seat_info = new MsgChangeSeatInfo();
        MsgChangeSeatInfo msg = mGl.change_seat_info;

        msg.apply_player_id = applyId;
        msg.to_player_id    = PlayerInfo.Instance.mPlayerPid;
        msg.apply_result    = result;
        TCPNetWork.GetInstance().SendMsgToServer(ServerMsgKey.CLIENT_AGREE_CHANGE_SEAT, mGl);
    }
Exemplo n.º 3
0
    void RecevDHZWFail(MsgGlobal msg)
    {
        MsgChangeSeatInfo data = msg.change_seat_info;
        string            str  = string.Format("applyId:{0},toId:{1}", data.apply_player_id, data.to_player_id);

        Debug.Log(str);
        ArgsChangeSeatInfo args = new ArgsChangeSeatInfo();

        args.applyId = data.apply_player_id;
        args.toId    = data.to_player_id;
        args.result  = 1;
        NotificationCenter.Instance().PostDispatchEvent((uint)ENotificationMsgType.EAgreeChangeSeat, args);
    }
Exemplo n.º 4
0
    /// <summary>
    /// 申请换座位
    /// </summary>
    /// <param name="toPlayerId"></param>
    public void SendApplyChangeSeat(ulong toPlayerId)
    {
        if (toPlayerId == 0)
        {
            UIManagers.Instance.EnqueueTip("还没有人");
            return;
        }

        MsgGlobal mGl = new MsgGlobal();

        mGl.change_seat_info = new MsgChangeSeatInfo();
        MsgChangeSeatInfo msg = mGl.change_seat_info;

        msg.apply_player_id = PlayerInfo.Instance.mPlayerPid;
        msg.to_player_id    = toPlayerId;
        TCPNetWork.GetInstance().SendMsgToServer(ServerMsgKey.CLIENT_APPLY_CHANGE_SEAT, mGl);
    }