Fix multiplayer aggregate score inheriting from ScoreInfo

This commit is contained in:
Dean Herbert
2019-12-03 16:10:25 +09:00
parent bb00b4166e
commit 36224dca13
7 changed files with 63 additions and 32 deletions

View File

@ -13,9 +13,9 @@ using osu.Game.Online.Multiplayer;
namespace osu.Game.Screens.Multi.Match.Components
{
public class MatchLeaderboard : Leaderboard<MatchLeaderboardScope, APIRoomScoreInfo>
public class MatchLeaderboard : Leaderboard<MatchLeaderboardScope, APIUserScoreAggregate>
{
public Action<IEnumerable<APIRoomScoreInfo>> ScoresLoaded;
public Action<IEnumerable<APIUserScoreAggregate>> ScoresLoaded;
[Resolved(typeof(Room), nameof(Room.RoomID))]
private Bindable<int?> roomId { get; set; }
@ -35,7 +35,7 @@ namespace osu.Game.Screens.Multi.Match.Components
protected override bool IsOnlineScope => true;
protected override APIRequest FetchScores(Action<IEnumerable<APIRoomScoreInfo>> scoresCallback)
protected override APIRequest FetchScores(Action<IEnumerable<APIUserScoreAggregate>> scoresCallback)
{
if (roomId.Value == null)
return null;
@ -51,7 +51,7 @@ namespace osu.Game.Screens.Multi.Match.Components
return req;
}
protected override LeaderboardScore CreateDrawableScore(APIRoomScoreInfo model, int index) => new MatchLeaderboardScore(model, index);
protected override LeaderboardScore CreateDrawableScore(APIUserScoreAggregate model, int index) => new MatchLeaderboardScore(model, index);
}
public enum MatchLeaderboardScope