better logic to detect when an item is in the backpack

This commit is contained in:
Héctor Giménez
2024-05-20 21:28:44 +09:00
parent 079df7a6ac
commit b685ee4c05

View File

@@ -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