mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 05:02:55 +08:00
Use solo score ID as OnlineID
when converting from MultiplayerScore
This commit is contained in:
parent
b144cfd55c
commit
d5a733d244
@ -245,6 +245,7 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
var multiplayerUserScore = new MultiplayerScore
|
var multiplayerUserScore = new MultiplayerScore
|
||||||
{
|
{
|
||||||
ID = highestScoreId,
|
ID = highestScoreId,
|
||||||
|
SoloScoreID = (ulong?)highestScoreId,
|
||||||
Accuracy = userScore.Accuracy,
|
Accuracy = userScore.Accuracy,
|
||||||
Passed = userScore.Passed,
|
Passed = userScore.Passed,
|
||||||
Rank = userScore.Rank,
|
Rank = userScore.Rank,
|
||||||
@ -262,9 +263,11 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
|
|
||||||
for (int i = 1; i <= scores_per_result; i++)
|
for (int i = 1; i <= scores_per_result; i++)
|
||||||
{
|
{
|
||||||
|
int nextLowest = getNextLowestScoreId();
|
||||||
multiplayerUserScore.ScoresAround.Lower.Scores.Add(new MultiplayerScore
|
multiplayerUserScore.ScoresAround.Lower.Scores.Add(new MultiplayerScore
|
||||||
{
|
{
|
||||||
ID = getNextLowestScoreId(),
|
ID = nextLowest,
|
||||||
|
SoloScoreID = (ulong?)nextLowest,
|
||||||
Accuracy = userScore.Accuracy,
|
Accuracy = userScore.Accuracy,
|
||||||
Passed = true,
|
Passed = true,
|
||||||
Rank = userScore.Rank,
|
Rank = userScore.Rank,
|
||||||
@ -277,9 +280,11 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
int nextHighest = getNextHighestScoreId();
|
||||||
multiplayerUserScore.ScoresAround.Higher.Scores.Add(new MultiplayerScore
|
multiplayerUserScore.ScoresAround.Higher.Scores.Add(new MultiplayerScore
|
||||||
{
|
{
|
||||||
ID = getNextHighestScoreId(),
|
ID = nextHighest,
|
||||||
|
SoloScoreID = (ulong?)nextHighest,
|
||||||
Accuracy = userScore.Accuracy,
|
Accuracy = userScore.Accuracy,
|
||||||
Passed = true,
|
Passed = true,
|
||||||
Rank = userScore.Rank,
|
Rank = userScore.Rank,
|
||||||
@ -309,9 +314,11 @@ namespace osu.Game.Tests.Visual.Playlists
|
|||||||
|
|
||||||
for (int i = 1; i <= scores_per_result; i++)
|
for (int i = 1; i <= scores_per_result; i++)
|
||||||
{
|
{
|
||||||
|
int id = sort == "score_asc" ? getNextHighestScoreId() : getNextLowestScoreId();
|
||||||
result.Scores.Add(new MultiplayerScore
|
result.Scores.Add(new MultiplayerScore
|
||||||
{
|
{
|
||||||
ID = sort == "score_asc" ? getNextHighestScoreId() : getNextLowestScoreId(),
|
ID = id,
|
||||||
|
SoloScoreID = (ulong?)id,
|
||||||
Accuracy = 1,
|
Accuracy = 1,
|
||||||
Passed = true,
|
Passed = true,
|
||||||
Rank = ScoreRank.X,
|
Rank = ScoreRank.X,
|
||||||
|
@ -75,7 +75,7 @@ namespace osu.Game.Online.Rooms
|
|||||||
|
|
||||||
var scoreInfo = new ScoreInfo
|
var scoreInfo = new ScoreInfo
|
||||||
{
|
{
|
||||||
OnlineID = ID,
|
OnlineID = (long?)SoloScoreID ?? -1,
|
||||||
TotalScore = TotalScore,
|
TotalScore = TotalScore,
|
||||||
MaxCombo = MaxCombo,
|
MaxCombo = MaxCombo,
|
||||||
BeatmapInfo = beatmap,
|
BeatmapInfo = beatmap,
|
||||||
|
Loading…
Reference in New Issue
Block a user