ge plugin: use int for ha value
This commit is contained in:
@@ -51,8 +51,8 @@ class GrandExchangeItemPanel extends JPanel
|
|||||||
{
|
{
|
||||||
private static final Dimension ICON_SIZE = new Dimension(32, 32);
|
private static final Dimension ICON_SIZE = new Dimension(32, 32);
|
||||||
|
|
||||||
GrandExchangeItemPanel(AsyncBufferedImage icon, String name, int itemID, int gePrice, Double
|
GrandExchangeItemPanel(AsyncBufferedImage icon, String name, int itemID,
|
||||||
haPrice, int geItemLimit)
|
int gePrice, int haPrice, int geItemLimit)
|
||||||
{
|
{
|
||||||
BorderLayout layout = new BorderLayout();
|
BorderLayout layout = new BorderLayout();
|
||||||
layout.setHgap(5);
|
layout.setHgap(5);
|
||||||
@@ -138,7 +138,7 @@ class GrandExchangeItemPanel extends JPanel
|
|||||||
|
|
||||||
// Alch price
|
// Alch price
|
||||||
JLabel haPriceLabel = new JLabel();
|
JLabel haPriceLabel = new JLabel();
|
||||||
haPriceLabel.setText(QuantityFormatter.formatNumber(haPrice.intValue()) + " alch");
|
haPriceLabel.setText(QuantityFormatter.formatNumber(haPrice) + " alch");
|
||||||
haPriceLabel.setForeground(ColorScheme.GRAND_EXCHANGE_ALCH);
|
haPriceLabel.setForeground(ColorScheme.GRAND_EXCHANGE_ALCH);
|
||||||
alchAndLimitPanel.add(haPriceLabel, BorderLayout.WEST);
|
alchAndLimitPanel.add(haPriceLabel, BorderLayout.WEST);
|
||||||
|
|
||||||
|
|||||||
@@ -34,6 +34,6 @@ class GrandExchangeItems
|
|||||||
private final String name;
|
private final String name;
|
||||||
private final int itemId;
|
private final int itemId;
|
||||||
private final int gePrice;
|
private final int gePrice;
|
||||||
private final double haPrice;
|
private final int haPrice;
|
||||||
private final int geItemLimit;
|
private final int geItemLimit;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,9 +215,10 @@ class GrandExchangeSearchPanel extends JPanel
|
|||||||
|
|
||||||
int itemPrice = useActivelyTradedPrice && item.getWikiPrice() > 0 ? item.getWikiPrice() : item.getPrice();
|
int itemPrice = useActivelyTradedPrice && item.getWikiPrice() > 0 ? item.getWikiPrice() : item.getPrice();
|
||||||
int itemLimit = itemStats != null ? itemStats.getGeLimit() : 0;
|
int itemLimit = itemStats != null ? itemStats.getGeLimit() : 0;
|
||||||
|
final int haPrice = itemComp.getHaPrice();
|
||||||
AsyncBufferedImage itemImage = itemManager.getImage(itemId);
|
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 using hotkey to lookup item, stop after finding match.
|
||||||
if (exactMatch && item.getName().equalsIgnoreCase(lookup))
|
if (exactMatch && item.getName().equalsIgnoreCase(lookup))
|
||||||
|
|||||||
Reference in New Issue
Block a user