private void ParseVideoPackage() { while (this._buffRecvSize > 0) { int usedSize = 0; CSPkg item = CSPkg.New(); if (((item.unpack(ref this._recvBuff, (int)this._buffRecvSize, ref usedSize, 0) != TdrError.ErrorType.TDR_NO_ERROR) || (usedSize <= 0)) || (usedSize > this._buffRecvSize)) { break; } if (item.stPkgHead.dwMsgID == 0x40b) { SCPKG_FRAPBOOTINFO stFrapBootInfo = item.stPkgData.stFrapBootInfo; for (int i = 0; i < stFrapBootInfo.bSpareNum; i++) { SCPKG_FRAPBOOT_SINGLE scpkg_frapboot_single = stFrapBootInfo.astSpareFrap[i]; CSDT_FRAPBOOT_INFO csdt_frapboot_info = CSDT_FRAPBOOT_INFO.New(); int num3 = 0; if ((csdt_frapboot_info.unpack(ref scpkg_frapboot_single.szInfoBuff, scpkg_frapboot_single.wLen, ref num3, 0) == TdrError.ErrorType.TDR_NO_ERROR) && (num3 > 0)) { this._maxFrameNo = csdt_frapboot_info.dwKFrapsNo; this._pkgQueue.Enqueue(csdt_frapboot_info); } } } else { this._pkgQueue.Enqueue(item); } this._buffRecvSize -= (uint)usedSize; Buffer.BlockCopy(this._recvBuff, usedSize, this._recvBuff, 0, (int)this._buffRecvSize); } }
private void ParseVideoPackage() { while (this._buffRecvSize > 0u) { int num = 0; CSPkg cSPkg = CSPkg.New(); if (cSPkg.unpack(ref this._recvBuff, (int)this._buffRecvSize, ref num, 0u) != null || num <= 0 || num > (int)this._buffRecvSize) { break; } if (cSPkg.stPkgHead.dwMsgID == 1035u) { SCPKG_FRAPBOOTINFO stFrapBootInfo = cSPkg.stPkgData.get_stFrapBootInfo(); for (int i = 0; i < (int)stFrapBootInfo.bSpareNum; i++) { SCPKG_FRAPBOOT_SINGLE sCPKG_FRAPBOOT_SINGLE = stFrapBootInfo.astSpareFrap[i]; CSDT_FRAPBOOT_INFO cSDT_FRAPBOOT_INFO = CSDT_FRAPBOOT_INFO.New(); int num2 = 0; if (cSDT_FRAPBOOT_INFO.unpack(ref sCPKG_FRAPBOOT_SINGLE.szInfoBuff, (int)sCPKG_FRAPBOOT_SINGLE.wLen, ref num2, 0u) == null && num2 > 0) { this._maxFrameNo = cSDT_FRAPBOOT_INFO.dwKFrapsNo; this._pkgQueue.Enqueue(cSDT_FRAPBOOT_INFO); } } } else { this._pkgQueue.Enqueue(cSPkg); } this._buffRecvSize -= (uint)num; Buffer.BlockCopy(this._recvBuff, num, this._recvBuff, 0, (int)this._buffRecvSize); } }
private static bool HandleFraqBootSingle(SCPKG_FRAPBOOT_SINGLE fbi) { CSDT_FRAPBOOT_INFO fbid = CSDT_FRAPBOOT_INFO.New(); int usedSize = 0; return(((fbid.unpack(ref fbi.szInfoBuff, fbi.wLen, ref usedSize, 0) == TdrError.ErrorType.TDR_NO_ERROR) && (usedSize > 0)) && Singleton <FrameWindow> .GetInstance().SetFrqWin(fbid)); }
private static bool HandleFraqBootSingle(SCPKG_FRAPBOOT_SINGLE fbi) { CSDT_FRAPBOOT_INFO cSDT_FRAPBOOT_INFO = CSDT_FRAPBOOT_INFO.New(); int num = 0; return(cSDT_FRAPBOOT_INFO.unpack(ref fbi.szInfoBuff, (int)fbi.wLen, ref num, 0u) == null && num > 0 && Singleton <FrameWindow> .GetInstance().SetFrqWin(cSDT_FRAPBOOT_INFO)); }
private CSDT_FRAPBOOT_INFO _FetchFBI(uint frqNo) { uint num = this._FrqNoToWinIdx_(frqNo); CSDT_FRAPBOOT_INFO result = this._receiveWindow[(int)((UIntPtr)num)]; this._receiveWindow[(int)((UIntPtr)num)] = null; return(result); }
private CSDT_FRAPBOOT_INFO _FetchFBI(uint frqNo) { uint index = this._FrqNoToWinIdx_(frqNo); CSDT_FRAPBOOT_INFO csdt_frapboot_info = this._receiveWindow[index]; this._receiveWindow[index] = null; return(csdt_frapboot_info); }
private void RecordReplay(CSDT_FRAPBOOT_INFO fbid) { CSPkg msg = NetworkModule.CreateDefaultCSPKG(0x40a); SCPKG_FRAPBOOT_SINGLE stFrapBootSingle = msg.stPkgData.stFrapBootSingle; int usedSize = 0; if (fbid.pack(ref stFrapBootSingle.szInfoBuff, stFrapBootSingle.szInfoBuff.Length, ref usedSize, 0) == TdrError.ErrorType.TDR_NO_ERROR) { stFrapBootSingle.wLen = (ushort)usedSize; Singleton <GameReplayModule> .instance.RecordMsg(msg); } msg.Release(); }
public static void HandleFraqBootInfo(CSDT_FRAPBOOT_INFO fbid) { if (Singleton <FrameSynchr> .GetInstance().SetKeyFrameIndex(fbid.dwKFrapsNo)) { Singleton <GameReplayModule> .get_instance().SetKFraqNo(fbid.dwKFrapsNo); if (fbid.bNum > 0) { Singleton <GameReplayModule> .get_instance().CacheRecord(fbid); } for (int i = 0; i < (int)fbid.bNum; i++) { CSDT_FRAPBOOT_DETAIL cSDT_FRAPBOOT_DETAIL = fbid.astBootInfo[i]; switch (cSDT_FRAPBOOT_DETAIL.bType) { case 1: FrameWindow.HandleClientClientSyncCommand(fbid.dwKFrapsNo, cSDT_FRAPBOOT_DETAIL.stDetail.get_stCCBoot()); break; case 2: FrameWindow.HandleClientServerSyncCommand(fbid.dwKFrapsNo, cSDT_FRAPBOOT_DETAIL.stDetail.get_stCSBoot()); break; case 3: FrameWindow.HandleClientStateSyncCommand(fbid.dwKFrapsNo, cSDT_FRAPBOOT_DETAIL.stDetail.get_stAcntState()); break; case 4: FrameWindow.HandleAssistChgSyncCommand(fbid.dwKFrapsNo, cSDT_FRAPBOOT_DETAIL.stDetail.get_stAssistState()); break; case 5: FrameWindow.HandleAIChgSyncCommand(fbid.dwKFrapsNo, cSDT_FRAPBOOT_DETAIL.stDetail.get_stAiState()); break; case 6: FrameWindow.HandleGameOverCommand(fbid.dwKFrapsNo, cSDT_FRAPBOOT_DETAIL.stDetail.get_stGameOverNtf()); break; case 7: FrameWindow.HandleGamePauseCommand(fbid.dwKFrapsNo, cSDT_FRAPBOOT_DETAIL.stDetail.get_stPause()); break; } } } fbid.Release(); }
public void CacheRecord(object obj) { if (this.IsReplaying) { return; } CSDT_FRAPBOOT_INFO cSDT_FRAPBOOT_INFO = obj as CSDT_FRAPBOOT_INFO; int num = 0; short num2 = 0; if (cSDT_FRAPBOOT_INFO != null) { if (cSDT_FRAPBOOT_INFO.pack(ref this.streamBuffer, this.streamBuffer.Length, ref num, 0u) == TdrError.ErrorType.TDR_NO_ERROR && num > 0 && num < 32767) { num2 = (short)num; } this.endKFraqNo = 0u; } else { WatchEntryData watchEntry = null; if (Singleton <WatchController> .GetInstance().IsWatching) { watchEntry = Singleton <COBSystem> .GetInstance().GetWatchEntryData(); } CSPkg cSPkg = obj as CSPkg; if (cSPkg.stPkgHead.dwMsgID == 1075u) { this.BeginRecord(cSPkg.stPkgData.stMultGameBeginLoad, watchEntry); } if (cSPkg.pack(ref this.streamBuffer, this.streamBuffer.Length, ref num, 0u) == TdrError.ErrorType.TDR_NO_ERROR && num > 0 && num < 32767) { num2 = -(short)num; } } if (this.recordWriter != null && num2 != 0) { this.recordWriter.Write(num2); this.recordWriter.Write(this.streamBuffer, 0, num); } else { Debug.LogError("Record Msg Failed! usedSize=" + num); } }
public static void HandleFraqBootInfo(CSDT_FRAPBOOT_INFO fbid) { if (Singleton <FrameSynchr> .GetInstance().SetKeyFrameIndex(fbid.dwKFrapsNo)) { Singleton <GameReplayModule> .instance.SetKFraqNo(fbid.dwKFrapsNo); if (fbid.bNum > 0) { Singleton <GameReplayModule> .instance.CacheRecord(fbid); } for (int i = 0; i < fbid.bNum; i++) { CSDT_FRAPBOOT_DETAIL csdt_frapboot_detail = fbid.astBootInfo[i]; switch (csdt_frapboot_detail.bType) { case 1: HandleClientClientSyncCommand(fbid.dwKFrapsNo, csdt_frapboot_detail.stDetail.stCCBoot); break; case 2: HandleClientServerSyncCommand(fbid.dwKFrapsNo, csdt_frapboot_detail.stDetail.stCSBoot); break; case 3: HandleClientStateSyncCommand(fbid.dwKFrapsNo, csdt_frapboot_detail.stDetail.stAcntState); break; case 4: HandleAssistChgSyncCommand(fbid.dwKFrapsNo, csdt_frapboot_detail.stDetail.stAssistState); break; case 5: HandleAIChgSyncCommand(fbid.dwKFrapsNo, csdt_frapboot_detail.stDetail.stAiState); break; case 6: HandleGameOverCommand(fbid.dwKFrapsNo, csdt_frapboot_detail.stDetail.stGameOverNtf); break; } } } fbid.Release(); }
private void HandlePackage() { uint curFrameNum = Singleton <FrameSynchr> .GetInstance().CurFrameNum; while (!MonoSingleton <GameLoader> .GetInstance().isLoadStart&& this._pkgQueue.get_Count() > 0) { object obj = this._pkgQueue.Peek(); CSDT_FRAPBOOT_INFO cSDT_FRAPBOOT_INFO = obj as CSDT_FRAPBOOT_INFO; if (cSDT_FRAPBOOT_INFO != null) { if (cSDT_FRAPBOOT_INFO.dwKFrapsNo > this.EndFrameNo || cSDT_FRAPBOOT_INFO.dwKFrapsNo <= curFrameNum || cSDT_FRAPBOOT_INFO.dwKFrapsNo > curFrameNum + 60u) { break; } this._pkgQueue.Dequeue(); FrameWindow.HandleFraqBootInfo(cSDT_FRAPBOOT_INFO); } else { this._pkgQueue.Dequeue(); CSPkg cSPkg = obj as CSPkg; NetMsgDelegate msgHandler = Singleton <NetworkModule> .GetInstance().GetMsgHandler(cSPkg.stPkgHead.dwMsgID); if (msgHandler != null) { try { Singleton <GameReplayModule> .instance.CacheRecord(cSPkg); msgHandler(cSPkg); } catch (Exception var_5_BA) { } } } } if (this.SpeedRate > 1 && this.EndFrameNo < curFrameNum + 120u) { this.SpeedRate = 1; } }
private void HandlePackage() { uint curFrameNum = Singleton <FrameSynchr> .GetInstance().CurFrameNum; while (!MonoSingleton <GameLoader> .GetInstance().isLoadStart&& (this._pkgQueue.Count > 0)) { object obj2 = this._pkgQueue.Peek(); CSDT_FRAPBOOT_INFO fbid = obj2 as CSDT_FRAPBOOT_INFO; if (fbid != null) { if (((fbid.dwKFrapsNo > this.EndFrameNo) || (fbid.dwKFrapsNo <= curFrameNum)) || (fbid.dwKFrapsNo > (curFrameNum + 60))) { break; } this._pkgQueue.Dequeue(); FrameWindow.HandleFraqBootInfo(fbid); } else { this._pkgQueue.Dequeue(); CSPkg msg = obj2 as CSPkg; NetMsgDelegate msgHandler = Singleton <NetworkModule> .GetInstance().GetMsgHandler(msg.stPkgHead.dwMsgID); if (msgHandler != null) { try { msgHandler(msg); continue; } catch (Exception) { continue; } } } } if ((this.SpeedRate > 1) && (this.EndFrameNo < (curFrameNum + 120))) { this.SpeedRate = 1; } }
public bool FlushRecord() { bool flag; if (!this.HasRecord) { return(false); } try { if (this.endKFraqNo > 0) { CSDT_FRAPBOOT_INFO csdt_frapboot_info = new CSDT_FRAPBOOT_INFO { dwKFrapsNo = this.endKFraqNo, bNum = 0 }; int usedSize = 0; if (((csdt_frapboot_info.pack(ref this.streamBuffer, this.streamBuffer.Length, ref usedSize, 0) == TdrError.ErrorType.TDR_NO_ERROR) && (usedSize > 0)) && (usedSize < 0x7fff)) { this.recordWriter.Write((short)usedSize); this.recordWriter.Write(this.streamBuffer, 0, usedSize); } } this.streamPath = string.Format("{0}/{1}.abc", ReplayFolder, DateTime.Now.ToString("yyyyMMdd_HHmmss")); FileStream stream = new FileStream(this.streamPath, FileMode.Create, FileAccess.Write); this.recordStream.WriteTo(stream); stream.Flush(); stream.Close(); flag = true; } catch { flag = false; if (File.Exists(this.streamPath)) { File.Delete(this.streamPath); } } this.ClearRecord(); return(flag); }
public bool FlushRecord() { if (!this.HasRecord) { return(false); } bool result; try { if (this.endKFraqNo > 0u) { CSDT_FRAPBOOT_INFO cSDT_FRAPBOOT_INFO = new CSDT_FRAPBOOT_INFO(); cSDT_FRAPBOOT_INFO.dwKFrapsNo = this.endKFraqNo; cSDT_FRAPBOOT_INFO.bNum = 0; int num = 0; if (cSDT_FRAPBOOT_INFO.pack(ref this.streamBuffer, this.streamBuffer.Length, ref num, 0u) == TdrError.ErrorType.TDR_NO_ERROR && num > 0 && num < 32767) { this.recordWriter.Write((short)num); this.recordWriter.Write(this.streamBuffer, 0, num); } } this.streamPath = string.Format("{0}/{1}.abc", GameReplayModule.ReplayFolder, DateTime.get_Now().ToString("yyyyMMdd_HHmmss")); FileStream fileStream = new FileStream(this.streamPath, 2, 2); fileStream.Write(this.recordStream.GetBuffer(), 0, (int)this.recordStream.get_Position()); fileStream.Flush(); fileStream.Close(); result = true; } catch { result = false; if (File.Exists(this.streamPath)) { File.Delete(this.streamPath); } } this.ClearRecord(); return(result); }
private bool SetFrqWin(CSDT_FRAPBOOT_INFO fbid) { if (this._aliveFrameCount != Time.frameCount) { this.RefreshTimeout(); } bool flag = false; uint dwKFrapsNo = fbid.dwKFrapsNo; if (dwKFrapsNo > this._maxFrqNo) { this._maxFrqNo = dwKFrapsNo; } if ((this._begFrqNo <= dwKFrapsNo) && (dwKFrapsNo < (this._begFrqNo + 900))) { this._receiveWindow[this._FrqNoToWinIdx_(dwKFrapsNo)] = fbid; if (Singleton <FrameSynchr> .GetInstance().bActive) { CSDT_FRAPBOOT_INFO csdt_frapboot_info = null; while ((csdt_frapboot_info = this._FetchFBI(this._begFrqNo)) != null) { if ((++this._begFrqNo % 900) == 0) { this._basFrqNo = this._begFrqNo; } this.HandleFraqBootInfo(csdt_frapboot_info); csdt_frapboot_info.Release(); flag = true; } } return(flag); } if (dwKFrapsNo > this._begFrqNo) { MonoSingleton <Reconnection> .GetInstance().RequestRelaySyncCacheFrames(false); } return(flag); }
public void CacheRecord(object obj) { if (!Singleton <WatchController> .GetInstance().IsWatching) { CSDT_FRAPBOOT_INFO csdt_frapboot_info = obj as CSDT_FRAPBOOT_INFO; int usedSize = 0; short num2 = 0; if (csdt_frapboot_info != null) { if (((csdt_frapboot_info.pack(ref this.streamBuffer, this.streamBuffer.Length, ref usedSize, 0) == TdrError.ErrorType.TDR_NO_ERROR) && (usedSize > 0)) && (usedSize < 0x7fff)) { num2 = (short)usedSize; } this.endKFraqNo = 0; } else { CSPkg pkg = obj as CSPkg; if (pkg.stPkgHead.dwMsgID == 0x433) { this.BeginRecord(pkg.stPkgData.stMultGameBeginLoad); } if (((pkg.pack(ref this.streamBuffer, this.streamBuffer.Length, ref usedSize, 0) == TdrError.ErrorType.TDR_NO_ERROR) && (usedSize > 0)) && (usedSize < 0x7fff)) { num2 = (short)-usedSize; } } if ((this.recordWriter != null) && (num2 != 0)) { this.recordWriter.Write(num2); this.recordWriter.Write(this.streamBuffer, 0, usedSize); } else { Debug.LogError("Record Msg Failed! usedSize=" + usedSize); } } }
private void HandleFraqBootInfo(CSDT_FRAPBOOT_INFO fbid) { this.RecordPing(fbid, false); if (GameSettings.enableReplay) { this.RecordReplay(fbid); } if (Singleton <FrameSynchr> .GetInstance().SetKeyFrameIndex(fbid.dwKFrapsNo)) { for (int i = 0; i < fbid.bNum; i++) { CSDT_FRAPBOOT_DETAIL csdt_frapboot_detail = fbid.astBootInfo[i]; switch (csdt_frapboot_detail.bType) { case 1: this.HandleClientClientSyncCommand(fbid.dwKFrapsNo, csdt_frapboot_detail.stDetail.stCCBoot); break; case 2: this.HandleClientServerSyncCommand(fbid.dwKFrapsNo, csdt_frapboot_detail.stDetail.stCSBoot); break; case 3: this.HandleClientStateSyncCommand(fbid.dwKFrapsNo, csdt_frapboot_detail.stDetail.stAcntState); break; case 4: this.HandleAssistChgSyncCommand(fbid.dwKFrapsNo, csdt_frapboot_detail.stDetail.stAssistState); break; case 5: this.HandleAIChgSyncCommand(fbid.dwKFrapsNo, csdt_frapboot_detail.stDetail.stAiState); break; } } } }
private bool SetFrqWin(CSDT_FRAPBOOT_INFO fbid) { if (this._aliveFrameCount != Time.frameCount) { this.RefreshTimeout(); } bool result = false; uint dwKFrapsNo = fbid.dwKFrapsNo; if (dwKFrapsNo > this._maxFrqNo) { this._maxFrqNo = dwKFrapsNo; } if (this._begFrqNo <= dwKFrapsNo && dwKFrapsNo < this._begFrqNo + 900u) { this._receiveWindow[(int)((UIntPtr)this._FrqNoToWinIdx_(dwKFrapsNo))] = fbid; if (Singleton <FrameSynchr> .GetInstance().bActive) { CSDT_FRAPBOOT_INFO fbid2; while ((fbid2 = this._FetchFBI(this._begFrqNo)) != null) { if ((this._begFrqNo += 1u) % 900u == 0u) { this._basFrqNo = this._begFrqNo; } FrameWindow.HandleFraqBootInfo(fbid2); result = true; } } } else if (dwKFrapsNo > this._begFrqNo) { MonoSingleton <Reconnection> .GetInstance().RequestRelaySyncCacheFrames(false); } return(result); }
private bool LoadMsg(out CSPkg replayMsg, out CSDT_FRAPBOOT_INFO fraqBoot) { replayMsg = null; fraqBoot = null; try { if (this.isReplayAbc) { if (this.replayStream == null || this.replayStream.get_Position() >= this.replayStream.get_Length()) { bool result = false; return(result); } short num = this.replayReader.ReadInt16(); bool flag = num > 0; num = Math.Abs(num); if (this.replayStream.get_Position() + (long)num > this.replayStream.get_Length()) { bool result = false; return(result); } int num2 = this.replayReader.Read(this.streamBuffer, 0, (int)num); if (num2 != (int)num) { bool result = false; return(result); } int num3 = 0; if (flag) { fraqBoot = CSDT_FRAPBOOT_INFO.New(); if (fraqBoot.unpack(ref this.streamBuffer, (int)num, ref num3, 0u) != null) { bool result = false; return(result); } } else { replayMsg = CSPkg.New(); if (replayMsg.unpack(ref this.streamBuffer, (int)num, ref num3, 0u) != null) { bool result = false; return(result); } } } else { bool result; if (this.bufferUsedSize <= 0 && (this.replayStream == null || this.replayStream.get_Position() >= this.replayStream.get_Length())) { result = false; return(result); } if (this.replayStream != null && this.replayStream.get_Position() < this.replayStream.get_Length()) { this.bufferUsedSize += this.replayReader.Read(this.streamBuffer, this.bufferUsedSize, this.streamBuffer.Length - this.bufferUsedSize); } replayMsg = CSPkg.New(); int num4 = 0; if (replayMsg.unpack(ref this.streamBuffer, this.bufferUsedSize, ref num4, 0u) == null && 0 < num4 && num4 <= this.bufferUsedSize) { this.bufferUsedSize -= num4; Buffer.BlockCopy(this.streamBuffer, num4, this.streamBuffer, 0, this.bufferUsedSize); result = true; return(result); } result = false; return(result); } } catch { bool result = false; return(result); } if (this.replayStream.get_Position() >= this.replayStream.get_Length()) { this.ClearReplay(); } return(true); }
private bool LoadMsg(out CSPkg replayMsg, out CSDT_FRAPBOOT_INFO fraqBoot) { replayMsg = null; fraqBoot = null; try { if (this.isReplayAbc) { if ((this.replayStream == null) || (this.replayStream.Position >= this.replayStream.Length)) { return(false); } short num = this.replayReader.ReadInt16(); bool flag = num > 0; num = Math.Abs(num); if ((this.replayStream.Position + num) > this.replayStream.Length) { return(false); } if (this.replayReader.Read(this.streamBuffer, 0, num) != num) { return(false); } int usedSize = 0; if (flag) { fraqBoot = CSDT_FRAPBOOT_INFO.New(); if (fraqBoot.unpack(ref this.streamBuffer, num, ref usedSize, 0) != TdrError.ErrorType.TDR_NO_ERROR) { return(false); } } else { replayMsg = CSPkg.New(); if (replayMsg.unpack(ref this.streamBuffer, num, ref usedSize, 0) != TdrError.ErrorType.TDR_NO_ERROR) { return(false); } } } else { if ((this.bufferUsedSize > 0) || ((this.replayStream != null) && (this.replayStream.Position < this.replayStream.Length))) { if ((this.replayStream != null) && (this.replayStream.Position < this.replayStream.Length)) { this.bufferUsedSize += this.replayReader.Read(this.streamBuffer, this.bufferUsedSize, this.streamBuffer.Length - this.bufferUsedSize); } replayMsg = CSPkg.New(); int num4 = 0; if (((replayMsg.unpack(ref this.streamBuffer, this.bufferUsedSize, ref num4, 0) == TdrError.ErrorType.TDR_NO_ERROR) && (0 < num4)) && (num4 <= this.bufferUsedSize)) { this.bufferUsedSize -= num4; Buffer.BlockCopy(this.streamBuffer, num4, this.streamBuffer, 0, this.bufferUsedSize); return(true); } } return(false); } } catch { return(false); } if (this.replayStream.Position >= this.replayStream.Length) { this.ClearReplay(); } return(true); }
private bool LoadMsg(out CSPkg replayMsg, out CSDT_FRAPBOOT_INFO fraqBoot) { replayMsg = null; fraqBoot = null; try { if (this.isReplayAbc) { if (this.replayStream == null || this.replayStream.get_Position() >= this.replayStream.get_Length()) { bool flag = false; bool result = flag; return(result); } short num = this.replayReader.ReadInt16(); bool flag2 = num > 0; num = Math.Abs(num); if (this.replayStream.get_Position() + (long)num > this.replayStream.get_Length()) { bool flag3 = false; bool result = flag3; return(result); } int num2 = this.replayReader.Read(this.streamBuffer, 0, (int)num); if (num2 != (int)num) { bool flag4 = false; bool result = flag4; return(result); } int num3 = 0; if (flag2) { fraqBoot = CSDT_FRAPBOOT_INFO.New(); if (fraqBoot.unpack(ref this.streamBuffer, (int)num, ref num3, 0u) != TdrError.ErrorType.TDR_NO_ERROR) { bool flag5 = false; bool result = flag5; return(result); } } else { replayMsg = CSPkg.New(); if (replayMsg.unpack(ref this.streamBuffer, (int)num, ref num3, 0u) != TdrError.ErrorType.TDR_NO_ERROR) { bool flag6 = false; bool result = flag6; return(result); } } } else { bool result; bool flag7; if (this.bufferUsedSize <= 0 && (this.replayStream == null || this.replayStream.get_Position() >= this.replayStream.get_Length())) { flag7 = false; result = flag7; return(result); } if (this.replayStream != null && this.replayStream.get_Position() < this.replayStream.get_Length()) { this.bufferUsedSize += this.replayReader.Read(this.streamBuffer, this.bufferUsedSize, this.streamBuffer.Length - this.bufferUsedSize); } replayMsg = CSPkg.New(); int num4 = 0; if (replayMsg.unpack(ref this.streamBuffer, this.bufferUsedSize, ref num4, 0u) == TdrError.ErrorType.TDR_NO_ERROR && 0 < num4 && num4 <= this.bufferUsedSize) { this.bufferUsedSize -= num4; Buffer.BlockCopy(this.streamBuffer, num4, this.streamBuffer, 0, this.bufferUsedSize); flag7 = true; result = flag7; return(result); } Singleton <CUIManager> .GetInstance().OpenTips(Singleton <CTextManager> .GetInstance().GetText("Download_VersionNotMatch"), false, 1.5f, null, new object[0]); flag7 = false; result = flag7; return(result); } } catch { Singleton <CUIManager> .GetInstance().OpenTips(Singleton <CTextManager> .GetInstance().GetText("Download_VersionNotMatch"), false, 1.5f, null, new object[0]); bool flag8 = false; bool result = flag8; return(result); } if (this.replayStream.get_Position() >= this.replayStream.get_Length()) { this.ClearReplay(); } return(true); }
private void RecordPing(CSDT_FRAPBOOT_INFO fbid, bool recvOrHand) { }