fix: ignore fake items
This commit is contained in:
@@ -193,13 +193,14 @@ class Dumper
|
||||
if (!TryGetProp(props, "Type", out EInventoryItemType itemType)
|
||||
|| !TryGetProp(props, "UIData", out FStructFallback uiDataFb)
|
||||
|| !TryGetProp(props, "Role", out EPlayerRole role)
|
||||
|| !TryGetProp(props, "Inventory", out bool isInventory))
|
||||
throw new KeyNotFoundException("Type, UIData, Role or Inventory was not found.");
|
||||
|| !TryGetProp(props, "Inventory", out bool isInventory)
|
||||
|| !TryGetProp(props, "IsFakeItem", out bool isFakeItem)
|
||||
)
|
||||
throw new KeyNotFoundException("Type, UIData, Role, Inventory or IsFakeItem was not found.");
|
||||
|
||||
UIDataStruct uiData = uiDataFb.MapToStruct<UIDataStruct>();
|
||||
|
||||
// ignore powers, slasher and challenge related items
|
||||
if (!isInventory || itemType != EInventoryItemType.Item || role != EPlayerRole.VE_Camper)
|
||||
if (isFakeItem || !isInventory || itemType != EInventoryItemType.Item || role != EPlayerRole.VE_Camper)
|
||||
{
|
||||
_log.Verbose("Ignoring invalid item ({0})", itemId);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user