diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneSpectator.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneSpectator.cs index df4b85b37a..72c6fd8d44 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneSpectator.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneSpectator.cs @@ -250,7 +250,7 @@ namespace osu.Game.Tests.Visual.Gameplay public void EndPlay(int beatmapId) { - ((ISpectatorClient)this).UserFinishedPlaying((int)StreamingUser.Id, new SpectatorState + ((ISpectatorClient)this).UserFinishedPlaying(StreamingUser.Id, new SpectatorState { BeatmapID = beatmapId, RulesetID = 0, @@ -273,7 +273,7 @@ namespace osu.Game.Tests.Visual.Gameplay } var bundle = new FrameDataBundle(frames); - ((ISpectatorClient)this).UserSentFrames((int)StreamingUser.Id, bundle); + ((ISpectatorClient)this).UserSentFrames(StreamingUser.Id, bundle); if (!sentState) sendState(beatmapId); @@ -293,7 +293,7 @@ namespace osu.Game.Tests.Visual.Gameplay private void sendState(int beatmapId) { sentState = true; - ((ISpectatorClient)this).UserBeganPlaying((int)StreamingUser.Id, new SpectatorState + ((ISpectatorClient)this).UserBeganPlaying(StreamingUser.Id, new SpectatorState { BeatmapID = beatmapId, RulesetID = 0, diff --git a/osu.Game.Tournament/Screens/Editors/TeamEditorScreen.cs b/osu.Game.Tournament/Screens/Editors/TeamEditorScreen.cs index 7196f47bd6..582f72429b 100644 --- a/osu.Game.Tournament/Screens/Editors/TeamEditorScreen.cs +++ b/osu.Game.Tournament/Screens/Editors/TeamEditorScreen.cs @@ -277,7 +277,7 @@ namespace osu.Game.Tournament.Screens.Editors userId.Value = user.Id.ToString(); userId.BindValueChanged(idString => { - long.TryParse(idString.NewValue, out var parsed); + int.TryParse(idString.NewValue, out var parsed); user.Id = parsed; diff --git a/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs b/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs index 1ca14256e5..6d0160fbc4 100644 --- a/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs +++ b/osu.Game/Online/API/Requests/Responses/APIBeatmapSet.cs @@ -61,7 +61,7 @@ namespace osu.Game.Online.API.Requests.Responses private int[] ratings { get; set; } [JsonProperty(@"user_id")] - private long creatorId + private int creatorId { set => Author.Id = value; } diff --git a/osu.Game/Online/API/Requests/Responses/APIChangelogUser.cs b/osu.Game/Online/API/Requests/Responses/APIChangelogUser.cs index 5891391e83..024e1ce048 100644 --- a/osu.Game/Online/API/Requests/Responses/APIChangelogUser.cs +++ b/osu.Game/Online/API/Requests/Responses/APIChangelogUser.cs @@ -20,7 +20,7 @@ namespace osu.Game.Online.API.Requests.Responses public string OsuUsername { get; set; } [JsonProperty("user_id")] - public long? UserId { get; set; } + public int? UserId { get; set; } [JsonProperty("user_url")] public string UserUrl { get; set; } diff --git a/osu.Game/Online/Chat/Channel.cs b/osu.Game/Online/Chat/Channel.cs index 8c1e1ad128..187a3e5dfc 100644 --- a/osu.Game/Online/Chat/Channel.cs +++ b/osu.Game/Online/Chat/Channel.cs @@ -22,7 +22,7 @@ namespace osu.Game.Online.Chat public readonly ObservableCollection Users = new ObservableCollection(); [JsonProperty(@"users")] - private long[] userIds + private int[] userIds { set { diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index a0ddab702e..64f8d4415b 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -278,7 +278,7 @@ namespace osu.Game break; case LinkAction.OpenUserProfile: - if (long.TryParse(link.Argument, out long userId)) + if (int.TryParse(link.Argument, out int userId)) ShowUser(userId); break; @@ -321,7 +321,7 @@ namespace osu.Game /// Show a user's profile as an overlay. /// /// The user to display. - public void ShowUser(long userId) => waitForReady(() => userProfile, _ => userProfile.ShowUser(userId)); + public void ShowUser(int userId) => waitForReady(() => userProfile, _ => userProfile.ShowUser(userId)); /// /// Show a beatmap's set as an overlay, displaying the given beatmap. diff --git a/osu.Game/Overlays/UserProfileOverlay.cs b/osu.Game/Overlays/UserProfileOverlay.cs index d52ad84592..81027667fa 100644 --- a/osu.Game/Overlays/UserProfileOverlay.cs +++ b/osu.Game/Overlays/UserProfileOverlay.cs @@ -33,7 +33,7 @@ namespace osu.Game.Overlays { } - public void ShowUser(long userId) => ShowUser(new User { Id = userId }); + public void ShowUser(int userId) => ShowUser(new User { Id = userId }); public void ShowUser(User user, bool fetchOnline = true) { diff --git a/osu.Game/Scoring/ScoreInfo.cs b/osu.Game/Scoring/ScoreInfo.cs index 596e98a6bd..f5192f3a40 100644 --- a/osu.Game/Scoring/ScoreInfo.cs +++ b/osu.Game/Scoring/ScoreInfo.cs @@ -123,7 +123,7 @@ namespace osu.Game.Scoring [JsonIgnore] [Column("UserID")] - public long? UserID + public int? UserID { get => User?.Id ?? 1; set diff --git a/osu.Game/Users/User.cs b/osu.Game/Users/User.cs index 89786e3bd8..1fbc3d06f4 100644 --- a/osu.Game/Users/User.cs +++ b/osu.Game/Users/User.cs @@ -12,7 +12,7 @@ namespace osu.Game.Users public class User : IEquatable { [JsonProperty(@"id")] - public long Id = 1; + public int Id = 1; [JsonProperty(@"join_date")] public DateTimeOffset JoinDate;