diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsOverlay.java index 932f755f21..d38eb6a4bd 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsOverlay.java @@ -46,6 +46,7 @@ import net.runelite.api.Player; import net.runelite.api.Point; import net.runelite.api.coords.LocalPoint; import net.runelite.api.coords.WorldPoint; +import static net.runelite.client.plugins.grounditems.GroundItemsPlugin.MAX_QUANTITY; import static net.runelite.client.plugins.grounditems.config.ItemHighlightMode.MENU; import net.runelite.client.plugins.grounditems.config.PriceDisplayMode; import net.runelite.client.ui.overlay.Overlay; @@ -64,9 +65,6 @@ public class GroundItemsOverlay extends Overlay // We must offset the text on the z-axis such that // it doesn't obscure the ground items below it. private static final int OFFSET_Z = 20; - // The game won't send anything higher than this value to the plugin - - // so we replace any item quantity higher with "Lots" instead. - private static final int MAX_QUANTITY = 65535; // The 15 pixel gap between each drawn ground item. private static final int STRING_GAP = 15; // Size of the hidden/highlight boxes diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsPlugin.java index a141aa4123..962cbe432f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/grounditems/GroundItemsPlugin.java @@ -105,6 +105,9 @@ public class GroundItemsPlugin extends Plugin private final Color color; } + // The game won't send anything higher than this value to the plugin - + // so we replace any item quantity higher with "Lots" instead. + static final int MAX_QUANTITY = 65535; // ItemID for coins private static final int COINS = ItemID.COINS_995; // Ground item menu options @@ -646,7 +649,7 @@ public class GroundItemsPlugin extends Plugin if (item.getQuantity() > 1) { - if (item.getQuantity() > (int) Character.MAX_VALUE) + if (item.getQuantity() >= MAX_QUANTITY) { notificationStringBuilder.append(" (Lots!)"); }