diff --git a/Libraries/SPTarkov.Server.Core/Callbacks/ClientLogCallbacks.cs b/Libraries/SPTarkov.Server.Core/Callbacks/ClientLogCallbacks.cs
index 210b40ca..04951ff4 100644
--- a/Libraries/SPTarkov.Server.Core/Callbacks/ClientLogCallbacks.cs
+++ b/Libraries/SPTarkov.Server.Core/Callbacks/ClientLogCallbacks.cs
@@ -24,7 +24,7 @@ public class ClientLogCallbacks(
/// Handle /singleplayer/log
///
///
- public ValueTask ClientLog(string url, ClientLogRequest request, MongoId sessionID)
+ public ValueTask ClientLog(string url, ClientLogRequest request, MongoId sessionId)
{
if (request.Message == "-1")
{
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/GameController.cs b/Libraries/SPTarkov.Server.Core/Controllers/GameController.cs
index b85fbe78..9d637c62 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/GameController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/GameController.cs
@@ -404,7 +404,7 @@ public class GameController(
}
// Two day post-profile creation
- if (currentTimeStamp > timeStampProfileCreated + oneDaySeconds * 2)
+ if (currentTimeStamp > timeStampProfileCreated + (oneDaySeconds * 2))
{
giftService.SendPraporStartingGift(pmcProfile.SessionId.Value, 2);
}
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs b/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs
index c68f8f2c..d1591713 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs
@@ -846,7 +846,7 @@ public class HideoutController(
// Build an array of the tools that need to be returned to the player
List> toolsToSendToPlayer = [];
- pmcData.Hideout.Production.TryGetValue(prodId.Value, out Production hideoutProduction);
+ pmcData.Hideout.Production.TryGetValue(prodId.Value, out var hideoutProduction);
if (hideoutProduction.SptRequiredTools?.Count > 0)
{
foreach (var tool in hideoutProduction.SptRequiredTools)
diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs
index e541f671..60be29de 100644
--- a/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs
+++ b/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs
@@ -509,6 +509,7 @@ public class BotWeaponGenerator(
///
/// Add ammo to the secure container.
///
+ /// Id of bot we're adding ammo to
/// How many stacks of ammo to add.
/// Ammo type to add.
/// Size of the ammo stack to add.
@@ -711,10 +712,8 @@ public class BotWeaponGenerator(
// Try to get cartridges from slots array first, if none found, try Cartridges array
var cartridges =
- magazineTemplate.Value.Properties.Slots.FirstOrDefault()?.Properties?.Filters.FirstOrDefault()?.Filter ?? magazineTemplate
- .Value.Properties.Cartridges.FirstOrDefault()
- ?.Properties?.Filters.FirstOrDefault()
- ?.Filter;
+ magazineTemplate.Value.Properties.Slots.FirstOrDefault()?.Properties?.Filters.FirstOrDefault()?.Filter
+ ?? magazineTemplate.Value.Properties.Cartridges.FirstOrDefault()?.Properties?.Filters.FirstOrDefault()?.Filter;
return cartridges ?? [];
}
diff --git a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/RepeatableQuests.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/RepeatableQuests.cs
index de01bbe5..101530bb 100644
--- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/RepeatableQuests.cs
+++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Tables/RepeatableQuests.cs
@@ -14,9 +14,6 @@ public record RepeatableQuest : Quest
[JsonPropertyName("sptRepatableGroupName")]
public string? SptRepatableGroupName { get; set; }
- [JsonPropertyName("acceptanceAndFinishingSource")]
- public string? AcceptanceAndFinishingSource { get; set; }
-
[JsonPropertyName("questStatus")]
public RepeatableQuestStatus? QuestStatus { get; set; }
}
diff --git a/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs b/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs
index c8e9b5e2..bb61c163 100644
--- a/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs
+++ b/Libraries/SPTarkov.Server.Core/Services/BotEquipmentFilterService.cs
@@ -121,9 +121,9 @@ public class BotEquipmentFilterService(
///
/// equipment role to return
/// EquipmentFilters object
- public EquipmentFilters GetBotEquipmentSettings(string botEquipmentRole)
+ public EquipmentFilters? GetBotEquipmentSettings(string botEquipmentRole)
{
- return BotEquipmentConfig[botEquipmentRole];
+ return BotEquipmentConfig.GetValueOrDefault(botEquipmentRole);
}
///
@@ -415,7 +415,7 @@ public class BotEquipmentFilterService(
foreach (var itemToEditKvP in poolAdjustmentKvP.Value)
// Only make change if item exists as we're editing, not adding
{
- if (locationToUpdate.GetValueOrDefault(itemToEditKvP.Key) != null || locationToUpdate[itemToEditKvP.Key] == 0)
+ if (locationToUpdate.ContainsKey(itemToEditKvP.Key) || locationToUpdate[itemToEditKvP.Key] == 0)
{
locationToUpdate[itemToEditKvP.Key] = itemToEditKvP.Value;
}
diff --git a/Libraries/SPTarkov.Server.Core/Services/DatabaseService.cs b/Libraries/SPTarkov.Server.Core/Services/DatabaseService.cs
index 10eaa758..80a2b875 100644
--- a/Libraries/SPTarkov.Server.Core/Services/DatabaseService.cs
+++ b/Libraries/SPTarkov.Server.Core/Services/DatabaseService.cs
@@ -1,7 +1,5 @@
-using System.Diagnostics;
using SPTarkov.Common.Extensions;
using SPTarkov.DI.Annotations;
-using SPTarkov.Server.Core.Extensions;
using SPTarkov.Server.Core.Models.Common;
using SPTarkov.Server.Core.Models.Eft.Common;
using SPTarkov.Server.Core.Models.Eft.Common.Tables;
@@ -12,7 +10,6 @@ using SPTarkov.Server.Core.Models.Utils;
using SPTarkov.Server.Core.Servers;
using Hideout = SPTarkov.Server.Core.Models.Spt.Hideout.Hideout;
using Locations = SPTarkov.Server.Core.Models.Spt.Server.Locations;
-using LogLevel = SPTarkov.Server.Core.Models.Spt.Logging.LogLevel;
namespace SPTarkov.Server.Core.Services;
@@ -26,8 +23,6 @@ public class DatabaseService(
ServerLocalisationService serverLocalisationService
)
{
- private bool _isDataValid = true;
-
/// assets/database/
public DatabaseTables GetTables()
{
diff --git a/Libraries/SPTarkov.Server.Core/Services/InsuranceService.cs b/Libraries/SPTarkov.Server.Core/Services/InsuranceService.cs
index 920a663b..6132201c 100644
--- a/Libraries/SPTarkov.Server.Core/Services/InsuranceService.cs
+++ b/Libraries/SPTarkov.Server.Core/Services/InsuranceService.cs
@@ -192,9 +192,9 @@ public class InsuranceService(
///
/// Store lost gear post-raid inside profile, ready for later code to pick it up and mail it
///
- /// Player/session id
+ /// Player/session id
/// Gear to store - generated by GetGearLostInRaid()
- public void StoreGearLostInRaidToSendLater(MongoId sessionID, List equipmentPkg)
+ public void StoreGearLostInRaidToSendLater(MongoId sessionId, List equipmentPkg)
{
// Process all insured items lost in-raid
foreach (var gear in equipmentPkg)
@@ -303,11 +303,16 @@ public class InsuranceService(
/// True if exists
protected bool InsuranceTraderArrayExists(MongoId sessionId, MongoId traderId)
{
- return Insured[sessionId].GetValueOrDefault(traderId) is not null;
+ if (!Insured.TryGetValue(sessionId, out var value))
+ {
+ return false;
+ }
+
+ return value?.GetValueOrDefault(traderId) is not null;
}
///
- /// Empty out list holding insured items by sessionid + traderid
+ /// Empty out list holding insured items by sessionId + traderId
///
/// Player id (session id)
/// Trader items insured with
diff --git a/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs b/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs
index 0d5fc5c6..5edb94c2 100644
--- a/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs
+++ b/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs
@@ -65,6 +65,7 @@ public class LocationLifecycleService(
/// Check player type for pmc or scav
///
/// string
+ /// What to check the bot against, default = PMC
/// bool
protected internal bool IsSide(string playerSide, string sideCheck = Pmc)
{
diff --git a/server-csharp.sln.DotSettings b/server-csharp.sln.DotSettings
index 5454b259..f9223201 100644
--- a/server-csharp.sln.DotSettings
+++ b/server-csharp.sln.DotSettings
@@ -5,6 +5,7 @@
PMC
True
True
+ True
True
True
True