From 99fb4bb5fc2c60c17a762727e32cf06517466a63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Gim=C3=A9nez?= Date: Tue, 4 Jun 2024 22:44:38 +0900 Subject: [PATCH] don't read equipped items from other players --- pkg/memory/item.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pkg/memory/item.go b/pkg/memory/item.go index f63387a..5ff8c61 100644 --- a/pkg/memory/item.go +++ b/pkg/memory/item.go @@ -126,12 +126,16 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD break } case 1: - location = item.LocationEquipped - if itm.Type().Code == item.TypeBelt { - belt.Name = itm.Name + if data.UnitID(itemOwnerNPC) == mainPlayer.UnitID || itemOwnerNPC == 1 { + location = item.LocationEquipped + if itm.Type().Code == item.TypeBelt { + belt.Name = itm.Name + } } case 2: - location = item.LocationBelt + if data.UnitID(itemOwnerNPC) == mainPlayer.UnitID || itemOwnerNPC == 1 { + location = item.LocationBelt + } case 3, 5: location = item.LocationGround case 6: