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]); } } }
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]); } }