diff --git a/src/main/java/dev/thource/runelite/dudewheresmystuff/death/DeathStorageManager.java b/src/main/java/dev/thource/runelite/dudewheresmystuff/death/DeathStorageManager.java index 51f3cf7..f615917 100644 --- a/src/main/java/dev/thource/runelite/dudewheresmystuff/death/DeathStorageManager.java +++ b/src/main/java/dev/thource/runelite/dudewheresmystuff/death/DeathStorageManager.java @@ -88,8 +88,8 @@ public class DeathStorageManager extends StorageManagerthe Character Summary tab" + + " (brown star) to
track cross-client deathpiles."); storages.add(new DeathItems(plugin, this)); } @@ -316,6 +316,8 @@ private void refreshDeathpileInfoBoxes() { for (DeathpileInfoBox infoBox : deathpileInfoBoxes) { if (plugin.getConfig().deathpileInfoBox()) { + infoBox.refreshTooltip(); + if (!currentInfoBoxes.contains(infoBox)) { infoBoxManager.addInfoBox(infoBox); } diff --git a/src/main/java/dev/thource/runelite/dudewheresmystuff/death/DeathpileInfoBox.java b/src/main/java/dev/thource/runelite/dudewheresmystuff/death/DeathpileInfoBox.java index 4565b56..1326d97 100644 --- a/src/main/java/dev/thource/runelite/dudewheresmystuff/death/DeathpileInfoBox.java +++ b/src/main/java/dev/thource/runelite/dudewheresmystuff/death/DeathpileInfoBox.java @@ -7,17 +7,26 @@ import lombok.Getter; import net.runelite.api.ItemID; import net.runelite.client.ui.overlay.infobox.InfoBox; +import net.runelite.client.util.QuantityFormatter; class DeathpileInfoBox extends InfoBox { @Getter private final Deathpile deathpile; + private final String regionName; public DeathpileInfoBox(@Nonnull DudeWheresMyStuffPlugin plugin, Deathpile deathpile) { super(plugin.getItemManager().getImage(ItemID.BONES), plugin); this.deathpile = deathpile; Region region = Region.get(deathpile.getWorldPoint().getRegionID()); - setTooltip((region == null ? "Unknown" : region.getName()) + " deathpile"); + regionName = (region == null ? "Unknown" : region.getName()); + refreshTooltip(); + } + + void refreshTooltip() { + String deathpileValue = QuantityFormatter.quantityToStackSize(deathpile.getTotalValue()); + + setTooltip(regionName + " deathpile (" + deathpileValue + " gp)"); } @Override