diff --git a/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs index 1064863b..45b1e89c 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs @@ -37,7 +37,6 @@ public class LocationLootGenerator( protected readonly SeasonalEventConfig _seasonalEventConfig = _configServer.GetConfig(); - /// /// Generate Loot for provided location () /// @@ -59,16 +58,15 @@ public class LocationLootGenerator( var staticAmmoDist = _cloner.Clone(locationDetails.StaticAmmo); // Pull location-specific spawn limits from db - var itemsWithSpawnCountLimitsClone = _cloner.Clone(_locationConfig.LootMaxSpawnLimits.GetValueOrDefault(locationId.ToLower())); + var itemsWithSpawnCountLimitsClone = _cloner.Clone( + _locationConfig.LootMaxSpawnLimits.GetValueOrDefault(locationId.ToLower()) + ); // Store items with spawn count limits inside so they can be accessed later inside static/dynamic loot spawn methods counterTrackerHelper.AddDataToTrack(itemsWithSpawnCountLimitsClone); // Create containers with loot - result.AddRange(GenerateStaticContainers( - locationId.ToLower(), - staticAmmoDist - )); + result.AddRange(GenerateStaticContainers(locationId.ToLower(), staticAmmoDist)); // Add dynamic loot to output loot var dynamicSpawnPoints = GenerateDynamicLoot( diff --git a/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs b/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs index 2b6e2fbe..4fd0f9de 100644 --- a/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs @@ -357,7 +357,6 @@ public class LocationLifecycleService } } - /// /// Generate a maps base location (cloned) and loot /// @@ -395,8 +394,8 @@ public class LocationLifecycleService // Adjust raid values based raid type (e.g. Scav or PMC) LocationConfig? locationConfigClone = null; var raidAdjustments = _profileActivityService - .GetProfileActivityRaidData(sessionId)? - .RaidAdjustments; + .GetProfileActivityRaidData(sessionId) + ?.RaidAdjustments; if (raidAdjustments is not null) { locationConfigClone = _cloner.Clone(_locationConfig); // Clone values so they can be used to reset originals later @@ -584,7 +583,7 @@ public class LocationLifecycleService // Check if new standing has leveled up trader _traderHelper.LevelUp(fenceId, pmcData); pmcData.TradersInfo[fenceId].LoyaltyLevel = Math.Max( - (int) pmcData.TradersInfo[fenceId].LoyaltyLevel, + (int)pmcData.TradersInfo[fenceId].LoyaltyLevel, 1 ); @@ -622,7 +621,7 @@ public class LocationLifecycleService // Check if new standing has leveled up trader _traderHelper.LevelUp(fenceId, pmcData); pmcData.TradersInfo[fenceId].LoyaltyLevel = Math.Max( - (int) pmcData.TradersInfo[fenceId].LoyaltyLevel, + (int)pmcData.TradersInfo[fenceId].LoyaltyLevel, 1 ); @@ -654,7 +653,7 @@ public class LocationLifecycleService fenceStanding += Math.Max(baseGain / extractCount, 0.01); // Ensure fence loyalty level is not above/below the range -7 to 15 - var newFenceStanding = Math.Min(Math.Max((double) fenceStanding, -7), 15); + var newFenceStanding = Math.Min(Math.Max((double)fenceStanding, -7), 15); _logger.Debug( $"Old vs new fence standing: {pmcData.TradersInfo[fenceId].Standing}, {newFenceStanding}" ); @@ -958,7 +957,7 @@ public class LocationLifecycleService // Clamp fence standing var currentFenceStanding = postRaidProfile.TradersInfo[fenceId].Standing; pmcProfile.TradersInfo[fenceId].Standing = Math.Min( - Math.Max((double) currentFenceStanding, -7), + Math.Max((double)currentFenceStanding, -7), 15 ); // Ensure it stays between -7 and 15