Revert "fixed error where itemlocation can be either a string or int"

This commit is contained in:
Chomp
2025-04-29 08:47:44 +01:00
committed by GitHub
parent 370de0250f
commit 760f3e3c72
3 changed files with 21 additions and 100 deletions
@@ -842,8 +842,15 @@ public class InventoryHelper(
// Check each item in container
foreach (var item in containerItemHash)
{
var itemLocation = ItemHelper.TryParseItemLocation(item);
ItemLocation? itemLocation;
if (item.Location is JsonElement)
{
itemLocation = ((JsonElement) item.Location).ToObject<ItemLocation>();
}
else
{
itemLocation = (ItemLocation) item.Location;
}
if (itemLocation is null)
{