loot tracker: rename price to gePrice
This commit is contained in:
@@ -261,7 +261,7 @@ class LootTrackerBox extends JPanel
|
||||
continue;
|
||||
}
|
||||
|
||||
totalPrice += entry.getPrice();
|
||||
totalPrice += entry.getGePrice();
|
||||
|
||||
int quantity = 0;
|
||||
for (final LootTrackerItem i : items)
|
||||
@@ -277,9 +277,9 @@ class LootTrackerBox extends JPanel
|
||||
if (quantity > 0)
|
||||
{
|
||||
int newQuantity = entry.getQuantity() + quantity;
|
||||
long pricePerItem = entry.getPrice() == 0 ? 0 : (entry.getPrice() / entry.getQuantity());
|
||||
long gePricePerItem = entry.getGePrice() == 0 ? 0 : (entry.getGePrice() / entry.getQuantity());
|
||||
|
||||
items.add(new LootTrackerItem(entry.getId(), entry.getName(), newQuantity, pricePerItem * newQuantity, entry.isIgnored()));
|
||||
items.add(new LootTrackerItem(entry.getId(), entry.getName(), newQuantity, gePricePerItem * newQuantity, entry.isIgnored()));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -287,7 +287,7 @@ class LootTrackerBox extends JPanel
|
||||
}
|
||||
}
|
||||
|
||||
items.sort((i1, i2) -> Long.compare(i2.getPrice(), i1.getPrice()));
|
||||
items.sort((i1, i2) -> Long.compare(i2.getGePrice(), i1.getGePrice()));
|
||||
|
||||
// Calculates how many rows need to be display to fit all items
|
||||
final int rowSize = ((items.size() % ITEMS_PER_ROW == 0) ? 0 : 1) + items.size() / ITEMS_PER_ROW;
|
||||
@@ -352,8 +352,8 @@ class LootTrackerBox extends JPanel
|
||||
{
|
||||
final String name = item.getName();
|
||||
final int quantity = item.getQuantity();
|
||||
final long price = item.getPrice();
|
||||
final long gePrice = item.getGePrice();
|
||||
final String ignoredLabel = item.isIgnored() ? " - Ignored" : "";
|
||||
return name + " x " + quantity + " (" + QuantityFormatter.quantityToStackSize(price) + ") " + ignoredLabel;
|
||||
return name + " x " + quantity + " (" + QuantityFormatter.quantityToStackSize(gePrice) + ") " + ignoredLabel;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ class LootTrackerItem
|
||||
@Getter
|
||||
private final int quantity;
|
||||
@Getter
|
||||
private final long price;
|
||||
private final long gePrice;
|
||||
@Getter
|
||||
@Setter
|
||||
private boolean ignored;
|
||||
|
||||
@@ -613,7 +613,7 @@ class LootTrackerPanel extends PluginPanel
|
||||
continue;
|
||||
}
|
||||
|
||||
overallGp += item.getPrice();
|
||||
overallGp += item.getGePrice();
|
||||
}
|
||||
|
||||
if (present > 0)
|
||||
|
||||
@@ -636,14 +636,14 @@ public class LootTrackerPlugin extends Plugin
|
||||
{
|
||||
final ItemComposition itemComposition = itemManager.getItemComposition(itemId);
|
||||
final int realItemId = itemComposition.getNote() != -1 ? itemComposition.getLinkedNoteId() : itemId;
|
||||
final long price = (long) itemManager.getItemPrice(realItemId) * (long) quantity;
|
||||
final long gePrice = (long) itemManager.getItemPrice(realItemId) * (long) quantity;
|
||||
final boolean ignored = ignoredItems.contains(itemComposition.getName());
|
||||
|
||||
return new LootTrackerItem(
|
||||
itemId,
|
||||
itemComposition.getName(),
|
||||
quantity,
|
||||
price,
|
||||
gePrice,
|
||||
ignored);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user