Skip to content

Commit

Permalink
fix unexpected bag error by not keeping broken ItemLocationMixins
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexFolland committed Nov 27, 2024
1 parent 8d1bbc4 commit 0ae7b02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions AutoGear.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3445,6 +3445,9 @@ function AutoGearReadItemInfo(inventoryID, lootRollID, container, slot, questRew

info.id = info.item:GetItemID()
info.itemLocation = info.item and info.item.HasItemLocation and info.item:HasItemLocation() and info.item:GetItemLocation()
if not (info.itemLocation and info.itemLocation.IsValid and info.itemLocation:IsValid() and info.itemLocation:HasAnyLocation()) then
info.itemLocation = nil
end
if not info.id then
AutoGearPrint("Error: "..tostring(info.name or "nil").." doesn't have an item ID",3)
AutoGearPrint(
Expand Down

0 comments on commit 0ae7b02

Please sign in to comment.