mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 09:50:43 -05:00
Fixed randomiseArmorInsertsDurabilities
not removing plate slots that have been chosen to be removed from fence armors
This commit is contained in:
parent
a7bc9c9849
commit
1ffa0678e9
@ -1116,8 +1116,7 @@ export class FenceService {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
let armorWithMods = armorItemAndMods;
|
const armorWithMods = armorItemAndMods;
|
||||||
|
|
||||||
const modItemDbDetails = this.itemHelper.getItem(plateTpl)[1];
|
const modItemDbDetails = this.itemHelper.getItem(plateTpl)[1];
|
||||||
|
|
||||||
// Chance to remove plate
|
// Chance to remove plate
|
||||||
@ -1125,7 +1124,7 @@ export class FenceService {
|
|||||||
this.traderConfig.fence.chancePlateExistsInArmorPercent[modItemDbDetails._props?.armorClass ?? "3"];
|
this.traderConfig.fence.chancePlateExistsInArmorPercent[modItemDbDetails._props?.armorClass ?? "3"];
|
||||||
if (!this.randomUtil.getChance100(plateExistsChance)) {
|
if (!this.randomUtil.getChance100(plateExistsChance)) {
|
||||||
// Remove plate from armor
|
// Remove plate from armor
|
||||||
armorWithMods = armorItemAndMods.filter(
|
armorItemAndMods = armorItemAndMods.filter(
|
||||||
(item) => item.slotId.toLowerCase() !== plateSlot._name.toLowerCase(),
|
(item) => item.slotId.toLowerCase() !== plateSlot._name.toLowerCase(),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user