From 199953bc727d3cbaef2651df7349efcb4b1a670c Mon Sep 17 00:00:00 2001 From: sdburns1998 Date: Sun, 7 Jul 2019 04:20:47 +0200 Subject: [PATCH] grounditems: Some broke their keyboard --- .../plugins/grounditems/GroundItemsPlugin.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) 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 f2e70b9fdc..2868f9e41a 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 @@ -273,7 +273,10 @@ public class GroundItemsPlugin extends Plugin { for (GroundItem item : collectedGroundItems.values()) { - if (item.getTicks() == -1) continue; + if (item.getTicks() == -1) + { + continue; + } item.setTicks(item.getTicks() - 1); } } @@ -488,21 +491,31 @@ public class GroundItemsPlugin extends Plugin if (this.rightClickHidden) { if (aHidden && bMenuType == WALK) + { return -1; + } if (bHidden && aMenuType == WALK) + { return 1; + } } // sort hidden items below non-hidden items if (aHidden && !bHidden && bMenuType != WALK) + { return -1; + } if (bHidden && !aHidden && aMenuType != WALK) + { return 1; + } // RS sorts by alch price by private, so no need to sort if config not set if (this.sortByGEPrice) + { return (getGePriceFromItemId(aId) * aQuantity) - (getGePriceFromItemId(bId) * bQuantity); + } } } @@ -867,7 +880,9 @@ public class GroundItemsPlugin extends Plugin { // so that "Prayer Potion (4)" returns 1 instead of 4 and "Coins (25)" returns 25 instead of 1 if (!itemNameIncludesQuantity || matches >= 1) + { lastMatch = matcher.group(1); + } matches++; }