1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Move population of LegacyTotalScore to ScoreImporter

This commit is contained in:
Dan Balasescu 2023-06-29 17:21:24 +09:00
parent ddd870e843
commit 6822871dab
2 changed files with 3 additions and 3 deletions

View File

@ -123,9 +123,6 @@ namespace osu.Game.Scoring.Legacy
PopulateAccuracy(score.ScoreInfo);
if (score.ScoreInfo.IsLegacyScore)
score.ScoreInfo.LegacyTotalScore = score.ScoreInfo.TotalScore;
// before returning for database import, we must restore the database-sourced BeatmapInfo.
// if not, the clone operation in GetPlayableBeatmap will cause a dereference and subsequent database exception.
score.ScoreInfo.BeatmapInfo = workingBeatmap.BeatmapInfo;

View File

@ -89,7 +89,10 @@ namespace osu.Game.Scoring
if (StandardisedScoreMigrationTools.ShouldMigrateToNewStandardised(model))
model.TotalScore = StandardisedScoreMigrationTools.GetNewStandardised(model);
else if (model.IsLegacyScore)
{
model.LegacyTotalScore = model.TotalScore;
model.TotalScore = StandardisedScoreMigrationTools.ConvertFromLegacyTotalScore(model, beatmaps());
}
}
/// <summary>