mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 08:12:56 +08:00
Inline with above method
This commit is contained in:
parent
bdc426a498
commit
5a64abee64
@ -35,21 +35,19 @@ namespace osu.Game.Online.Rooms
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override bool VerifyDatabasedModel(BeatmapSetInfo databasedSet)
|
protected override bool VerifyDatabasedModel(BeatmapSetInfo databasedSet)
|
||||||
{
|
|
||||||
var verified = verifyDatabasedModel(databasedSet);
|
|
||||||
if (!verified)
|
|
||||||
Logger.Log("The imported beatmap set does not match the online version.", LoggingTarget.Runtime, LogLevel.Important);
|
|
||||||
|
|
||||||
return verified;
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool verifyDatabasedModel(BeatmapSetInfo databasedSet)
|
|
||||||
{
|
{
|
||||||
int? beatmapId = SelectedItem.Value.Beatmap.Value.OnlineBeatmapID;
|
int? beatmapId = SelectedItem.Value.Beatmap.Value.OnlineBeatmapID;
|
||||||
string checksum = SelectedItem.Value.Beatmap.Value.MD5Hash;
|
string checksum = SelectedItem.Value.Beatmap.Value.MD5Hash;
|
||||||
|
|
||||||
var matchingBeatmap = databasedSet.Beatmaps.FirstOrDefault(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum);
|
var matchingBeatmap = databasedSet.Beatmaps.FirstOrDefault(b => b.OnlineBeatmapID == beatmapId && b.MD5Hash == checksum);
|
||||||
return matchingBeatmap != null;
|
|
||||||
|
if (matchingBeatmap == null)
|
||||||
|
{
|
||||||
|
Logger.Log("The imported beatmap set does not match the online version.", LoggingTarget.Runtime, LogLevel.Important);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool IsModelAvailableLocally()
|
protected override bool IsModelAvailableLocally()
|
||||||
|
Loading…
Reference in New Issue
Block a user