From 5cfa59f6159b87237dc5e5394aaebe1b2df7e58d Mon Sep 17 00:00:00 2001 From: Chomp Date: Sat, 8 Mar 2025 09:05:30 +0000 Subject: [PATCH] Use same types as BSG for properties --- .../SPTarkov.Server.Core/Controllers/HideoutController.cs | 2 +- .../SPTarkov.Server.Core/Controllers/InventoryController.cs | 2 +- .../SPTarkov.Server.Core/Models/Eft/Common/Tables/BotBase.cs | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs b/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs index 3365ab05..491b768e 100644 --- a/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs +++ b/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs @@ -141,7 +141,7 @@ public class HideoutController( var timestamp = _timeUtil.GetTimeStamp(); - profileHideoutArea.CompleteTime = Math.Round((double) (timestamp - ctime)); + profileHideoutArea.CompleteTime = (int)Math.Round(timestamp - ctime.Value); profileHideoutArea.Constructing = true; } } diff --git a/Libraries/SPTarkov.Server.Core/Controllers/InventoryController.cs b/Libraries/SPTarkov.Server.Core/Controllers/InventoryController.cs index de2f13fc..67d56ecb 100644 --- a/Libraries/SPTarkov.Server.Core/Controllers/InventoryController.cs +++ b/Libraries/SPTarkov.Server.Core/Controllers/InventoryController.cs @@ -236,7 +236,7 @@ public class InventoryController( var desiredArea = pmcData.Hideout.Areas.FirstOrDefault(area => area.Type == hideoutAreaType); if (desiredArea is not null) { - desiredArea.Level = newValue; + desiredArea.Level = (int?)newValue; } break; diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotBase.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotBase.cs index f25a510a..00e5f822 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotBase.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/BotBase.cs @@ -1841,7 +1841,7 @@ public record BotHideoutArea } [JsonPropertyName("level")] - public double? Level + public int? Level { get; set; @@ -1865,7 +1865,7 @@ public record BotHideoutArea /// Must be integer /// [JsonPropertyName("completeTime")] - public double? CompleteTime + public int? CompleteTime { get; set;