grounditems: Some broke their keyboard

This commit is contained in:
sdburns1998
2019-07-07 04:20:47 +02:00
parent 9ea7287713
commit 199953bc72

View File

@@ -273,7 +273,10 @@ public class GroundItemsPlugin extends Plugin
{ {
for (GroundItem item : collectedGroundItems.values()) for (GroundItem item : collectedGroundItems.values())
{ {
if (item.getTicks() == -1) continue; if (item.getTicks() == -1)
{
continue;
}
item.setTicks(item.getTicks() - 1); item.setTicks(item.getTicks() - 1);
} }
} }
@@ -488,21 +491,31 @@ public class GroundItemsPlugin extends Plugin
if (this.rightClickHidden) if (this.rightClickHidden)
{ {
if (aHidden && bMenuType == WALK) if (aHidden && bMenuType == WALK)
{
return -1; return -1;
}
if (bHidden && aMenuType == WALK) if (bHidden && aMenuType == WALK)
{
return 1; return 1;
}
} }
// sort hidden items below non-hidden items // sort hidden items below non-hidden items
if (aHidden && !bHidden && bMenuType != WALK) if (aHidden && !bHidden && bMenuType != WALK)
{
return -1; return -1;
}
if (bHidden && !aHidden && aMenuType != WALK) if (bHidden && !aHidden && aMenuType != WALK)
{
return 1; return 1;
}
// RS sorts by alch price by private, so no need to sort if config not set // RS sorts by alch price by private, so no need to sort if config not set
if (this.sortByGEPrice) if (this.sortByGEPrice)
{
return (getGePriceFromItemId(aId) * aQuantity) - (getGePriceFromItemId(bId) * bQuantity); 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 // so that "Prayer Potion (4)" returns 1 instead of 4 and "Coins (25)" returns 25 instead of 1
if (!itemNameIncludesQuantity || matches >= 1) if (!itemNameIncludesQuantity || matches >= 1)
{
lastMatch = matcher.group(1); lastMatch = matcher.group(1);
}
matches++; matches++;
} }