private void EGMI_ACK_REMOVE_ROW(int id, MemoryStream stream) { NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream); NFMsg.ObjectRecordRemove xData = NFMsg.ObjectRecordRemove.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()); if (record != null) { for (int i = 0; i < xData.RemoveRow.Count; i++) { record.Remove(xData.RemoveRow[i]); } } }
public void RequireRemoveRow(NFGUID objectID, string strRecordName, int nRow) { NFMsg.ObjectRecordRemove xData = new NFMsg.ObjectRecordRemove(); xData.PlayerId = mHelpModule.NFToPB(objectID); xData.RecordName = ByteString.CopyFromUtf8(strRecordName); xData.RemoveRow.Add(nRow); mxBody.SetLength(0); xData.WriteTo(mxBody); Debug.Log("send upload record removeRow"); SendMsg((int)NFMsg.EGameMsgID.AckRemoveRow, mxBody); }
public void RequireRemoveRow(NFrame.NFGUID self, string strRecordName, int nRow) { NFMsg.ObjectRecordRemove xData = new NFMsg.ObjectRecordRemove(); xData.player_id = NFBinarySendLogic.NFToPB(self); xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName); xData.remove_row.Add(nRow); MemoryStream stream = new MemoryStream(); Serializer.Serialize <NFMsg.ObjectRecordRemove>(stream, xData); Debug.Log("send upload record removeRow"); SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_REMOVE_ROW, stream); }
public void RequireRemoveRow(NFrame.NFGUID self, string strRecordName, int nRow) { NFMsg.ObjectRecordRemove xData = new NFMsg.ObjectRecordRemove(); xData.player_id = NFNetController.NFToPB(self); xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName); xData.remove_row.Add(nRow); mxBody.SetLength(0); mxSerializer.Serialize(mxBody, xData); Debug.Log("send upload record removeRow"); SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_REMOVE_ROW, mxBody); }
private void EGMI_ACK_REMOVE_ROW(NFMsg.MsgBase xMsg) { NFMsg.ObjectRecordRemove xData = new NFMsg.ObjectRecordRemove(); xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.ObjectRecordRemove)) as NFMsg.ObjectRecordRemove; 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.remove_row.Count; i++) { record.Remove(xData.remove_row[i]); } }
private void OnRemoveRow(UInt16 id, MemoryStream stream) { NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream); NFMsg.ObjectRecordRemove recordData = NFMsg.ObjectRecordRemove.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.remove_row.Count; i++) { record.Remove(recordData.remove_row[i]); } }
private void OnRemoveRow(UInt16 id, MemoryStream stream) { NFMsg.MsgBase xMsg = new NFMsg.MsgBase(); xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream); NFMsg.ObjectRecordRemove recordData = new NFMsg.ObjectRecordRemove(); recordData = Serializer.Deserialize <NFMsg.ObjectRecordRemove>(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.remove_row.Count; i++) { record.Remove(recordData.remove_row[i]); } }
private void EGMI_ACK_REMOVE_ROW(MsgHead head, MemoryStream stream) { NFMsg.MsgBase xMsg = new NFMsg.MsgBase(); xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream); NFMsg.ObjectRecordRemove recordData = new NFMsg.ObjectRecordRemove(); recordData = Serializer.Deserialize <NFMsg.ObjectRecordRemove>(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.remove_row.Count; i++) { record.Remove(recordData.remove_row[i]); } }
private void EGMI_ACK_REMOVE_ROW(MsgHead head, MemoryStream stream) { NFMsg.MsgBase xMsg = new NFMsg.MsgBase(); xMsg = Serializer.Deserialize<NFMsg.MsgBase>(stream); NFMsg.ObjectRecordRemove recordData = new NFMsg.ObjectRecordRemove(); recordData = Serializer.Deserialize<NFMsg.ObjectRecordRemove>(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.remove_row.Count; i++) { record.Remove(recordData.remove_row[i]); } }
public void RequireRemoveRow(NFrame.NFGUID self, string strRecordName, int nRow) { NFMsg.ObjectRecordRemove xData = new NFMsg.ObjectRecordRemove(); xData.player_id = NFBinarySendLogic.NFToPB(self); xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName); xData.remove_row.Add(nRow); MemoryStream stream = new MemoryStream(); Serializer.Serialize<NFMsg.ObjectRecordRemove>(stream, xData); Debug.Log("send upload record removeRow"); SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_REMOVE_ROW, stream); }