diff --git a/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs b/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs index 966d39715b..bdc9b1597b 100644 --- a/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs +++ b/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs @@ -319,12 +319,17 @@ public sealed class PlayTimeTrackingManager : ISharedPlaytimeManager, IPostInjec public async Task LoadData(ICommonSession session, CancellationToken cancel) { - var data = new PlayTimeData(); - _playTimeData[session.UserId] = data; // Sunrise-Edit + // Sunrise-Edit + if (!_playTimeData.TryGetValue(session.UserId, out var data)) + { + data = new PlayTimeData(); + _playTimeData[session.UserId] = data; + } var playTimes = await _db.GetPlayTimes(session.UserId, cancel); cancel.ThrowIfCancellationRequested(); + data.TrackerTimes.Clear(); // Sunrise-Edit foreach (var timer in playTimes) { data.TrackerTimes.Add(timer.Tracker, timer.TimeSpent); diff --git a/Resources/Changelog/ChangelogSunrise.yml b/Resources/Changelog/ChangelogSunrise.yml index 5021c0ae78..8e19efb9cb 100644 --- a/Resources/Changelog/ChangelogSunrise.yml +++ b/Resources/Changelog/ChangelogSunrise.yml @@ -13830,3 +13830,13 @@ type: Tweak id: 947 time: '2025-03-29T18:56:04.201277+00:00' +- author: VigersRay + changes: + - message: "\u0418\u0441\u043F\u0440\u0430\u0432\u043B\u0435\u043D \u0432\u044B\u043B\ + \u0435\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0432\u043E \u0432\u0440\ + \u0435\u043C\u044F \u0433\u043E\u043B\u043E\u0441\u043E\u0432\u0430\u043D\u0438\ + \u044F \u0437\u0430 \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F\ + \ (\u0412\u043E\u0437\u043C\u043E\u0436\u043D\u043E)." + type: Fix + id: 948 + time: '2025-04-02T18:48:17.976246+00:00'