Replaced lists containing unique values with HashSets

Reworked Soft Insert id checks

Improved dogtag id lookup memory usage

Removed wave cleanup code
This commit is contained in:
Chomp
2025-02-17 19:05:47 +00:00
parent ea7b3919c0
commit 1ff8d2cbef
58 changed files with 228 additions and 246 deletions
@@ -733,9 +733,8 @@ public class InsuranceController(
*/
public void InsureSoftInserts(Item itemWithSoftInserts, PmcData pmcData, InsureRequestData body)
{
var softInsertIds = _itemHelper.GetSoftInsertSlotIds();
var softInsertSlots = pmcData.Inventory.Items.Where(
item => item.ParentId == itemWithSoftInserts.Id && softInsertIds.Contains(item.SlotId.ToLower())
item => item.ParentId == itemWithSoftInserts.Id && _itemHelper.IsSoftInsertId(item.SlotId.ToLower())
);
foreach (var softInsertSlot in softInsertSlots)