///<inheritdoc/> public PPTuple GetPPTuple(OrtdpWrapper.OrtdpWrapper ortdpInfo) { try { _calculator = _calculator ?? new CatchTheBeatPerformanceCalculator(); _calculator.Beatmap = new BeatmapReader(ortdpInfo.OrtdpBeatmap, (int)ortdpInfo.Beatmap.Mode); if (ortdpInfo.DebugMode) { OutputHelper.Output( $"[osuTools::PrePPCalc::Catch] Current ORTDP Beatmap:{_calculator.Beatmap.OrtdpBeatmap.Artist} - {_calculator.Beatmap.OrtdpBeatmap.Title} [{_calculator.Beatmap.OrtdpBeatmap.Difficulty}]", true, false); } _calculator.ClearCache(); _calculator.Count50 = 0; _calculator.CountGeki = ortdpInfo.Beatmap.HitObjects.Count; _calculator.CountKatu = 0; _calculator.Count100 = 0; _calculator.CountMiss = 0; _calculator.Mods = (uint)ortdpInfo.Mods.ToIntMod(); _calculator.MaxCombo = ortdpInfo.Beatmap.HitObjects.Count; _calculator.Count300 = 0; if (ortdpInfo.DebugMode) { OutputHelper.Output("[osuTools::PrePPCalc::Catch] Calc Completed", true, false); } return(_calculator.GetPerformance()); } catch (Exception ex) { OutputHelper.Output("Error when PreCalc PP."); if (ortdpInfo.DebugMode) { OutputHelper.Output($"[osuTools::PrePPCalc::Taiko] Exception:{ex.Message}"); } return(new PPTuple { FullComboAccuracyPP = -1, FullComboAimPP = -1, FullComboPP = -1, FullComboSpeedPP = -1, MaxAccuracyPP = -1, MaxAimPP = -1, MaxPP = -1, MaxSpeedPP = -1, RealTimeAccuracyPP = -1, RealTimeAimPP = -1, RealTimePP = -1, RealTimeSpeedPP = -1 }); } }
public CTBPPCalculator() { ctb_pp_calc = new CatchTheBeatPerformanceCalculator(); ctb_pp_calc.Time = int.MaxValue; }