From b685ee4c05e1babfb9651683877ad8d23043ec16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Gim=C3=A9nez?= Date: Mon, 20 May 2024 21:28:44 +0900 Subject: [PATCH] better logic to detect when an item is in the backpack --- pkg/memory/item.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/memory/item.go b/pkg/memory/item.go index cef5ff8..d9224be 100644 --- a/pkg/memory/item.go +++ b/pkg/memory/item.go @@ -115,11 +115,12 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD if 0x00002000&flags != 0 && itemOwnerNPC == 4294967295 { location = item.LocationVendor break - } else if invPage == 0 { - location = item.LocationInventory - break } if data.UnitID(itemOwnerNPC) == mainPlayer.UnitID || itemOwnerNPC == 1 { + if invPage == 0 { + location = item.LocationInventory + break + } location = item.LocationStash invPage = 0 break