1
0
Fork 0
mirror of https://github.com/ppy/osu-tools.git synced 2025-06-11 02:13:33 +09:00

Fix Use explicit type

This commit is contained in:
StanR 2025-01-31 20:58:38 +05:00
parent 5cf0a6074e
commit 5c438d2a92
23 changed files with 81 additions and 81 deletions

View file

@ -71,7 +71,7 @@ namespace PerformanceCalculator.Difficulty
{
var document = new Document();
foreach (var error in resultSet.Errors)
foreach (string error in resultSet.Errors)
document.Children.Add(new Span(error), "\n");
if (resultSet.Errors.Count > 0)
document.Children.Add("\n");

View file

@ -67,7 +67,7 @@ namespace PerformanceCalculator.Difficulty
{
var document = new Document();
foreach (var error in resultSet.Errors)
foreach (string error in resultSet.Errors)
document.Children.Add(new Span(error), "\n");
if (resultSet.Errors.Count > 0)
document.Children.Add("\n");
@ -85,7 +85,7 @@ namespace PerformanceCalculator.Difficulty
// Headers
if (firstResult)
{
foreach (var column in new[] { "Beatmap", "Mods", "Accuracy score", "Combo score", "Bonus score ratio", "Mod multiplier" })
foreach (string column in new[] { "Beatmap", "Mods", "Accuracy score", "Combo score", "Bonus score ratio", "Mod multiplier" })
{
grid.Columns.Add(GridLength.Auto);
grid.Children.Add(new Cell(column));
@ -121,7 +121,7 @@ namespace PerformanceCalculator.Difficulty
var attributes = simulator.Simulate(beatmap, playableBeatmap);
var conversionInfo = LegacyBeatmapConversionDifficultyInfo.FromBeatmap(playableBeatmap);
var modMultiplier = simulator.GetLegacyScoreMultiplier(mods, conversionInfo);
double modMultiplier = simulator.GetLegacyScoreMultiplier(mods, conversionInfo);
return new Result
{
@ -142,7 +142,7 @@ namespace PerformanceCalculator.Difficulty
var availableMods = ruleset.CreateAllMods().ToList();
foreach (var modString in Mods)
foreach (string modString in Mods)
{
Mod newMod = availableMods.FirstOrDefault(m => string.Equals(m.Acronym, modString, StringComparison.OrdinalIgnoreCase));
if (newMod == null)

View file

@ -97,7 +97,7 @@ namespace PerformanceCalculator.Difficulty
var availableMods = ruleset.CreateAllMods().ToList();
var mods = new List<Mod>();
foreach (var modString in Mods)
foreach (string modString in Mods)
{
Mod newMod = availableMods.FirstOrDefault(m => string.Equals(m.Acronym, modString, StringComparison.OrdinalIgnoreCase));
if (newMod == null)

View file

@ -67,7 +67,7 @@ namespace PerformanceCalculator.Difficulty
foreach (var (settingsSource, propertyInfo) in sourceProperties)
{
var bindable = propertyInfo.GetValue(mod);
object? bindable = propertyInfo.GetValue(mod);
Debug.Assert(bindable != null);

View file

@ -33,7 +33,7 @@ namespace PerformanceCalculator.Leaderboard
public override void Execute()
{
var rulesetApiName = LegacyHelper.GetRulesetShortNameFromId(Ruleset ?? 0);
string rulesetApiName = LegacyHelper.GetRulesetShortNameFromId(Ruleset ?? 0);
var leaderboard = GetJsonFromApi<GetTopUsersResponse>($"rankings/{rulesetApiName}/performance?cursor[page]={LeaderboardPage - 1}");
var calculatedPlayers = new List<LeaderboardPlayerInfo>();
@ -78,7 +78,7 @@ namespace PerformanceCalculator.Leaderboard
double nonBonusLivePP = liveOrdered.Sum(play => Math.Pow(0.95, index++) * play);
//todo: implement properly. this is pretty damn wrong.
var playcountBonusPP = (totalLivePP - nonBonusLivePP);
double playcountBonusPP = (totalLivePP - nonBonusLivePP);
totalLocalPP += playcountBonusPP;
calculatedPlayers.Add(new LeaderboardPlayerInfo
@ -94,7 +94,7 @@ namespace PerformanceCalculator.Leaderboard
if (OutputJson)
{
var json = JsonConvert.SerializeObject(calculatedPlayers);
string json = JsonConvert.SerializeObject(calculatedPlayers);
Console.Write(json);
}

View file

@ -118,9 +118,9 @@ namespace PerformanceCalculator
{
ConsoleRenderer.RenderDocumentToText(document, new TextRenderTarget(writer), new Rect(0, 0, 250, Size.Infinity));
var str = writer.GetStringBuilder().ToString();
string str = writer.GetStringBuilder().ToString();
var lines = str.Split('\n');
string[] lines = str.Split('\n');
for (int i = 0; i < lines.Length; i++)
lines[i] = lines[i].TrimEnd();
str = string.Join('\n', lines);
@ -143,7 +143,7 @@ namespace PerformanceCalculator
var mods = new List<Mod>();
foreach (var acronym in acronyms)
foreach (string acronym in acronyms)
{
APIMod mod = new APIMod { Acronym = acronym };

View file

@ -58,7 +58,7 @@ namespace PerformanceCalculator
return new ProcessorWorkingBeatmap(fileOrId);
}
if (!int.TryParse(fileOrId, out var beatmapId))
if (!int.TryParse(fileOrId, out int beatmapId))
throw new ArgumentException("Could not parse provided beatmap ID.");
string cachePath = Path.Combine("cache", $"{beatmapId}.osu");

View file

@ -32,7 +32,7 @@ namespace PerformanceCalculator.Profile
var displayPlays = new List<UserPlayInfo>();
var ruleset = LegacyHelper.GetRulesetFromLegacyID(Ruleset ?? 0);
var rulesetApiName = LegacyHelper.GetRulesetShortNameFromId(Ruleset ?? 0);
string rulesetApiName = LegacyHelper.GetRulesetShortNameFromId(Ruleset ?? 0);
Console.WriteLine("Getting user data...");
var userData = GetJsonFromApi<APIUser>($"users/{ProfileName}/{ruleset.ShortName}");
@ -81,13 +81,13 @@ namespace PerformanceCalculator.Profile
double nonBonusLivePP = liveOrdered.Sum(play => Math.Pow(0.95, index++) * play.LivePP);
//todo: implement properly. this is pretty damn wrong.
var playcountBonusPP = (totalLivePP - nonBonusLivePP);
double playcountBonusPP = (totalLivePP - nonBonusLivePP);
totalLocalPP += playcountBonusPP;
double totalDiffPP = totalLocalPP - totalLivePP;
if (OutputJson)
{
var json = JsonConvert.SerializeObject(new
string json = JsonConvert.SerializeObject(new
{
Username = userData.Username,
LivePp = totalLivePP,

View file

@ -40,7 +40,7 @@ namespace PerformanceCalculator.Simulate
private static Dictionary<HitResult, int> generateHitResults(IBeatmap beatmap, double accuracy, int countMiss, int? countMeh, int? countGood)
{
var maxCombo = beatmap.GetMaxCombo();
int maxCombo = beatmap.GetMaxCombo();
int maxTinyDroplets = beatmap.HitObjects.OfType<JuiceStream>().Sum(s => s.NestedHitObjects.OfType<TinyDroplet>().Count());
int maxDroplets = beatmap.HitObjects.OfType<JuiceStream>().Sum(s => s.NestedHitObjects.OfType<Droplet>().Count()) - maxTinyDroplets;
int maxFruits = beatmap.HitObjects.Sum(h => h is Fruit ? 1 : (h as JuiceStream)?.NestedHitObjects.Count(n => n is Fruit) ?? 0);

View file

@ -41,7 +41,7 @@ namespace PerformanceCalculator.Simulate
private static Dictionary<HitResult, int> generateHitResults(IBeatmap beatmap, double accuracy, int countMiss, int? countMeh, int? countOk, int? countGood, int? countGreat)
{
// One judgement per normal note. Two judgements per hold note (head + tail).
var totalHits = beatmap.HitObjects.Count + beatmap.HitObjects.Count(ho => ho is HoldNote);
int totalHits = beatmap.HitObjects.Count + beatmap.HitObjects.Count(ho => ho is HoldNote);
if (countMeh != null || countOk != null || countGood != null || countGreat != null)
{
@ -59,7 +59,7 @@ namespace PerformanceCalculator.Simulate
}
// Let Great=Perfect=6, Good=4, Ok=2, Meh=1, Miss=0. The total should be this.
var targetTotal = (int)Math.Round(accuracy * totalHits * 6);
int targetTotal = (int)Math.Round(accuracy * totalHits * 6);
// Start by assuming every non miss is a meh
// This is how much increase is needed by the rest

View file

@ -62,7 +62,7 @@ namespace PerformanceCalculator.Simulate
{
int countGreat;
var totalResultCount = beatmap.HitObjects.Count;
int totalResultCount = beatmap.HitObjects.Count;
if (countMeh != null || countGood != null)
{
@ -153,17 +153,17 @@ namespace PerformanceCalculator.Simulate
protected override double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics)
{
var countGreat = statistics[HitResult.Great];
var countGood = statistics[HitResult.Ok];
var countMeh = statistics[HitResult.Meh];
var countMiss = statistics[HitResult.Miss];
int countGreat = statistics[HitResult.Great];
int countGood = statistics[HitResult.Ok];
int countMeh = statistics[HitResult.Meh];
int countMiss = statistics[HitResult.Miss];
double total = 6 * countGreat + 2 * countGood + countMeh;
double max = 6 * (countGreat + countGood + countMeh + countMiss);
if (statistics.TryGetValue(HitResult.SliderTailHit, out int countSliderTailHit))
{
var countSliders = beatmap.HitObjects.Count(x => x is Slider);
int countSliders = beatmap.HitObjects.Count(x => x is Slider);
total += 3 * countSliderTailHit;
max += 3 * countSliders;
@ -171,8 +171,8 @@ namespace PerformanceCalculator.Simulate
if (statistics.TryGetValue(HitResult.LargeTickMiss, out int countLargeTickMiss))
{
var countLargeTicks = beatmap.HitObjects.Sum(obj => obj.NestedHitObjects.Count(x => x is SliderTick or SliderRepeat));
var countLargeTickHit = countLargeTicks - countLargeTickMiss;
int countLargeTicks = beatmap.HitObjects.Sum(obj => obj.NestedHitObjects.Count(x => x is SliderTick or SliderRepeat));
int countLargeTickHit = countLargeTicks - countLargeTickMiss;
total += 0.6 * countLargeTickHit;
max += 0.6 * countLargeTicks;

View file

@ -66,7 +66,7 @@ namespace PerformanceCalculator.Simulate
var mods = ParseMods(ruleset, Mods, ModOptions);
var beatmap = workingBeatmap.GetPlayableBeatmap(ruleset.RulesetInfo, mods);
var beatmapMaxCombo = beatmap.GetMaxCombo();
int beatmapMaxCombo = beatmap.GetMaxCombo();
var statistics = GenerateHitResults(beatmap, mods);
var scoreInfo = new ScoreInfo(beatmap.BeatmapInfo, ruleset.RulesetInfo)
{

View file

@ -34,7 +34,7 @@ namespace PerformanceCalculator.Simulate
private static Dictionary<HitResult, int> generateHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countGood)
{
var totalResultCount = beatmap.GetMaxCombo();
int totalResultCount = beatmap.GetMaxCombo();
int countGreat;
@ -45,7 +45,7 @@ namespace PerformanceCalculator.Simulate
else
{
// Let Great=2, Good=1, Miss=0. The total should be this.
var targetTotal = (int)Math.Round(accuracy * totalResultCount * 2);
int targetTotal = (int)Math.Round(accuracy * totalResultCount * 2);
countGreat = targetTotal - (totalResultCount - countMiss);
countGood = totalResultCount - countGreat - countMiss;
@ -62,10 +62,10 @@ namespace PerformanceCalculator.Simulate
protected override double GetAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics)
{
var countGreat = statistics[HitResult.Great];
var countGood = statistics[HitResult.Ok];
var countMiss = statistics[HitResult.Miss];
var total = countGreat + countGood + countMiss;
int countGreat = statistics[HitResult.Great];
int countGood = statistics[HitResult.Ok];
int countMiss = statistics[HitResult.Miss];
int total = countGreat + countGood + countMiss;
return (double)((2 * countGreat) + countGood) / (2 * total);
}

View file

@ -60,9 +60,9 @@ namespace PerformanceCalculatorGUI.Components
currentData = data;
var split = data.Split('\n');
string[] split = data.Split('\n');
foreach (var line in split)
foreach (string line in split)
textContainer.Add(new OsuSpriteText { Text = line });
}

View file

@ -76,7 +76,7 @@ namespace PerformanceCalculatorGUI.Components
{
// this is ugly, but it works
var graphToggleBindable = new Bindable<bool>();
var graphNum = i;
int graphNum = i;
graphToggleBindable.BindValueChanged(state =>
{
if (state.NewValue)
@ -186,7 +186,7 @@ namespace PerformanceCalculatorGUI.Components
private void addStrainBars(Skill[] skills, List<float[]> strainLists)
{
var strainMaxValue = strainLists.Max(list => list.Max());
float strainMaxValue = strainLists.Max(list => list.Max());
for (int i = 0; i < skills.Length; i++)
{
@ -223,7 +223,7 @@ namespace PerformanceCalculatorGUI.Components
for (int i = 0; i < nBars; i++)
{
var strainTime = TimeSpan.FromMilliseconds(TimeUntilFirstStrain.Value + lastStrainTime * i / nBars);
var tooltipText = $"~{strainTime:mm\\:ss\\.ff}";
string tooltipText = $"~{strainTime:mm\\:ss\\.ff}";
tooltipList.Add(tooltipText);
}
@ -248,13 +248,13 @@ namespace PerformanceCalculatorGUI.Components
foreach (var skill in skills)
{
var strains = ((StrainSkill)skill).GetCurrentStrainPeaks().ToArray();
double[] strains = ((StrainSkill)skill).GetCurrentStrainPeaks().ToArray();
var skillStrainList = new List<float>();
for (int i = 0; i < strains.Length; i++)
{
var strain = strains[i];
double strain = strains[i];
skillStrainList.Add(((float)strain));
}
@ -281,7 +281,7 @@ namespace PerformanceCalculatorGUI.Components
{
Clear();
foreach (var val in value)
foreach (float val in value)
{
float length = MaxValue ?? value.Max();
if (length != 0)
@ -324,7 +324,7 @@ namespace PerformanceCalculatorGUI.Components
{
Clear();
foreach (var tooltip in value)
foreach (string tooltip in value)
{
float size = value.Count();
if (size != 0)

View file

@ -17,7 +17,7 @@ namespace PerformanceCalculatorGUI.Components.TextBoxes
{
base.OnUserTextAdded(added);
var textToParse = Text;
string textToParse = Text;
if (string.IsNullOrEmpty(Text))
{
@ -39,7 +39,7 @@ namespace PerformanceCalculatorGUI.Components.TextBoxes
protected override void OnUserTextRemoved(string removed)
{
var textToParse = Text;
string textToParse = Text;
if (string.IsNullOrEmpty(Text))
{

View file

@ -15,7 +15,7 @@ namespace PerformanceCalculatorGUI.Components.TextBoxes
{
base.OnUserTextAdded(added);
var textToParse = Text;
string textToParse = Text;
if (string.IsNullOrEmpty(Text))
{
@ -37,7 +37,7 @@ namespace PerformanceCalculatorGUI.Components.TextBoxes
protected override void OnUserTextRemoved(string removed)
{
var textToParse = Text;
string textToParse = Text;
if (string.IsNullOrEmpty(Text))
{

View file

@ -66,7 +66,7 @@ namespace PerformanceCalculatorGUI
return new ProcessorWorkingBeatmap(fileOrId, null, audioManager);
}
if (!int.TryParse(fileOrId, out var beatmapId))
if (!int.TryParse(fileOrId, out int beatmapId))
throw new ArgumentException("Could not parse provided beatmap ID.");
cachePath = Path.Combine(cachePath, $"{beatmapId}.osu");

View file

@ -81,7 +81,7 @@ namespace PerformanceCalculatorGUI
{
int countGreat;
var totalResultCount = beatmap.HitObjects.Count;
int totalResultCount = beatmap.HitObjects.Count;
if (countMeh != null || countGood != null)
{
@ -172,7 +172,7 @@ namespace PerformanceCalculatorGUI
private static Dictionary<HitResult, int> generateTaikoHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countGood)
{
var totalResultCount = beatmap.HitObjects.OfType<Hit>().Count();
int totalResultCount = beatmap.HitObjects.OfType<Hit>().Count();
int countGreat;
@ -183,7 +183,7 @@ namespace PerformanceCalculatorGUI
else
{
// Let Great=2, Good=1, Miss=0. The total should be this.
var targetTotal = (int)Math.Round(accuracy * totalResultCount * 2);
int targetTotal = (int)Math.Round(accuracy * totalResultCount * 2);
countGreat = targetTotal - (totalResultCount - countMiss);
countGood = totalResultCount - countGreat - countMiss;
@ -200,7 +200,7 @@ namespace PerformanceCalculatorGUI
private static Dictionary<HitResult, int> generateCatchHitResults(double accuracy, IBeatmap beatmap, int countMiss, int? countMeh, int? countGood)
{
var maxCombo = beatmap.HitObjects.Count(h => h is Fruit) + beatmap.HitObjects.OfType<JuiceStream>().SelectMany(j => j.NestedHitObjects).Count(h => !(h is TinyDroplet));
int maxCombo = beatmap.HitObjects.Count(h => h is Fruit) + beatmap.HitObjects.OfType<JuiceStream>().SelectMany(j => j.NestedHitObjects).Count(h => !(h is TinyDroplet));
int maxTinyDroplets = beatmap.HitObjects.OfType<JuiceStream>().Sum(s => s.NestedHitObjects.OfType<TinyDroplet>().Count());
int maxDroplets = beatmap.HitObjects.OfType<JuiceStream>().Sum(s => s.NestedHitObjects.OfType<Droplet>().Count()) - maxTinyDroplets;
@ -231,14 +231,14 @@ namespace PerformanceCalculatorGUI
private static Dictionary<HitResult, int> generateManiaHitResults(double accuracy, IBeatmap beatmap, int countMiss)
{
var totalResultCount = beatmap.HitObjects.Count;
int totalResultCount = beatmap.HitObjects.Count;
// Let Great=6, Good=2, Meh=1, Miss=0. The total should be this.
var targetTotal = (int)Math.Round(accuracy * totalResultCount * 6);
int targetTotal = (int)Math.Round(accuracy * totalResultCount * 6);
// Start by assuming every non miss is a meh
// This is how much increase is needed by greats and goods
var delta = targetTotal - (totalResultCount - countMiss);
int delta = targetTotal - (totalResultCount - countMiss);
// Each great increases total by 5 (great-meh=5)
int countGreat = delta / 5;
@ -272,17 +272,17 @@ namespace PerformanceCalculatorGUI
private static double getOsuAccuracy(IBeatmap beatmap, Dictionary<HitResult, int> statistics)
{
var countGreat = statistics[HitResult.Great];
var countGood = statistics[HitResult.Ok];
var countMeh = statistics[HitResult.Meh];
var countMiss = statistics[HitResult.Miss];
int countGreat = statistics[HitResult.Great];
int countGood = statistics[HitResult.Ok];
int countMeh = statistics[HitResult.Meh];
int countMiss = statistics[HitResult.Miss];
double total = 6 * countGreat + 2 * countGood + countMeh;
double max = 6 * (countGreat + countGood + countMeh + countMiss);
if (statistics.TryGetValue(HitResult.SliderTailHit, out int countSliderTailHit))
{
var countSliders = beatmap.HitObjects.Count(x => x is Slider);
int countSliders = beatmap.HitObjects.Count(x => x is Slider);
total += 3 * countSliderTailHit;
max += 3 * countSliders;
@ -290,8 +290,8 @@ namespace PerformanceCalculatorGUI
if (statistics.TryGetValue(HitResult.LargeTickMiss, out int countLargeTicksMiss))
{
var countLargeTicks = beatmap.HitObjects.Sum(obj => obj.NestedHitObjects.Count(x => x is SliderTick or SliderRepeat));
var countLargeTickHit = countLargeTicks - countLargeTicksMiss;
int countLargeTicks = beatmap.HitObjects.Sum(obj => obj.NestedHitObjects.Count(x => x is SliderTick or SliderRepeat));
int countLargeTickHit = countLargeTicks - countLargeTicksMiss;
total += 0.6 * countLargeTickHit;
max += 0.6 * countLargeTicks;
@ -302,10 +302,10 @@ namespace PerformanceCalculatorGUI
private static double getTaikoAccuracy(Dictionary<HitResult, int> statistics)
{
var countGreat = statistics[HitResult.Great];
var countGood = statistics[HitResult.Ok];
var countMiss = statistics[HitResult.Miss];
var total = countGreat + countGood + countMiss;
int countGreat = statistics[HitResult.Great];
int countGood = statistics[HitResult.Ok];
int countMiss = statistics[HitResult.Miss];
int total = countGreat + countGood + countMiss;
return (double)((2 * countGreat) + countGood) / (2 * total);
}
@ -320,13 +320,13 @@ namespace PerformanceCalculatorGUI
private static double getManiaAccuracy(Dictionary<HitResult, int> statistics)
{
var countPerfect = statistics[HitResult.Perfect];
var countGreat = statistics[HitResult.Great];
var countGood = statistics[HitResult.Good];
var countOk = statistics[HitResult.Ok];
var countMeh = statistics[HitResult.Meh];
var countMiss = statistics[HitResult.Miss];
var total = countPerfect + countGreat + countGood + countOk + countMeh + countMiss;
int countPerfect = statistics[HitResult.Perfect];
int countGreat = statistics[HitResult.Great];
int countGood = statistics[HitResult.Good];
int countOk = statistics[HitResult.Ok];
int countMeh = statistics[HitResult.Meh];
int countMiss = statistics[HitResult.Miss];
int total = countPerfect + countGreat + countGood + countOk + countMeh + countMiss;
return (double)
((6 * (countPerfect + countGreat)) + (4 * countGood) + (2 * countOk) + countMeh) /

View file

@ -323,7 +323,7 @@ namespace PerformanceCalculatorGUI.Screens
var difficultyAttributes = difficultyCalculator.Calculate(mods);
var performanceCalculator = rulesetInstance.CreatePerformanceCalculator();
var livePp = score.PP ?? 0.0;
double livePp = score.PP ?? 0.0;
var perfAttributes = performanceCalculator?.Calculate(parsedScore.ScoreInfo, difficultyAttributes);
score.PP = perfAttributes?.Total ?? 0.0;
@ -356,7 +356,7 @@ namespace PerformanceCalculatorGUI.Screens
decimal nonBonusLivePP = (decimal)liveOrdered.Select(x => x.LivePP).Sum(play => Math.Pow(0.95, index++) * play);
//todo: implement properly. this is pretty damn wrong.
var playcountBonusPP = (totalLivePP - nonBonusLivePP);
decimal playcountBonusPP = (totalLivePP - nonBonusLivePP);
totalLocalPP += playcountBonusPP;
return new UserLeaderboardData

View file

@ -121,7 +121,7 @@ namespace PerformanceCalculatorGUI.Screens.ObjectInspection
private void drawOsuValues(OsuDifficultyHitObject hitObject)
{
var hidden = appliedMods.Value.Any(x => x is ModHidden);
bool hidden = appliedMods.Value.Any(x => x is ModHidden);
flowContainer.AddRange(new[]
{
new ObjectInspectorDifficultyValue("Position", (hitObject.BaseObject as OsuHitObject)!.StackedPosition),

View file

@ -90,7 +90,7 @@ namespace PerformanceCalculatorGUI.Screens.ObjectInspection
using (hitObject.BeginAbsoluteSequence(hitObject.StartTimeBindable.Value))
{
var hitObjectDuration = hitObject.HitObject.GetEndTime() - hitObject.StartTimeBindable.Value;
double hitObjectDuration = hitObject.HitObject.GetEndTime() - hitObject.StartTimeBindable.Value;
hitObject.Delay(hitObjectDuration)
.FadeTo(0.25f, 200f, Easing.Out)

View file

@ -331,17 +331,17 @@ namespace PerformanceCalculatorGUI.Screens
});
decimal totalLocalPP = 0;
for (var i = 0; i < localOrdered.Count; i++)
for (int i = 0; i < localOrdered.Count; i++)
totalLocalPP += (decimal)(Math.Pow(0.95, i) * (localOrdered[i].SoloScore.PP ?? 0));
decimal totalLivePP = player.Statistics.PP ?? (decimal)0.0;
decimal nonBonusLivePP = 0;
for (var i = 0; i < liveOrdered.Count; i++)
for (int i = 0; i < liveOrdered.Count; i++)
nonBonusLivePP += (decimal)(Math.Pow(0.95, i) * liveOrdered[i].LivePP ?? 0);
//todo: implement properly. this is pretty damn wrong.
var playcountBonusPP = (totalLivePP - nonBonusLivePP);
decimal playcountBonusPP = (totalLivePP - nonBonusLivePP);
totalLocalPP += playcountBonusPP;
Schedule(() =>