Fix ToBeatmap not using the correct metadata

Metadata is always come from the API via the beatmap set.
This commit is contained in:
smoogipoo 2018-12-14 13:43:52 +09:00
parent 56fd4b95cd
commit c9c04a6200

View File

@ -59,15 +59,17 @@ namespace osu.Game.Online.API.Requests.Responses
public BeatmapInfo ToBeatmap(RulesetStore rulesets) public BeatmapInfo ToBeatmap(RulesetStore rulesets)
{ {
var set = BeatmapSet.ToBeatmapSet(rulesets);
return new BeatmapInfo return new BeatmapInfo
{ {
Metadata = this, Metadata = set.Metadata,
Ruleset = rulesets.GetRuleset(ruleset), Ruleset = rulesets.GetRuleset(ruleset),
StarDifficulty = starDifficulty, StarDifficulty = starDifficulty,
OnlineBeatmapID = OnlineBeatmapID, OnlineBeatmapID = OnlineBeatmapID,
Version = version, Version = version,
Status = Status, Status = Status,
BeatmapSet = BeatmapSet.ToBeatmapSet(rulesets), BeatmapSet = set,
BaseDifficulty = new BeatmapDifficulty BaseDifficulty = new BeatmapDifficulty
{ {
DrainRate = drainRate, DrainRate = drainRate,