Skip to content

Commit

Permalink
Merge branch 'develop' into asset-log
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenGnu committed Dec 20, 2024
2 parents d7ba13a + 41647cf commit 397605e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 397605e

Please sign in to comment.