ge plugin: use int for ha value

This commit is contained in:
Adam
2021-03-15 20:28:57 -04:00
parent 19cc5dc461
commit 2725e0452f
3 changed files with 6 additions and 5 deletions

View File

@@ -51,8 +51,8 @@ class GrandExchangeItemPanel extends JPanel
{
private static final Dimension ICON_SIZE = new Dimension(32, 32);
GrandExchangeItemPanel(AsyncBufferedImage icon, String name, int itemID, int gePrice, Double
haPrice, int geItemLimit)
GrandExchangeItemPanel(AsyncBufferedImage icon, String name, int itemID,
int gePrice, int haPrice, int geItemLimit)
{
BorderLayout layout = new BorderLayout();
layout.setHgap(5);
@@ -138,7 +138,7 @@ class GrandExchangeItemPanel extends JPanel
// Alch price
JLabel haPriceLabel = new JLabel();
haPriceLabel.setText(QuantityFormatter.formatNumber(haPrice.intValue()) + " alch");
haPriceLabel.setText(QuantityFormatter.formatNumber(haPrice) + " alch");
haPriceLabel.setForeground(ColorScheme.GRAND_EXCHANGE_ALCH);
alchAndLimitPanel.add(haPriceLabel, BorderLayout.WEST);

View File

@@ -34,6 +34,6 @@ class GrandExchangeItems
private final String name;
private final int itemId;
private final int gePrice;
private final double haPrice;
private final int haPrice;
private final int geItemLimit;
}

View File

@@ -215,9 +215,10 @@ class GrandExchangeSearchPanel extends JPanel
int itemPrice = useActivelyTradedPrice && item.getWikiPrice() > 0 ? item.getWikiPrice() : item.getPrice();
int itemLimit = itemStats != null ? itemStats.getGeLimit() : 0;
final int haPrice = itemComp.getHaPrice();
AsyncBufferedImage itemImage = itemManager.getImage(itemId);
itemsList.add(new GrandExchangeItems(itemImage, item.getName(), itemId, itemPrice, itemComp.getPrice() * 0.6, itemLimit));
itemsList.add(new GrandExchangeItems(itemImage, item.getName(), itemId, itemPrice, haPrice, itemLimit));
// If using hotkey to lookup item, stop after finding match.
if (exactMatch && item.getName().equalsIgnoreCase(lookup))