itemprices: fix showing high alch profit with show ha value disabled

Co-authored-by: Adam <Adam@sigterm.info>
This commit is contained in:
gregg1494
2019-06-18 19:56:08 -06:00
committed by Adam
parent a7d4444998
commit b05835fb32

View File

@@ -195,6 +195,7 @@ class ItemPricesOverlay extends Overlay
int gePrice = 0; int gePrice = 0;
int haPrice = 0; int haPrice = 0;
int haProfit = 0; int haProfit = 0;
final int itemHaPrice = Math.round(itemDef.getPrice() * Constants.HIGH_ALCHEMY_MULTIPLIER);
if (config.showGEPrice()) if (config.showGEPrice())
{ {
@@ -202,11 +203,11 @@ class ItemPricesOverlay extends Overlay
} }
if (config.showHAValue()) 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) if (gePrice > 0 || haPrice > 0)