1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 05:27:23 +08:00

Preserve OnlineID when importing scores

Previously, for lazer scores, the ID returned from `osu-web` was
discarded and replaced with -1, due to the fact that the appropriate
structures for unification with stable, as well as unification across
solo and multiplayer, were not in place yet.

Now we're at the point where scores from all the aforementioned sources
receive a `solo_scores` DB row, and as such, we can start treating
`solo_scores`-scheme IDs as canonical "online IDs" for a score.
This commit is contained in:
Bartłomiej Dach 2023-09-07 09:39:10 +02:00
parent d5a733d244
commit c4af8591a5
No known key found for this signature in database

View File

@ -1166,13 +1166,6 @@ namespace osu.Game.Screens.Play
// the import process will re-attach managed beatmap/rulesets to this score. we don't want this for now, so create a temporary copy to import.
var importableScore = score.ScoreInfo.DeepClone();
// For the time being, online ID responses are not really useful for anything.
// In addition, the IDs provided via new (lazer) endpoints are based on a different autoincrement from legacy (stable) scores.
//
// Until we better define the server-side logic behind this, let's not store the online ID to avoid potential unique constraint
// conflicts across various systems (ie. solo and multiplayer).
importableScore.OnlineID = -1;
var imported = scoreManager.Import(importableScore, replayReader);
imported.PerformRead(s =>