From 058bd50084c32c0b4efd8f9c32b8a06124c0263e Mon Sep 17 00:00:00 2001 From: SplikZerys Date: Thu, 3 Apr 2025 16:32:26 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"=D0=A4=D0=B8=D0=BA=D1=81=20=D1=88?= =?UTF-8?q?=D0=B0=D1=82=D0=B4=D0=B0=D1=83=D0=BD=D0=B0=20=D0=BF=D1=80=D0=B8?= =?UTF-8?q?=20=D0=B2=D0=BE=D1=82=D0=B5=D0=BA=D0=B8=D0=BA=D0=B5"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit a4647c5c (cherry picked from commit 132ecf31b504e0dbf042a5d272912e2dc2312a21) --- .../Players/PlayTimeTracking/PlayTimeTrackingManager.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs b/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs index bdc9b1597b..966d39715b 100644 --- a/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs +++ b/Content.Server/Players/PlayTimeTracking/PlayTimeTrackingManager.cs @@ -319,17 +319,12 @@ public sealed class PlayTimeTrackingManager : ISharedPlaytimeManager, IPostInjec public async Task LoadData(ICommonSession session, CancellationToken cancel) { - // Sunrise-Edit - if (!_playTimeData.TryGetValue(session.UserId, out var data)) - { - data = new PlayTimeData(); - _playTimeData[session.UserId] = data; - } + var data = new PlayTimeData(); + _playTimeData[session.UserId] = data; // Sunrise-Edit 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);