mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +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:
parent
d5a733d244
commit
c4af8591a5
@ -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 =>
|
||||
|
Loading…
Reference in New Issue
Block a user