don't read equipped items from other players

This commit is contained in:
Héctor Giménez
2024-06-04 22:44:38 +09:00
parent 019cd9a62d
commit 99fb4bb5fc

View File

@@ -126,12 +126,16 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD
break break
} }
case 1: case 1:
location = item.LocationEquipped if data.UnitID(itemOwnerNPC) == mainPlayer.UnitID || itemOwnerNPC == 1 {
if itm.Type().Code == item.TypeBelt { location = item.LocationEquipped
belt.Name = itm.Name if itm.Type().Code == item.TypeBelt {
belt.Name = itm.Name
}
} }
case 2: case 2:
location = item.LocationBelt if data.UnitID(itemOwnerNPC) == mainPlayer.UnitID || itemOwnerNPC == 1 {
location = item.LocationBelt
}
case 3, 5: case 3, 5:
location = item.LocationGround location = item.LocationGround
case 6: case 6: