1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Add backmigration of TotalScoreWithoutMods for existing scores

This commit is contained in:
Bartłomiej Dach 2024-04-17 08:52:27 +02:00
parent a386068ed3
commit 6b0d577f0b
No known key found for this signature in database

View File

@ -1109,6 +1109,19 @@ namespace osu.Game.Database
}
}
break;
case 41:
foreach (var score in migration.NewRealm.All<ScoreInfo>())
{
double modMultiplier = 1;
foreach (var mod in score.Mods)
modMultiplier *= mod.ScoreMultiplier;
score.TotalScoreWithoutMods = (long)Math.Round(score.TotalScore / modMultiplier);
}
break;
}