0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00
This commit is contained in:
Dev 2024-05-23 11:19:55 +01:00
commit c57d2ccf82
2 changed files with 9 additions and 0 deletions

View File

@ -4,4 +4,5 @@ export interface IInsuredItemsData
durability?: number
maxDurability?: number
hits?: number
usedInQuest: boolean
}

View File

@ -251,6 +251,14 @@ export class InsuranceService
// equipment slot.
const equipmentParentItem = this.itemHelper.getEquipmentParent(preRaidItem._id, preRaidGearMap);
const offraidDataitem = offraidData.insurance?.find(
(insuranceItem) => insuranceItem.id === insuredItem.itemId);
if (offraidDataitem?.usedInQuest)
{
continue;
}
// Now that we have the equipment parent item, we can check to see if that item is located in an equipment
// slot that is flagged as lost on death. If it is, then the itemShouldBeLostOnDeath.
const itemShouldBeLostOnDeath = this.lostOnDeathConfig.equipment[equipmentParentItem?.slotId] ?? true;