Second attempt at fixing prestige issue #558

This commit is contained in:
Chomp
2025-08-19 12:04:15 +01:00
parent 22ab053cda
commit 7eb88646f2
2 changed files with 18 additions and 13 deletions
@@ -82,7 +82,18 @@ public class PlayerScavGenerator(
pmcDataClone
);
// Remove cached bot data after scav was generated
// Add additional items to player scav as loot
AddAdditionalLootToPlayerScavContainers(
scavData.Id.Value,
playerScavKarmaSettings.LootItemsToAddChancePercent,
scavData,
[EquipmentSlots.TacticalVest, EquipmentSlots.Pockets, EquipmentSlots.Backpack]
);
// No need for cache data, clear up
botInventoryContainerService.ClearCache(scavData.Id.Value);
// Remove cached bot loot cache now scav is generated
botLootCacheService.ClearCache();
// Add scav metadata
@@ -112,17 +123,6 @@ public class PlayerScavGenerator(
scavData.WishList = existingScavDataClone.WishList ?? new();
scavData.Encyclopedia = pmcDataClone.Encyclopedia ?? new();
// Add additional items to player scav as loot
AddAdditionalLootToPlayerScavContainers(
scavData.Id.Value,
playerScavKarmaSettings.LootItemsToAddChancePercent,
scavData,
[EquipmentSlots.TacticalVest, EquipmentSlots.Pockets, EquipmentSlots.Backpack]
);
// No need for cache data, clear up
botInventoryContainerService.ClearCache(scavData.Id.Value);
// Remove secure container
scavData = profileHelper.RemoveSecureContainer(scavData);