diff --git a/src/main/java/net/nikr/eve/jeveasset/data/api/raw/RawAsset.java b/src/main/java/net/nikr/eve/jeveasset/data/api/raw/RawAsset.java index 66f8d71fe..29a77062b 100644 --- a/src/main/java/net/nikr/eve/jeveasset/data/api/raw/RawAsset.java +++ b/src/main/java/net/nikr/eve/jeveasset/data/api/raw/RawAsset.java @@ -21,6 +21,7 @@ package net.nikr.eve.jeveasset.data.api.raw; import java.util.Objects; +import net.nikr.eve.jeveasset.data.api.accounts.OwnerType; import net.nikr.eve.jeveasset.data.api.my.MyContractItem; import net.nikr.eve.jeveasset.data.api.my.MyIndustryJob; import net.nikr.eve.jeveasset.data.api.my.MyIndustryJob.IndustryActivity; @@ -229,10 +230,14 @@ public RawAsset(CorporationAssetsResponse asset) { * * @param implantType * @param implantLocation + * @param implantOwner */ - public RawAsset(Integer implantType, Long implantLocation) { + public RawAsset(Integer implantType, Long implantLocation, OwnerType implantOwner) { isSingleton = true; //Unpacked - itemId = Long.valueOf(implantType + "" + implantLocation); + long ownerId = implantOwner.getOwnerID(); + String combinedId = implantType + "" + implantLocation + "" + ownerId; + long hashedId = (long) combinedId.hashCode(); + itemId = hashedId; itemFlag = PLUGGED_IMPLANT_FLAG; locationId = implantLocation; quantity = 1; //Plugged in AKA always 1 diff --git a/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiConverter.java b/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiConverter.java index 8eed50214..9833c571a 100644 --- a/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiConverter.java +++ b/src/main/java/net/nikr/eve/jeveasset/io/esi/EsiConverter.java @@ -137,7 +137,7 @@ public static MyAsset toAssetsShip(CharacterShipResponse shipType, CharacterLoca } public static MyAsset toAssetsImplant(Integer implantType, Long implantLocation, OwnerType owner) { - return toMyAsset(new RawAsset(implantType, implantLocation), owner, new ArrayList<>()); + return toMyAsset(new RawAsset(implantType, implantLocation, owner), owner, new ArrayList<>()); } public static MyAsset toAssetsPlanetaryInteraction(CharacterPlanetsResponse planet, PlanetPin pin, OwnerType owner) {