QuestitemInsurance (!350)
Add ability to tell if we planted the item at a quest location (fishing gear, SV98) and dont return it with insurance Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/350 Co-authored-by: Kaeno <kaeno@noreply.dev.sp-tarkov.com> Co-committed-by: Kaeno <kaeno@noreply.dev.sp-tarkov.com>
This commit is contained in:
parent
4081508bf3
commit
c0d3c5384f
@ -4,4 +4,5 @@ export interface IInsuredItemsData
|
|||||||
durability?: number
|
durability?: number
|
||||||
maxDurability?: number
|
maxDurability?: number
|
||||||
hits?: number
|
hits?: number
|
||||||
|
usedInQuest: boolean
|
||||||
}
|
}
|
||||||
|
@ -251,6 +251,14 @@ export class InsuranceService
|
|||||||
// equipment slot.
|
// equipment slot.
|
||||||
const equipmentParentItem = this.itemHelper.getEquipmentParent(preRaidItem._id, preRaidGearMap);
|
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
|
// 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.
|
// slot that is flagged as lost on death. If it is, then the itemShouldBeLostOnDeath.
|
||||||
const itemShouldBeLostOnDeath = this.lostOnDeathConfig.equipment[equipmentParentItem?.slotId] ?? true;
|
const itemShouldBeLostOnDeath = this.lostOnDeathConfig.equipment[equipmentParentItem?.slotId] ?? true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user