public override bool SetRecordObject(string strRecordName, int nRow, int nCol, NFGUID obj) { NFIRecord record = mRecordManager.GetRecord(strRecordName); if (null != record) { record.SetObject(nRow, nCol, obj); return(true); } return(false); }
private void OnRecordObject(UInt16 id, MemoryStream stream) { NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream); NFMsg.ObjectRecordObject recordData = NFMsg.ObjectRecordObject.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.SetObject(recordData.property_list[i].row, recordData.property_list[i].col, mHelpModule.PBToNF(recordData.property_list[i].data)); } }
private void OnRecordObject(UInt16 id, MemoryStream stream) { NFMsg.MsgBase xMsg = new NFMsg.MsgBase(); xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream); NFMsg.ObjectRecordObject recordData = new NFMsg.ObjectRecordObject(); recordData = Serializer.Deserialize <NFMsg.ObjectRecordObject>(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.SetObject(recordData.property_list[i].row, recordData.property_list[i].col, mHelpModule.PBToNF(recordData.property_list[i].data)); } }