diff --git a/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs b/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs index f7ea7cc8..7bf4da99 100644 --- a/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs +++ b/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs @@ -1025,18 +1025,24 @@ public class RagfairController( } // Only reduce time to end if time remaining is greater than what we would set it to - var differenceInSeconds = playerOffer.EndTime - timeUtil.GetTimeStamp(); - if (differenceInSeconds > RagfairConfig.Sell.ExpireSeconds) + var now = timeUtil.GetTimeStamp(); + var configExpireSeconds = RagfairConfig.Sell.ExpireSeconds; + + var differenceInSeconds = playerOffer.EndTime - now; + if (differenceInSeconds > configExpireSeconds) { // `expireSeconds` Default is 71 seconds - var newEndTime = RagfairConfig.Sell.ExpireSeconds + timeUtil.GetTimeStamp(); + // TODO: RagfairConfig.Sell.ExpireSeconds should not exist as it should use + // Globals.Configuration.RagFair.OfferDurationTimeInHourAfterRemove (the value actually used by client) + var newEndTime = configExpireSeconds + now; playerOffer.EndTime = (long?)Math.Round((double)newEndTime); + differenceInSeconds = configExpireSeconds; } - if (logger.IsLogEnabled(LogLevel.Debug)) + if (logger.IsLogEnabled(LogLevel.Debug) && differenceInSeconds is { } remaining) { logger.Debug( - $"Flagged player: {sessionId} offer: {offerId} for expiry in: {TimeSpan.FromSeconds(playerOffer.EndTime.Value).ToString()}" + $"Flagged player: {sessionId} offer: {offerId} for expiry in: {TimeSpan.FromSeconds(remaining).ToString()}" ); } diff --git a/Libraries/SPTarkov.Server.Core/Services/BotWeaponModLimitService.cs b/Libraries/SPTarkov.Server.Core/Services/BotWeaponModLimitService.cs index db969b94..7b83341b 100644 --- a/Libraries/SPTarkov.Server.Core/Services/BotWeaponModLimitService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/BotWeaponModLimitService.cs @@ -158,7 +158,7 @@ public class BotWeaponModLimitService(ISptLogger logge { if (logger.IsLogEnabled(LogLevel.Debug)) { - logger.Debug($"[{botRole}] {modType} limit reached! tried to add: {modTpl} but scope count is: {currentCount.Count}"); + logger.Debug($"[{botRole}] {modType} limit reached! tried to add: {modTpl} but {modType} count is: {currentCount.Count}"); } return true;