1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:43:05 +08:00

Beatmap -> BeatmapInfo + add foreign key

This commit is contained in:
smoogipoo 2018-11-28 17:26:39 +09:00
parent 2ee181daf7
commit ed02847752
4 changed files with 9 additions and 7 deletions

View File

@ -58,7 +58,7 @@ namespace osu.Game.Online.API.Requests.Responses
[JsonProperty(@"beatmap")]
private BeatmapInfo beatmap
{
set => Beatmap = value;
set => BeatmapInfo = value;
}
[JsonProperty(@"beatmapset")]
@ -67,10 +67,10 @@ namespace osu.Game.Online.API.Requests.Responses
set
{
// extract the set ID to its correct place.
Beatmap.BeatmapSet = new BeatmapSetInfo { OnlineBeatmapSetID = value.ID };
BeatmapInfo.BeatmapSet = new BeatmapSetInfo { OnlineBeatmapSetID = value.ID };
value.ID = 0;
Beatmap.Metadata = value;
BeatmapInfo.Metadata = value;
}
}
@ -110,7 +110,7 @@ namespace osu.Game.Online.API.Requests.Responses
public void ApplyBeatmap(BeatmapInfo beatmap)
{
Beatmap = beatmap;
BeatmapInfo = beatmap;
ApplyRuleset(beatmap.Ruleset);
}

View File

@ -34,7 +34,7 @@ namespace osu.Game.Scoring.Legacy
var version = sr.ReadInt32();
currentBeatmap = GetBeatmap(sr.ReadString()).Beatmap;
score.Beatmap = currentBeatmap.BeatmapInfo;
score.BeatmapInfo = currentBeatmap.BeatmapInfo;
score.User = new User { Username = sr.ReadString() };
score.MD5Hash = sr.ReadString();

View File

@ -65,7 +65,9 @@ namespace osu.Game.Scoring
[JsonIgnore]
public Replay Replay;
public BeatmapInfo Beatmap;
public int BeatmapInfoID { get; set; }
public BeatmapInfo BeatmapInfo;
public long OnlineScoreID;

View File

@ -275,7 +275,7 @@ namespace osu.Game.Screens.Play
var score = new Score
{
Beatmap = Beatmap.Value.BeatmapInfo,
BeatmapInfo = Beatmap.Value.BeatmapInfo,
Ruleset = ruleset
};
ScoreProcessor.PopulateScore(score);