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 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); } }
private void EGMI_ACK_RECORD_FLOAT(MsgHead head, 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 = NFCKernel.Instance.GetObject(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); } }
public void RequireRecordFloat(NFGUID objectID, string strRecordName, int nRow, int nCol, NFDataList.TData newVar) { NFMsg.ObjectRecordFloat xData = new NFMsg.ObjectRecordFloat(); xData.PlayerId = mHelpModule.NFToPB(objectID); xData.RecordName = ByteString.CopyFromUtf8(strRecordName); NFMsg.RecordFloat xRecordFloat = new NFMsg.RecordFloat(); xData.PropertyList.Add(xRecordFloat); xRecordFloat.Row = nRow; xRecordFloat.Col = nCol; xRecordFloat.Data = (float)newVar.FloatVal(); mxBody.SetLength(0); xData.WriteTo(mxBody); Debug.Log("send upload record float"); SendMsg((int)NFMsg.EGameMsgID.AckRecordFloat, mxBody); }
public void RequireRecordFloat(NFrame.NFGUID self, string strRecordName, int nRow, int nCol, NFIDataList.TData newVar) { NFMsg.ObjectRecordFloat xData = new NFMsg.ObjectRecordFloat(); xData.player_id = NFBinarySendLogic.NFToPB(self); xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName); NFMsg.RecordFloat xRecordFloat = new NFMsg.RecordFloat(); xData.property_list.Add(xRecordFloat); xRecordFloat.row = nRow; xRecordFloat.col = nCol; xRecordFloat.data = (float)newVar.FloatVal(); MemoryStream stream = new MemoryStream(); Serializer.Serialize <NFMsg.ObjectRecordFloat>(stream, xData); Debug.Log("send upload record float"); SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_RECORD_FLOAT, stream); }
public void RequireRecordFloat(NFrame.NFGUID self, string strRecordName, int nRow, int nCol, NFDataList.TData newVar) { NFMsg.ObjectRecordFloat xData = new NFMsg.ObjectRecordFloat(); xData.player_id = NFNetController.NFToPB(self); xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName); NFMsg.RecordFloat xRecordFloat = new NFMsg.RecordFloat(); xData.property_list.Add(xRecordFloat); xRecordFloat.row = nRow; xRecordFloat.col = nCol; xRecordFloat.data = (float)newVar.FloatVal(); mxBody.SetLength(0); mxSerializer.Serialize(mxBody, xData); Debug.Log("send upload record float"); SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_RECORD_FLOAT, mxBody); }
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); } }
private void EGMI_ACK_RECORD_FLOAT(MsgHead head, 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 = NFCKernelModule.Instance.GetObject(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); } }
public void RequireRecordFloat(NFrame.NFGUID self, string strRecordName, int nRow, int nCol, NFIDataList.TData newVar) { NFMsg.ObjectRecordFloat xData = new NFMsg.ObjectRecordFloat(); xData.player_id = NFBinarySendLogic.NFToPB(self); xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName); NFMsg.RecordFloat xRecordFloat = new NFMsg.RecordFloat(); xData.property_list.Add(xRecordFloat); xRecordFloat.row = nRow; xRecordFloat.col = nCol; xRecordFloat.data = (float)newVar.FloatVal(); MemoryStream stream = new MemoryStream(); Serializer.Serialize<NFMsg.ObjectRecordFloat>(stream, xData); Debug.Log("send upload record float"); SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_RECORD_FLOAT, stream); }