FIx armor filtering code to correctly return non-armored rigs when requested

This commit is contained in:
Dev 2024-02-03 14:00:47 +00:00
parent 8d2eaf2485
commit 164bf08b08
3 changed files with 3 additions and 3 deletions

View File

@ -290,7 +290,7 @@ export class BotInventoryGenerator
const tacVestsWithoutArmor = Object.entries(templateInventory.equipment.TacticalVest).reduce( const tacVestsWithoutArmor = Object.entries(templateInventory.equipment.TacticalVest).reduce(
(newVestDictionary, [tplKey]) => (newVestDictionary, [tplKey]) =>
{ {
if (this.itemHelper.itemHasSlots(tplKey)) if (!this.itemHelper.itemHasSlots(tplKey))
{ {
newVestDictionary[tplKey] = templateInventory.equipment.TacticalVest[tplKey]; newVestDictionary[tplKey] = templateInventory.equipment.TacticalVest[tplKey];
} }

View File

@ -200,7 +200,7 @@ export class BotWeaponGenerator
} }
// Fill existing magazines to full and sync ammo type // Fill existing magazines to full and sync ammo type
for (const magazine of weaponWithModsArray.filter((x) => x.slotId === this.modMagazineSlotId)) for (const magazine of weaponWithModsArray.filter((item) => item.slotId === this.modMagazineSlotId))
{ {
this.fillExistingMagazines(weaponWithModsArray, magazine, ammoTpl); this.fillExistingMagazines(weaponWithModsArray, magazine, ammoTpl);
} }

View File

@ -361,7 +361,7 @@ export class QuestHelper
// Remap target id to the new presets root id // Remap target id to the new presets root id
questReward.target = rootItem._id; questReward.target = rootItem._id;
// Copy over stack count // Copy over stack count otherwise reward shows as missing in client
if (!rootItem.upd) if (!rootItem.upd)
{ {
rootItem.upd = {}; rootItem.upd = {};