diff --git a/Build.props b/Build.props index fe2a13ef..fc2d5693 100644 --- a/Build.props +++ b/Build.props @@ -1,7 +1,7 @@ - 4.0.8 + 4.0.9 a12b34 0000000000 LOCAL diff --git a/Libraries/SPTarkov.Server.Assets/SPT_Data/database/globals.json b/Libraries/SPTarkov.Server.Assets/SPT_Data/database/globals.json index a44a6abb..3bd17bcd 100644 --- a/Libraries/SPTarkov.Server.Assets/SPT_Data/database/globals.json +++ b/Libraries/SPTarkov.Server.Assets/SPT_Data/database/globals.json @@ -35191,6 +35191,7 @@ ], "active": false, "activePVE": false, + "initialFrozenDelaySec": 60, "applyFrozenEverySec": 1, "consumables": [ "67586bee39b1b82b0d0f9d06" diff --git a/Libraries/SPTarkov.Server.Core/Controllers/DialogueController.cs b/Libraries/SPTarkov.Server.Core/Controllers/DialogueController.cs index bbc02015..9edc2b95 100644 --- a/Libraries/SPTarkov.Server.Core/Controllers/DialogueController.cs +++ b/Libraries/SPTarkov.Server.Core/Controllers/DialogueController.cs @@ -396,7 +396,8 @@ public class DialogueController( var checkTime = message.DateTime + (message.MaxStorageTime ?? 0); return timeNow < checkTime; }) - .ToList() ?? []; + .ToList() + ?? []; } /// diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs index 0afef244..db77bbd6 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs @@ -1822,7 +1822,8 @@ public class BotEquipmentModGenerator( .Filter.All(tpl => itemHelper.IsOfBaseclasses(tpl, whitelistedSightTypes) || itemHelper.IsOfBaseclass(tpl, BaseClasses.MOUNT) ) - ) ?? false + ) + ?? false ) // Add mod to allowed list { diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs index 47fff35e..ec97d83f 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/BotWeaponGenerator.cs @@ -716,10 +716,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/Globals.cs b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Globals.cs index 3c00b320..3072e33c 100644 --- a/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Globals.cs +++ b/Libraries/SPTarkov.Server.Core/Models/Eft/Common/Globals.cs @@ -648,6 +648,9 @@ public record RunddansSettings [JsonPropertyName("applyFrozenEverySec")] public double ApplyFrozenEverySec { get; set; } + [JsonPropertyName("initialFrozenDelaySec")] + public double InitialFrozenDelaySec { get; set; } + [JsonPropertyName("consumables")] public IEnumerable Consumables { get; set; } diff --git a/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs b/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs index 3b17ae59..5230ef34 100644 --- a/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/LocationLifecycleService.cs @@ -104,10 +104,10 @@ public class LocationLifecycleService( ServerSettings = databaseService.GetLocationServices(), // TODO - is this per map or global? Profile = new ProfileInsuredItems { InsuredItems = playerProfile.CharacterData.PmcData.InsuredItems }, LocationLoot = GenerateLocationAndLoot(sessionId, request.Location, !request.ShouldSkipLootGeneration ?? true), - TransitionType = TransitionType.NONE, + TransitionType = request.TransitionType, Transition = new Transition { - TransitionType = TransitionType.NONE, + TransitionType = request.TransitionType, TransitionRaidId = new MongoId(), TransitionCount = 0, VisitedLocations = [], @@ -128,7 +128,7 @@ public class LocationLifecycleService( if (transitionData is not null) { logger.Success($"Player: {sessionId} is in transit to {request.Location}"); - result.Transition.TransitionType = TransitionType.COMMON; + result.Transition.TransitionType = request.TransitionType; result.Transition.TransitionRaidId = transitionData.TransitionRaidId; result.Transition.TransitionCount += 1; diff --git a/Libraries/SPTarkov.Server.Core/Services/ProfileFixerService.cs b/Libraries/SPTarkov.Server.Core/Services/ProfileFixerService.cs index 7404d328..7318044d 100644 --- a/Libraries/SPTarkov.Server.Core/Services/ProfileFixerService.cs +++ b/Libraries/SPTarkov.Server.Core/Services/ProfileFixerService.cs @@ -585,7 +585,9 @@ public class ProfileFixerService( if (profileBonus is null) { // No bonus in profile, add it - logger.Debug($"Profile has level: {currentLevel} area: {profileArea.Type} but no bonus found, adding: {bonus.Type}"); + logger.Debug( + $"Profile has level: {currentLevel} area: {profileArea.Type} but no bonus found, adding: {bonus.Type}" + ); hideoutHelper.ApplyPlayerUpgradesBonus(pmcProfile, bonus); } }