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
}
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: