mirror of
https://github.com/sp-tarkov/server.git
synced 2025-02-13 06:30:43 -05:00
prevent null ConflictingItems from causing isItemIncompatibleWithCurrentItems() to error
This commit is contained in:
parent
de1b33b963
commit
488b9f5f1a
@ -246,7 +246,7 @@ export class BotGeneratorHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if any of the current inventory templates have the incoming item defined as incompatible
|
// Check if any of the current inventory templates have the incoming item defined as incompatible
|
||||||
blockingItem = equippedItems.find(x => x._props.ConflictingItems.includes(tplToCheck));
|
blockingItem = equippedItems.find(x => x._props.ConflictingItems?.includes(tplToCheck));
|
||||||
if (blockingItem)
|
if (blockingItem)
|
||||||
{
|
{
|
||||||
//this.logger.warning(`2 incompatibility found between - ${itemToEquip[1]._name} and ${blockingItem._props.Name} - ${equipmentSlot}`);
|
//this.logger.warning(`2 incompatibility found between - ${itemToEquip[1]._name} and ${blockingItem._props.Name} - ${equipmentSlot}`);
|
||||||
@ -254,7 +254,7 @@ export class BotGeneratorHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if the incoming item has any inventory items defined as incompatible
|
// Check if the incoming item has any inventory items defined as incompatible
|
||||||
const blockingInventoryItem = items.find(x => itemToEquip[1]._props[`Blocks${x.slotId}`] || itemToEquip[1]._props.ConflictingItems.includes(x._tpl));
|
const blockingInventoryItem = items.find(x => itemToEquip[1]._props[`Blocks${x.slotId}`] || itemToEquip[1]._props.ConflictingItems?.includes(x._tpl));
|
||||||
if (blockingInventoryItem)
|
if (blockingInventoryItem)
|
||||||
{
|
{
|
||||||
//this.logger.warning(`3 incompatibility found between - ${itemToEquip[1]._name} and ${blockingInventoryItem._tpl} - ${equipmentSlot}`)
|
//this.logger.warning(`3 incompatibility found between - ${itemToEquip[1]._name} and ${blockingInventoryItem._tpl} - ${equipmentSlot}`)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user