diff --git a/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs b/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs
index 30714e89..3cf1638c 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/HideoutController.cs
@@ -874,21 +874,6 @@ public class HideoutController(
return productionTime * fenceLevel.ScavCaseTimeModifier;
}
- ///
- /// Add generated scav case rewards to player profile
- ///
- /// Players PMC profile
- /// reward items to add to profile
- /// recipe id to save into Production dict
- public void AddScavCaseRewardsToProfile(PmcData pmcData, List- rewards, MongoId recipeId)
- {
- pmcData.Hideout.Production[$"ScavCase{recipeId}"] = new Production
- {
- Products = rewards,
- RecipeId = recipeId,
- };
- }
-
///
/// Start production of continuously created item
///
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs b/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs
index cffc2b7d..7abeb754 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs
@@ -687,17 +687,17 @@ public class InsuranceController(
///
///
protected void HandleLabsInsurance(
- Dictionary?>? traderDialogMessages,
+ Dictionary?> traderDialogMessages,
Insurance insurance
)
{
// Use labs specific messages if available, otherwise use default
- var responseMesageIds =
- traderDialogMessages["insuranceFailedLabs"]?.Count > 0
- ? traderDialogMessages["insuranceFailedLabs"]
- : traderDialogMessages["insuranceFailed"];
+ if (!traderDialogMessages.TryGetValue("insuranceFailedLabs", out var responseMessageIds))
+ {
+ traderDialogMessages.TryGetValue("insuranceFailed", out responseMessageIds);
+ }
- insurance.MessageTemplateId = randomUtil.GetArrayValue(responseMesageIds);
+ insurance.MessageTemplateId = randomUtil.GetArrayValue(responseMessageIds);
// Remove all insured items taken into labs
insurance.Items = [];
@@ -709,15 +709,19 @@ public class InsuranceController(
///
///
protected void HandleLabyrinthInsurance(
- Dictionary?>? traderDialogMessages,
+ Dictionary?> traderDialogMessages,
Insurance insurance
)
{
- // Use labs specific messages if available, otherwise use default
- var responseMessageIds =
- traderDialogMessages["insuranceFailedLabyrinth"]?.Count > 0
- ? traderDialogMessages["insuranceFailedLabyrinth"]
- : traderDialogMessages["insuranceFailed"];
+ if (
+ !traderDialogMessages.TryGetValue(
+ "insuranceFailedLabyrinth",
+ out var responseMessageIds
+ )
+ )
+ {
+ traderDialogMessages.TryGetValue("insuranceFailed", out responseMessageIds);
+ }
insurance.MessageTemplateId = randomUtil.GetArrayValue(responseMessageIds);
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs b/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs
index 9bd46a80..d2021003 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs
@@ -219,7 +219,7 @@ public class RagfairController(
// No trader found in profile, create a blank record for them
var existsInProfile = !fullProfile.TraderPurchases.TryAdd(
offer.User.Id,
- new Dictionary()
+ new Dictionary()
);
if (!existsInProfile)
{
@@ -249,7 +249,7 @@ public class RagfairController(
/// Add index to all offers passed in (0-indexed)
///
/// Offers to add index value to
- protected void AddIndexValueToOffers(List offers)
+ protected void AddIndexValueToOffers(IEnumerable offers)
{
var counter = 0;
diff --git a/Libraries/SPTarkov.Server.Core/DI/Router.cs b/Libraries/SPTarkov.Server.Core/DI/Router.cs
index c8f74bd6..8f904890 100644
--- a/Libraries/SPTarkov.Server.Core/DI/Router.cs
+++ b/Libraries/SPTarkov.Server.Core/DI/Router.cs
@@ -10,18 +10,18 @@ namespace SPTarkov.Server.Core.DI;
public abstract class Router
{
- protected List handledRoutes = [];
+ protected IEnumerable handledRoutes = [];
public virtual string GetTopLevelRoute()
{
return "spt";
}
- protected abstract List GetHandledRoutes();
+ protected abstract IEnumerable GetHandledRoutes();
- protected List GetInternalHandledRoutes()
+ protected IEnumerable GetInternalHandledRoutes()
{
- if (handledRoutes.Count == 0)
+ if (!handledRoutes.Any())
{
handledRoutes = GetHandledRoutes();
}
@@ -40,7 +40,7 @@ public abstract class Router
}
}
-public abstract class StaticRouter(JsonUtil jsonUtil, List routes) : Router
+public abstract class StaticRouter(JsonUtil jsonUtil, IEnumerable routes) : Router
{
public async ValueTask