fixed error where itemlocation can be either a string or int
This commit is contained in:
@@ -842,15 +842,8 @@ public class InventoryHelper(
|
||||
// Check each item in container
|
||||
foreach (var item in containerItemHash)
|
||||
{
|
||||
ItemLocation? itemLocation;
|
||||
if (item.Location is JsonElement)
|
||||
{
|
||||
itemLocation = ((JsonElement) item.Location).ToObject<ItemLocation>();
|
||||
}
|
||||
else
|
||||
{
|
||||
itemLocation = (ItemLocation) item.Location;
|
||||
}
|
||||
|
||||
var (itemLocation, _) = ItemHelper.TryParseItemLocation(item);
|
||||
|
||||
if (itemLocation is null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user