From b05835fb320c4ba9b9ef62c04b676f44e4994fee Mon Sep 17 00:00:00 2001 From: gregg1494 Date: Tue, 18 Jun 2019 19:56:08 -0600 Subject: [PATCH] itemprices: fix showing high alch profit with show ha value disabled Co-authored-by: Adam --- .../client/plugins/itemprices/ItemPricesOverlay.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemprices/ItemPricesOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemprices/ItemPricesOverlay.java index e6f5f49ddc..5682a6f2b2 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemprices/ItemPricesOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemprices/ItemPricesOverlay.java @@ -195,6 +195,7 @@ class ItemPricesOverlay extends Overlay int gePrice = 0; int haPrice = 0; int haProfit = 0; + final int itemHaPrice = Math.round(itemDef.getPrice() * Constants.HIGH_ALCHEMY_MULTIPLIER); if (config.showGEPrice()) { @@ -202,11 +203,11 @@ class ItemPricesOverlay extends Overlay } if (config.showHAValue()) { - haPrice = Math.round(itemDef.getPrice() * Constants.HIGH_ALCHEMY_MULTIPLIER); + haPrice = itemHaPrice; } - if (gePrice > 0 && haPrice > 0 && config.showAlchProfit()) + if (gePrice > 0 && itemHaPrice > 0 && config.showAlchProfit()) { - haProfit = calculateHAProfit(haPrice, gePrice); + haProfit = calculateHAProfit(itemHaPrice, gePrice); } if (gePrice > 0 || haPrice > 0)