Inheritance: global::ProtoBuf.IExtensible
Exemplo n.º 1
0
        public void RequireRecordVector3(NFGUID objectID, string strRecordName, int nRow, int nCol, NFDataList.TData newVar)
        {
            NFMsg.ObjectRecordVector3 xData = new NFMsg.ObjectRecordVector3();
            xData.PlayerId   = mHelpModule.NFToPB(objectID);
            xData.RecordName = ByteString.CopyFromUtf8(strRecordName);

            NFMsg.RecordVector3 xRecordVector = new NFMsg.RecordVector3();
            xRecordVector.Row  = nRow;
            xRecordVector.Col  = nCol;
            xRecordVector.Data = mHelpModule.NFToPB(newVar.Vector3Val());

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

            SendMsg((int)NFMsg.EGameMsgID.AckRecordVector3, mxBody);
        }
Exemplo n.º 2
0
    public void RequireRecordVector3(NFrame.NFGUID self, string strRecordName, int nRow, int nCol, NFIDataList.TData newVar)
    {
        NFMsg.ObjectRecordVector3 xData = new NFMsg.ObjectRecordVector3();
        xData.player_id   = NFBinarySendLogic.NFToPB(self);
        xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName);

        NFMsg.RecordVector3 xRecordVector = new NFMsg.RecordVector3();
        xRecordVector.row  = nRow;
        xRecordVector.col  = nCol;
        xRecordVector.data = NFBinarySendLogic.NFToPB(newVar.Vector3Val());

        MemoryStream stream = new MemoryStream();

        Serializer.Serialize <NFMsg.ObjectRecordVector3>(stream, xData);
        SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_RECORD_VECTOR3, stream);
    }
Exemplo n.º 3
0
        public void RequireRecordVector3(NFrame.NFGUID self, string strRecordName, int nRow, int nCol, NFDataList.TData newVar)
        {
            NFMsg.ObjectRecordVector3 xData = new NFMsg.ObjectRecordVector3();
            xData.player_id   = NFNetController.NFToPB(self);
            xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName);

            NFMsg.RecordVector3 xRecordVector = new NFMsg.RecordVector3();
            xRecordVector.row  = nRow;
            xRecordVector.col  = nCol;
            xRecordVector.data = NFNetController.NFToPB(newVar.Vector3Val());

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

            SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_RECORD_VECTOR3, mxBody);
        }
Exemplo n.º 4
0
        private void OnRecordVector3(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

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

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


            for (int i = 0; i < recordData.property_list.Count; i++)
            {
                record.SetVector3(recordData.property_list[i].row, recordData.property_list[i].col, mHelpModule.PBToNF(recordData.property_list[i].data));
            }
        }
Exemplo n.º 5
0
        private void OnRecordVector3(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.ObjectRecordVector3 recordData = new NFMsg.ObjectRecordVector3();
            recordData = Serializer.Deserialize <NFMsg.ObjectRecordVector3>(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.record_name));


            for (int i = 0; i < recordData.property_list.Count; i++)
            {
                record.SetVector3(recordData.property_list[i].row, recordData.property_list[i].col, mHelpModule.PBToNF(recordData.property_list[i].data));
            }
        }
Exemplo n.º 6
0
    public void RequireRecordVector3(NFrame.NFGUID self, string strRecordName, int nRow, int nCol, NFIDataList.TData newVar)
    {
        NFMsg.ObjectRecordVector3 xData = new NFMsg.ObjectRecordVector3();
        xData.player_id = NFBinarySendLogic.NFToPB(self);
        xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName);

        NFMsg.RecordVector3 xRecordVector = new NFMsg.RecordVector3();
        xRecordVector.row = nRow;
        xRecordVector.col = nCol;
        xRecordVector.data = NFBinarySendLogic.NFToPB(newVar.Vector3Val());

        MemoryStream stream = new MemoryStream();
        Serializer.Serialize<NFMsg.ObjectRecordVector3>(stream, xData);
        SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_RECORD_VECTOR3, stream);
    }