Skip to content

Commit 0ae7b02

Browse files
committed
fix unexpected bag error by not keeping broken ItemLocationMixins
1 parent 8d1bbc4 commit 0ae7b02

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

AutoGear.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3445,6 +3445,9 @@ function AutoGearReadItemInfo(inventoryID, lootRollID, container, slot, questRew
34453445

34463446
info.id = info.item:GetItemID()
34473447
info.itemLocation = info.item and info.item.HasItemLocation and info.item:HasItemLocation() and info.item:GetItemLocation()
3448+
if not (info.itemLocation and info.itemLocation.IsValid and info.itemLocation:IsValid() and info.itemLocation:HasAnyLocation()) then
3449+
info.itemLocation = nil
3450+
end
34483451
if not info.id then
34493452
AutoGearPrint("Error: "..tostring(info.name or "nil").." doesn't have an item ID",3)
34503453
AutoGearPrint(

0 commit comments

Comments
 (0)