update item owner
This commit is contained in:
@@ -14,18 +14,15 @@ type Inventory struct {
|
||||
StashedGold [6]int // [0]=personal, [1..5]=shared stash pages
|
||||
SharedStashPages int // Number of shared stash units detected (3=non-DLC, 5+=DLC)
|
||||
PlayerID UnitID // Number of shared stash units detected (3=non-DLC, 5+=DLC)
|
||||
MercID UnitID
|
||||
}
|
||||
|
||||
func (i Inventory) isMatchOwner(it Item) bool {
|
||||
if it.Location.LocationType == item.LocationUnknown ||
|
||||
it.Location.LocationType == item.LocationGround || it.Location.LocationType == item.LocationVendor {
|
||||
it.Location.LocationType == item.LocationGround ||
|
||||
it.Location.LocationType == item.LocationMercenary || it.Location.LocationType == item.LocationVendor {
|
||||
return true
|
||||
}
|
||||
|
||||
if it.Location.LocationType == item.LocationMercenary {
|
||||
return i.MercID != 0 && it.Owner == i.MercID
|
||||
}
|
||||
return it.Owner == i.PlayerID
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user