Inheritance: global::ProtoBuf.IExtensible
Beispiel #1
0
        private void EGMI_ACK_SWAP_ROW(NFMsg.MsgBase xMsg)
        {
            NFMsg.ObjectRecordSwap xData = new NFMsg.ObjectRecordSwap();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.ObjectRecordSwap)) as NFMsg.ObjectRecordSwap;

            NFIObject        go            = NFCKernelModule.Instance.GetObject(NFNetController.PBToNF(xData.player_id));
            NFIRecordManager recordManager = go.GetRecordManager();
            NFIRecord        record        = recordManager.GetRecord(System.Text.Encoding.Default.GetString(xData.origin_record_name));

            record.SwapRow(xData.row_origin, xData.row_target);
        }
        private void OnSwapRow(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.ObjectRecordSwap recordData = NFMsg.ObjectRecordSwap.Parser.ParseFrom(xMsg.msg_data);

            NFIObject        go            = mKernelModule.GetObject(mHelpModule.PBToNF(recordData.player_id));
            NFIRecordManager recordManager = go.GetRecordManager();
            NFIRecord        record        = recordManager.GetRecord(recordData.origin_record_name.ToStringUtf8());


            //目前认为在同一张表中交换吧
            record.SwapRow(recordData.row_origin, recordData.row_target);
        }
Beispiel #3
0
        public void RequireSwapRow(NFGUID objectID, string strRecordName, int nOriginRow, int nTargetRow)
        {
            NFMsg.ObjectRecordSwap xData = new NFMsg.ObjectRecordSwap();
            xData.PlayerId         = mHelpModule.NFToPB(objectID);
            xData.OriginRecordName = ByteString.CopyFromUtf8(strRecordName);
            xData.TargetRecordName = ByteString.CopyFromUtf8(strRecordName);
            xData.RowOrigin        = nOriginRow;
            xData.RowTarget        = nTargetRow;

            mxBody.SetLength(0);
            xData.WriteTo(mxBody);

            Debug.Log("send upload record swapRow");
            SendMsg((int)NFMsg.EGameMsgID.AckSwapRow, mxBody);
        }
    public void RequireSwapRow(NFrame.NFGUID self, string strRecordName, int nOriginRow, int nTargetRow)
    {
        NFMsg.ObjectRecordSwap xData = new NFMsg.ObjectRecordSwap();
        xData.player_id          = NFBinarySendLogic.NFToPB(self);
        xData.origin_record_name = System.Text.Encoding.Default.GetBytes(strRecordName);
        xData.target_record_name = System.Text.Encoding.Default.GetBytes(strRecordName);
        xData.row_origin         = nOriginRow;
        xData.row_target         = nTargetRow;

        MemoryStream stream = new MemoryStream();

        Serializer.Serialize <NFMsg.ObjectRecordSwap>(stream, xData);
        Debug.Log("send upload record swapRow");
        SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_SWAP_ROW, stream);
    }
Beispiel #5
0
        public void RequireSwapRow(NFrame.NFGUID self, string strRecordName, int nOriginRow, int nTargetRow)
        {
            NFMsg.ObjectRecordSwap xData = new NFMsg.ObjectRecordSwap();
            xData.player_id          = NFNetController.NFToPB(self);
            xData.origin_record_name = System.Text.Encoding.Default.GetBytes(strRecordName);
            xData.target_record_name = System.Text.Encoding.Default.GetBytes(strRecordName);
            xData.row_origin         = nOriginRow;
            xData.row_target         = nTargetRow;

            mxBody.SetLength(0);
            mxSerializer.Serialize(mxBody, xData);

            Debug.Log("send upload record swapRow");
            SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_SWAP_ROW, mxBody);
        }
Beispiel #6
0
        private void OnSwapRow(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.ObjectRecordSwap recordData = new NFMsg.ObjectRecordSwap();
            recordData = Serializer.Deserialize <NFMsg.ObjectRecordSwap>(new MemoryStream(xMsg.msg_data));

            NFIObject        go            = mKernelModule.GetObject(mHelpModule.PBToNF(recordData.player_id));
            NFIRecordManager recordManager = go.GetRecordManager();
            NFIRecord        record        = recordManager.GetRecord(System.Text.Encoding.Default.GetString(recordData.origin_record_name));


            //目前认为在同一张表中交换吧
            record.SwapRow(recordData.row_origin, recordData.row_target);
        }
        private void EGMI_ACK_SWAP_ROW(MsgHead head, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.ObjectRecordSwap recordData = new NFMsg.ObjectRecordSwap();
            recordData = Serializer.Deserialize <NFMsg.ObjectRecordSwap>(new MemoryStream(xMsg.msg_data));

            NFIObject        go            = NFCKernel.Instance.GetObject(PBToNF(recordData.player_id));
            NFIRecordManager recordManager = go.GetRecordManager();
            NFIRecord        record        = recordManager.GetRecord(System.Text.Encoding.Default.GetString(recordData.origin_record_name));


            //目前认为在同一张表中交换吧
            record.SwapRow(recordData.row_origin, recordData.row_target);
        }
        private void EGMI_ACK_SWAP_ROW(int id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.ObjectRecordSwap xData = NFMsg.ObjectRecordSwap.Parser.ParseFrom(xMsg.MsgData);

            NFIObject go = mKernelModule.GetObject(mHelpModule.PBToNF(xData.PlayerId));

            if (go == null)
            {
                Debug.LogError("error id" + xData.PlayerId);
                return;
            }

            NFIRecordManager recordManager = go.GetRecordManager();
            NFIRecord        record        = recordManager.GetRecord(xData.OriginRecordName.ToStringUtf8());

            record.SwapRow(xData.RowOrigin, xData.RowTarget);
        }
Beispiel #9
0
        private void EGMI_ACK_SWAP_ROW(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.ObjectRecordSwap xData = NFMsg.ObjectRecordSwap.Parser.ParseFrom(xMsg.msg_data);

            NFIObject go = mKernelModule.GetObject(mHelpModule.PBToNF(xData.player_id));

            if (go == null)
            {
                Debug.LogError("error id" + xData.player_id);
                return;
            }

            NFIRecordManager recordManager = go.GetRecordManager();
            NFIRecord        record        = recordManager.GetRecord(xData.origin_record_name.ToStringUtf8());

            record.SwapRow(xData.row_origin, xData.row_target);
        }
Beispiel #10
0
		private void EGMI_ACK_SWAP_ROW(MsgHead head, MemoryStream stream)
		{
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize<NFMsg.MsgBase>(stream);

			NFMsg.ObjectRecordSwap recordData = new NFMsg.ObjectRecordSwap();
            recordData = Serializer.Deserialize<NFMsg.ObjectRecordSwap>(new MemoryStream(xMsg.msg_data));

            NFIObject go = NFCKernelModule.Instance.GetObject(PBToNF(recordData.player_id));
            NFIRecordManager recordManager = go.GetRecordManager();
            NFIRecord record = recordManager.GetRecord(System.Text.Encoding.Default.GetString(recordData.origin_record_name));


            //目前认为在同一张表中交换吧
            record.SwapRow(recordData.row_origin, recordData.row_target);
        
        }
    public void RequireSwapRow(NFrame.NFGUID self, string strRecordName, int nOriginRow, int nTargetRow)
    {
        NFMsg.ObjectRecordSwap xData = new NFMsg.ObjectRecordSwap();
        xData.player_id = NFBinarySendLogic.NFToPB(self);
        xData.origin_record_name = System.Text.Encoding.Default.GetBytes(strRecordName);
        xData.target_record_name = System.Text.Encoding.Default.GetBytes(strRecordName);
        xData.row_origin = nOriginRow;
        xData.row_target = nTargetRow;

        MemoryStream stream = new MemoryStream();
        Serializer.Serialize<NFMsg.ObjectRecordSwap>(stream, xData);
        Debug.Log("send upload record swapRow");
        SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_SWAP_ROW, stream);
    }