Esempio n. 1
0
        public override bool SetRecordVector2(string strRecordName, int nRow, int nCol, NFVector2 obj)
        {
            NFIRecord record = mRecordManager.GetRecord(strRecordName);

            if (null != record)
            {
                record.SetVector2(nRow, nCol, obj);
                return(true);
            }

            return(false);
        }
Esempio n. 2
0
        private void OnRecordVector2(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.ObjectRecordVector2 recordData = NFMsg.ObjectRecordVector2.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.SetVector2(recordData.property_list[i].row, recordData.property_list[i].col, mHelpModule.PBToNF(recordData.property_list[i].data));
            }
        }
Esempio n. 3
0
        private void OnRecordVector2(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.ObjectRecordVector2 recordData = new NFMsg.ObjectRecordVector2();
            recordData = Serializer.Deserialize <NFMsg.ObjectRecordVector2>(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.SetVector2(recordData.property_list[i].row, recordData.property_list[i].col, mHelpModule.PBToNF(recordData.property_list[i].data));
            }
        }