public override bool SetRecordFloat(string strRecordName, int nRow, int nCol, double fValue) { NFIRecord record = mRecordManager.GetRecord(strRecordName); if (null != record) { record.SetFloat(nRow, nCol, fValue); return(true); } return(false); }
private void OnRecordFloat(UInt16 id, MemoryStream stream) { NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream); NFMsg.ObjectRecordFloat recordData = NFMsg.ObjectRecordFloat.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.SetFloat(recordData.property_list[i].row, recordData.property_list[i].col, (float)recordData.property_list[i].data); } }
private void OnRecordFloat(UInt16 id, MemoryStream stream) { NFMsg.MsgBase xMsg = new NFMsg.MsgBase(); xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream); NFMsg.ObjectRecordFloat recordData = new NFMsg.ObjectRecordFloat(); recordData = Serializer.Deserialize <NFMsg.ObjectRecordFloat>(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.SetFloat(recordData.property_list[i].row, recordData.property_list[i].col, (float)recordData.property_list[i].data); } }