public void RequireRecordVector2(NFGUID objectID, string strRecordName, int nRow, int nCol, NFDataList.TData newVar) { NFMsg.ObjectRecordVector2 xData = new NFMsg.ObjectRecordVector2(); xData.PlayerId = mHelpModule.NFToPB(objectID); xData.RecordName = ByteString.CopyFromUtf8(strRecordName); NFMsg.RecordVector2 xRecordVector = new NFMsg.RecordVector2(); xRecordVector.Row = nRow; xRecordVector.Col = nCol; xRecordVector.Data = mHelpModule.NFToPB(newVar.Vector2Val()); mxBody.SetLength(0); xData.WriteTo(mxBody); SendMsg((int)NFMsg.EGameMsgID.AckRecordVector2, mxBody); }
public void RequireRecordVector2(NFrame.NFGUID self, string strRecordName, int nRow, int nCol, NFIDataList.TData newVar) { NFMsg.ObjectRecordVector2 xData = new NFMsg.ObjectRecordVector2(); xData.player_id = NFBinarySendLogic.NFToPB(self); xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName); NFMsg.RecordVector2 xRecordVector = new NFMsg.RecordVector2(); xRecordVector.row = nRow; xRecordVector.col = nCol; xRecordVector.data = NFBinarySendLogic.NFToPB(newVar.Vector2Val()); MemoryStream stream = new MemoryStream(); Serializer.Serialize <NFMsg.ObjectRecordVector2>(stream, xData); SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_RECORD_VECTOR2, stream); }
public void RequireRecordVector2(NFrame.NFGUID self, string strRecordName, int nRow, int nCol, NFDataList.TData newVar) { NFMsg.ObjectRecordVector2 xData = new NFMsg.ObjectRecordVector2(); xData.player_id = NFNetController.NFToPB(self); xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName); NFMsg.RecordVector2 xRecordVector = new NFMsg.RecordVector2(); xRecordVector.row = nRow; xRecordVector.col = nCol; xRecordVector.data = NFNetController.NFToPB(newVar.Vector2Val()); mxBody.SetLength(0); mxSerializer.Serialize(mxBody, xData); SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_RECORD_VECTOR2, mxBody); }
private void OnRecordVector2(UInt16 id, MemoryStream stream) { NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream); NFMsg.ObjectRecordVector2 recordData = NFMsg.ObjectRecordVector2.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.SetVector2(recordData.property_list[i].row, recordData.property_list[i].col, mHelpModule.PBToNF(recordData.property_list[i].data)); } }
private void OnRecordVector2(UInt16 id, MemoryStream stream) { NFMsg.MsgBase xMsg = new NFMsg.MsgBase(); xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream); NFMsg.ObjectRecordVector2 recordData = new NFMsg.ObjectRecordVector2(); recordData = Serializer.Deserialize <NFMsg.ObjectRecordVector2>(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.SetVector2(recordData.property_list[i].row, recordData.property_list[i].col, mHelpModule.PBToNF(recordData.property_list[i].data)); } }
public void RequireRecordVector2(NFrame.NFGUID self, string strRecordName, int nRow, int nCol, NFIDataList.TData newVar) { NFMsg.ObjectRecordVector2 xData = new NFMsg.ObjectRecordVector2(); xData.player_id = NFBinarySendLogic.NFToPB(self); xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName); NFMsg.RecordVector2 xRecordVector = new NFMsg.RecordVector2(); xRecordVector.row = nRow; xRecordVector.col = nCol; xRecordVector.data = NFBinarySendLogic.NFToPB(newVar.Vector2Val()); MemoryStream stream = new MemoryStream(); Serializer.Serialize<NFMsg.ObjectRecordVector2>(stream, xData); SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_RECORD_VECTOR2, stream); }