public override bool SetRecordFloat(string strRecordName, int nRow, int nCol, float fValue) { NFIRecord record = mRecordManager.GetRecord(strRecordName); if (null != record) { record.SetFloat(nRow, nCol, fValue); return(true); } return(false); }
private void EGMI_ACK_RECORD_FLOAT(NFMsg.MsgBase xMsg) { NFMsg.ObjectRecordFloat xData = new NFMsg.ObjectRecordFloat(); xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.ObjectRecordFloat)) as NFMsg.ObjectRecordFloat; NFIObject go = NFCKernelModule.Instance.GetObject(NFNetController.PBToNF(xData.player_id)); NFIRecordManager recordManager = go.GetRecordManager(); NFIRecord record = recordManager.GetRecord(System.Text.Encoding.Default.GetString(xData.record_name)); for (int i = 0; i < xData.property_list.Count; i++) { record.SetFloat(xData.property_list[i].row, xData.property_list[i].col, (float)xData.property_list[i].data); } }
private void EGMI_ACK_RECORD_FLOAT(int id, MemoryStream stream) { NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream); NFMsg.ObjectRecordFloat xData = NFMsg.ObjectRecordFloat.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.RecordName.ToStringUtf8()); for (int i = 0; i < xData.PropertyList.Count; i++) { record.SetFloat(xData.PropertyList[i].Row, xData.PropertyList[i].Col, (float)xData.PropertyList[i].Data); } }