mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Consider OnlineID
s during ruleset equality if available
Required for `APIBeatmap`s, which provide `Ruleset` instances with `OnlineID` available only. Also consistent with the comparer implementation.
This commit is contained in:
parent
1b729e891d
commit
26839f6ad8
@ -44,6 +44,9 @@ namespace osu.Game.Rulesets
|
|||||||
if (ReferenceEquals(this, other)) return true;
|
if (ReferenceEquals(this, other)) return true;
|
||||||
if (other == null) return false;
|
if (other == null) return false;
|
||||||
|
|
||||||
|
if (OnlineID >= 0 && other.OnlineID >= 0)
|
||||||
|
return OnlineID == other.OnlineID;
|
||||||
|
|
||||||
return ShortName == other.ShortName;
|
return ShortName == other.ShortName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user