From ffff30d60c89ea4e33d84b202162e6d60165e907 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Thu, 19 Aug 2021 15:37:45 +0100 Subject: [PATCH 01/12] roof removal: properly account for instances when applying overrides Since instances shift around real regions to WorldPoints that don't match, the override system was trying to apply overrides to areas that don't currently exist. --- .../client/plugins/roofremoval/RoofRemovalPlugin.java | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java index a9e92f4420..9f86d9a47e 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java @@ -46,6 +46,7 @@ import static net.runelite.api.Constants.ROOF_FLAG_HOVERED; import static net.runelite.api.Constants.ROOF_FLAG_POSITION; import net.runelite.api.GameState; import net.runelite.api.Tile; +import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameStateChanged; import net.runelite.client.callback.ClientThread; import net.runelite.client.config.ConfigManager; @@ -246,14 +247,17 @@ public class RoofRemovalPlugin extends Plugin continue; } - int regionID = tile.getWorldLocation().getRegionID() << 2 | z; + // Properly account for instances shifting worldpoints around + final WorldPoint wp = WorldPoint.fromLocalInstance(client, tile.getLocalLocation(), tile.getPlane()); + + int regionID = wp.getRegionID() << 2 | z; if (!overrides.containsKey(regionID)) { continue; } - int rx = tile.getWorldLocation().getRegionX(); - int ry = tile.getWorldLocation().getRegionY(); + int rx = wp.getRegionX(); + int ry = wp.getRegionY(); long[] region = overrides.get(regionID); if ((region[ry] & (1L << rx)) != 0) { From faf9e94a7042f6dcf04e5743c705f16839aee9bd Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Mon, 23 Aug 2021 23:34:20 -0700 Subject: [PATCH 02/12] roof removal: Fix Ardougne monastery --- .../client/plugins/roofremoval/overrides.jsonc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/roofremoval/overrides.jsonc b/runelite-client/src/main/resources/net/runelite/client/plugins/roofremoval/overrides.jsonc index b831d41f43..656c4ae4dc 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/roofremoval/overrides.jsonc +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/roofremoval/overrides.jsonc @@ -3260,5 +3260,15 @@ "z1": 1, "z2": 2 } + ], + "10290": [ // Ardougne Monastery + { + "rx1": 43, + "ry1": 17, + "rx2": 49, + "ry2": 17, + "z1": 0, + "z2": 0 + } ] } From 50c6100596c4ab05d072a443819f0e37cad9d66c Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Wed, 23 Dec 2020 09:52:45 +0000 Subject: [PATCH 03/12] loot tracker: add ea display to tooltips --- .../plugins/loottracker/LootTrackerBox.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerBox.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerBox.java index f0248b19be..0e6196227f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerBox.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerBox.java @@ -375,8 +375,19 @@ class LootTrackerBox extends JPanel final long gePrice = item.getTotalGePrice(); final long haPrice = item.getTotalHaPrice(); final String ignoredLabel = item.isIgnored() ? " - Ignored" : ""; - return "" + name + " x " + quantity + ignoredLabel - + "
GE: " + QuantityFormatter.quantityToStackSize(gePrice) - + "
HA: " + QuantityFormatter.quantityToStackSize(haPrice) + ""; + final StringBuilder sb = new StringBuilder(""); + sb.append(name).append(" x ").append(QuantityFormatter.formatNumber(quantity)).append(ignoredLabel); + sb.append("
GE: ").append(QuantityFormatter.quantityToStackSize(gePrice)); + if (quantity > 1) + { + sb.append(" (").append(QuantityFormatter.quantityToStackSize(item.getGePrice())).append(" ea)"); + } + sb.append("
HA: ").append(QuantityFormatter.quantityToStackSize(haPrice)); + if (quantity > 1) + { + sb.append(" (").append(QuantityFormatter.quantityToStackSize(item.getHaPrice())).append(" ea)"); + } + sb.append(""); + return sb.toString(); } } From 8b683b40570fbf10871ebbaa516f18083dbdc4a6 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Wed, 23 Dec 2020 09:53:16 +0000 Subject: [PATCH 04/12] loot tracker: don't show unneeded tooltip lines for coins and platinum --- .../client/plugins/loottracker/LootTrackerBox.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerBox.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerBox.java index 0e6196227f..16da3c9460 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerBox.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerBox.java @@ -50,6 +50,7 @@ import javax.swing.SwingConstants; import javax.swing.border.EmptyBorder; import lombok.AccessLevel; import lombok.Getter; +import net.runelite.api.ItemID; import net.runelite.client.game.ItemManager; import net.runelite.client.ui.ColorScheme; import net.runelite.client.ui.FontManager; @@ -377,11 +378,24 @@ class LootTrackerBox extends JPanel final String ignoredLabel = item.isIgnored() ? " - Ignored" : ""; final StringBuilder sb = new StringBuilder(""); sb.append(name).append(" x ").append(QuantityFormatter.formatNumber(quantity)).append(ignoredLabel); + if (item.getId() == ItemID.COINS_995) + { + sb.append(""); + return sb.toString(); + } + sb.append("
GE: ").append(QuantityFormatter.quantityToStackSize(gePrice)); if (quantity > 1) { sb.append(" (").append(QuantityFormatter.quantityToStackSize(item.getGePrice())).append(" ea)"); } + + if (item.getId() == ItemID.PLATINUM_TOKEN) + { + sb.append(""); + return sb.toString(); + } + sb.append("
HA: ").append(QuantityFormatter.quantityToStackSize(haPrice)); if (quantity > 1) { From 7046737a480f7deeaffa6f41725af295bab3d93f Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Fri, 27 Aug 2021 17:13:34 +0100 Subject: [PATCH 05/12] xp globes: account for progress arc width when deciding overlay bounds --- .../plugins/xpglobes/XpGlobesOverlay.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesOverlay.java index 526d3aacbc..1243c76712 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/xpglobes/XpGlobesOverlay.java @@ -63,6 +63,7 @@ public class XpGlobesOverlay extends Overlay private static final int MINIMUM_STEP = 10; private static final int PROGRESS_RADIUS_START = 90; private static final int PROGRESS_RADIUS_REMAINDER = 0; + private static final int PROGRESS_BACKGROUND_SIZE = 5; private static final int TOOLTIP_RECT_SIZE_X = 150; private static final Color DARK_OVERLAY_COLOR = new Color(0, 0, 0, 180); static final String FLIP_ACTION = "Flip"; @@ -108,31 +109,34 @@ public class XpGlobesOverlay extends Overlay return null; } - int curDrawPosition = 0; + // The progress arc is drawn either side of the perimeter of the background. This value accounts for that + // when calculating draw positions and overall size of the overlay + final int progressArcOffset = (int) Math.ceil(Math.max(PROGRESS_BACKGROUND_SIZE, config.progressArcStrokeWidth()) / 2.0); + int curDrawPosition = progressArcOffset; for (final XpGlobe xpGlobe : xpGlobes) { int startXp = xpTrackerService.getStartGoalXp(xpGlobe.getSkill()); int goalXp = xpTrackerService.getEndGoalXp(xpGlobe.getSkill()); if (config.alignOrbsVertically()) { - renderProgressCircle(graphics, xpGlobe, startXp, goalXp, 0, curDrawPosition, getBounds()); + renderProgressCircle(graphics, xpGlobe, startXp, goalXp, progressArcOffset, curDrawPosition, getBounds()); } else { - renderProgressCircle(graphics, xpGlobe, startXp, goalXp, curDrawPosition, 0, getBounds()); + renderProgressCircle(graphics, xpGlobe, startXp, goalXp, curDrawPosition, progressArcOffset, getBounds()); } curDrawPosition += MINIMUM_STEP + config.xpOrbSize(); } // Get length of markers - final int markersLength = (queueSize * (config.xpOrbSize())) + ((MINIMUM_STEP) * (queueSize - 1)); + final int markersLength = (queueSize * (config.xpOrbSize() + progressArcOffset)) + ((MINIMUM_STEP) * (queueSize - 1)); if (config.alignOrbsVertically()) { - return new Dimension(config.xpOrbSize(), markersLength); + return new Dimension(config.xpOrbSize() + progressArcOffset * 2, markersLength); } else { - return new Dimension(markersLength, config.xpOrbSize()); + return new Dimension(markersLength, config.xpOrbSize() + progressArcOffset * 2); } } @@ -184,7 +188,7 @@ public class XpGlobesOverlay extends Overlay x, y, config.xpOrbSize(), config.xpOrbSize(), PROGRESS_RADIUS_REMAINDER, radiusToGoalXp, - 5, + PROGRESS_BACKGROUND_SIZE, config.progressOrbOutLineColor() ); drawProgressArc( From b42932d581174bf1641b4e882a49f2a655a5528a Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 29 Aug 2021 14:36:09 -0400 Subject: [PATCH 06/12] loot tracker: add world id to loot record for dmmt --- .../net/runelite/http/api/loottracker/LootRecord.java | 1 + .../client/plugins/loottracker/LootTrackerPlugin.java | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java b/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java index 01e180c55b..a8e04aefd3 100644 --- a/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java +++ b/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java @@ -40,4 +40,5 @@ public class LootRecord private Object metadata; private Collection drops; private Instant time; + private Integer world; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java index 634a1fcc77..5519be978a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/loottracker/LootTrackerPlugin.java @@ -74,6 +74,7 @@ import net.runelite.api.ObjectID; import net.runelite.api.Player; import net.runelite.api.Skill; import net.runelite.api.SpriteID; +import net.runelite.api.WorldType; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.ChatMessage; import net.runelite.api.events.GameStateChanged; @@ -479,7 +480,7 @@ public class LootTrackerPlugin extends Plugin if (config.saveLoot()) { - LootRecord lootRecord = new LootRecord(name, type, metadata, toGameItems(items), Instant.now()); + LootRecord lootRecord = new LootRecord(name, type, metadata, toGameItems(items), Instant.now(), getLootWorldId()); synchronized (queuedLoots) { queuedLoots.add(lootRecord); @@ -489,6 +490,12 @@ public class LootTrackerPlugin extends Plugin eventBus.post(new LootReceived(name, combatLevel, type, items)); } + private Integer getLootWorldId() + { + // For the wiki to determine drop rates based on dmm brackets + return client.getWorldType().contains(WorldType.SEASONAL) ? client.getWorld() : null; + } + @Subscribe public void onNpcLootReceived(final NpcLootReceived npcLootReceived) { From e37292267b763862a21e89e4e8247d0e739646d0 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 30 Aug 2021 20:33:55 -0400 Subject: [PATCH 07/12] use maven's native reproducible build support Co-authored-by: Max Weber --- pom.xml | 32 +++++++++++++----------- runelite-client/pom.xml | 7 +----- runelite-script-assembler-plugin/pom.xml | 1 - 3 files changed, 18 insertions(+), 22 deletions(-) diff --git a/pom.xml b/pom.xml index e99b83af3d..d487454096 100644 --- a/pom.xml +++ b/pom.xml @@ -37,6 +37,7 @@ UTF-8 + 1 1.8 8 1.18.20 @@ -280,33 +281,34 @@ true - - io.github.zlika - reproducible-build-maven-plugin - 0.7 - - - - package - - strip-jar - - - - + + org.apache.maven.plugins + maven-assembly-plugin + 3.2.0 + org.apache.maven.plugins maven-jar-plugin - 3.0.2 + 3.2.0 org.apache.maven.plugins maven-compiler-plugin 3.6.1 + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + + org.apache.maven.plugins + maven-plugin-plugin + 3.6.0 + diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index a6b0870fb4..debecf5638 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -318,7 +318,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.2.1 + 3.2.3 package @@ -338,11 +338,6 @@ - - - io.github.zlika - reproducible-build-maven-plugin - org.apache.maven.plugins maven-jarsigner-plugin diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index f79c779388..393e17c640 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -65,7 +65,6 @@ org.apache.maven.plugins maven-plugin-plugin - 3.4 default-descriptor From 41d338435825f064f7ae6ea10a72e152f7b19d69 Mon Sep 17 00:00:00 2001 From: Adam Davies Date: Mon, 14 Jun 2021 15:22:39 -0500 Subject: [PATCH 08/12] mining: Add barronite ore and deposits --- .../client/plugins/mining/MiningPlugin.java | 20 ++++++++++++++++--- .../runelite/client/plugins/mining/Rock.java | 3 ++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java index 6cc0e90ae4..67edf4a1e5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/mining/MiningPlugin.java @@ -50,6 +50,10 @@ import static net.runelite.api.ObjectID.ORE_VEIN_26661; import static net.runelite.api.ObjectID.ORE_VEIN_26662; import static net.runelite.api.ObjectID.ORE_VEIN_26663; import static net.runelite.api.ObjectID.ORE_VEIN_26664; +import static net.runelite.api.ObjectID.ROCKS_41547; +import static net.runelite.api.ObjectID.ROCKS_41548; +import static net.runelite.api.ObjectID.ROCKS_41549; +import static net.runelite.api.ObjectID.ROCKS_41550; import net.runelite.api.Player; import net.runelite.api.WallObject; import net.runelite.api.coords.WorldPoint; @@ -79,12 +83,12 @@ import net.runelite.client.ui.overlay.OverlayMenuEntry; @PluginDependency(XpTrackerPlugin.class) public class MiningPlugin extends Plugin { - private static final Pattern MINING_PATERN = Pattern.compile( + private static final Pattern MINING_PATTERN = Pattern.compile( "You " + "(?:manage to|just)" + " (?:mined?|quarry) " + "(?:some|an?) " + - "(?:copper|tin|clay|iron|silver|coal|gold|mithril|adamantite|runeite|amethyst|sandstone|granite|Opal|piece of Jade|Red Topaz|Emerald|Sapphire|Ruby|Diamond)" + + "(?:copper|tin|clay|iron|silver|coal|gold|mithril|adamantite|runeite|amethyst|sandstone|granite|barronite shards|barronite deposit|Opal|piece of Jade|Red Topaz|Emerald|Sapphire|Ruby|Diamond)" + "(?:\\.|!)"); @Inject @@ -343,10 +347,20 @@ public class MiningPlugin extends Plugin respawns.add(rockRespawn); break; } + case ROCKS_41549: // Depleted barronite vein + case ROCKS_41550: // Depleted barronite vein + { + Rock rock = Rock.BARRONITE; + RockRespawn rockRespawn = new RockRespawn(rock, object.getWorldLocation(), Instant.now(), (int) rock.getRespawnTime(region).toMillis(), rock.getZOffset()); + respawns.add(rockRespawn); + break; + } case ORE_VEIN_26661: // Motherlode vein case ORE_VEIN_26662: // Motherlode vein case ORE_VEIN_26663: // Motherlode vein case ORE_VEIN_26664: // Motherlode vein + case ROCKS_41547: // Barronite vein + case ROCKS_41548: // Barronite vein { // If the vein respawns before the timer is up, remove it final WorldPoint point = object.getWorldLocation(); @@ -361,7 +375,7 @@ public class MiningPlugin extends Plugin { if (event.getType() == ChatMessageType.SPAM || event.getType() == ChatMessageType.GAMEMESSAGE) { - if (MINING_PATERN.matcher(event.getMessage()).matches()) + if (MINING_PATTERN.matcher(event.getMessage()).matches()) { if (session == null) { diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/mining/Rock.java b/runelite-client/src/main/java/net/runelite/client/plugins/mining/Rock.java index 4f8cf9b32f..ac28366b8b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/mining/Rock.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/mining/Rock.java @@ -97,7 +97,8 @@ enum Rock EFH_SALT(Duration.of(9, GAME_TICKS), 0, ROCKS_33255), TE_SALT(Duration.of(9, GAME_TICKS), 0, ROCKS_33256), BASALT(Duration.of(9, GAME_TICKS), 0, ROCKS_33257), - DAEYALT_ESSENCE(Duration.of(MiningRocksOverlay.DAEYALT_MAX_RESPAWN_TIME, GAME_TICKS), 0, DAEYALT_ESSENCE_39095); + DAEYALT_ESSENCE(Duration.of(MiningRocksOverlay.DAEYALT_MAX_RESPAWN_TIME, GAME_TICKS), 0, DAEYALT_ESSENCE_39095), + BARRONITE(Duration.of(89, GAME_TICKS), 140); private static final int WILDERNESS_RESOURCE_AREA = 12605; private static final int MISCELLANIA = 10044; From b9025997a11789a10999eba1c1bf6bc4d4c0742d Mon Sep 17 00:00:00 2001 From: pilino1234 Date: Tue, 31 Aug 2021 14:36:19 +0200 Subject: [PATCH 09/12] skillcalculator: Add Camdozaal activities --- .../skillcalculator/skill_cooking.json | 24 +++++++++++++++++++ .../skillcalculator/skill_fishing.json | 24 +++++++++++++++++++ .../plugins/skillcalculator/skill_mining.json | 12 ++++++++++ .../plugins/skillcalculator/skill_prayer.json | 24 +++++++++++++++++++ .../skillcalculator/skill_runecraft.json | 18 ++++++++++++++ .../skillcalculator/skill_smithing.json | 6 +++++ 6 files changed, 108 insertions(+) diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_cooking.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_cooking.json index 6ddb07cbaf..8e86a25a65 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_cooking.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_cooking.json @@ -78,6 +78,12 @@ "name": "Baked Potato", "xp": 15 }, + { + "level": 7, + "icon": 25654, + "name": "Guppy", + "xp": 12 + }, { "level": 8, "icon": 2048, @@ -228,6 +234,12 @@ "name": "Cup of tea", "xp": 52 }, + { + "level": 20, + "icon": 25660, + "name": "Cavefish", + "xp": 23 + }, { "level": 21, "icon": 9988, @@ -378,6 +390,12 @@ "name": "Choc Saturday", "xp": 170 }, + { + "level": 33, + "icon": 25666, + "name": "Tetra", + "xp": 31 + }, { "level": 34, "icon": 7178, @@ -516,6 +534,12 @@ "name": "Fried Mushrooms", "xp": 60 }, + { + "level": 46, + "icon": 25672, + "name": "Catfish", + "xp": 43 + }, { "level": 47, "icon": 7188, diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_fishing.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_fishing.json index f55759fece..730be09d00 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_fishing.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_fishing.json @@ -24,6 +24,12 @@ "name": "Raw Karambwanji", "xp": 5 }, + { + "level": 7, + "icon": 25652, + "name": "Raw Guppy", + "xp": 8 + }, { "level": 10, "icon": 345, @@ -48,6 +54,12 @@ "name": "Raw Trout", "xp": 50 }, + { + "level": 20, + "icon": 25658, + "name": "Raw Cavefish", + "xp": 16 + }, { "level": 23, "icon": 341, @@ -72,6 +84,12 @@ "name": "Raw Salmon", "xp": 70 }, + { + "level": 33, + "icon": 25664, + "name": "Raw Tetra", + "xp": 24 + }, { "level": 35, "icon": 359, @@ -102,6 +120,12 @@ "name": "Raw Bass", "xp": 100 }, + { + "level": 46, + "icon": 25670, + "name": "Raw Catfish", + "xp": 33 + }, { "level": 48, "icon": 11328, diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_mining.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_mining.json index 728f204861..a944c4782f 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_mining.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_mining.json @@ -36,6 +36,18 @@ "name": "Limestone", "xp": 26.5 }, + { + "level": 14, + "icon": 25683, + "name": "Barronite shards", + "xp": 16 + }, + { + "level": 14, + "icon": 25684, + "name": "Barronite deposit", + "xp": 32 + }, { "level": 15, "icon": 440, diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_prayer.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_prayer.json index 8ef26c4797..9ebde37563 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_prayer.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_prayer.json @@ -368,6 +368,30 @@ "icon": 25419, "name": "Urium Remains", "xp": 120 + }, + { + "level": 1, + "icon": 25654, + "name": "Guppy", + "xp": 4 + }, + { + "level": 1, + "icon": 25660, + "name": "Cavefish", + "xp": 7 + }, + { + "level": 1, + "icon": 25666, + "name": "Tetra", + "xp": 10 + }, + { + "level": 1, + "icon": 25672, + "name": "Cavefish", + "xp": 16 } ] } diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_runecraft.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_runecraft.json index 3e62d892f4..901196750e 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_runecraft.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_runecraft.json @@ -102,6 +102,12 @@ "name": "Mind Rune", "xp": 5.5 }, + { + "level": 2, + "icon": 25696, + "name": "Mind core", + "xp": 55 + }, { "level": 5, "icon": 555, @@ -156,6 +162,12 @@ "name": "Body Rune", "xp": 7.5 }, + { + "level": 20, + "icon": 25698, + "name": "Body core", + "xp": 75 + }, { "level": 23, "icon": 4699, @@ -174,6 +186,12 @@ "name": "Chaos Rune", "xp": 8.5 }, + { + "level": 35, + "icon": 25700, + "name": "Chaos core", + "xp": 85 + }, { "level": 40, "icon": 9075, diff --git a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_smithing.json b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_smithing.json index adce0a7faf..bf829f53b6 100644 --- a/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_smithing.json +++ b/runelite-client/src/main/resources/net/runelite/client/plugins/skillcalculator/skill_smithing.json @@ -156,6 +156,12 @@ "name": "Bronze 2h Sword", "xp": 37.5 }, + { + "level": 14, + "icon": 25684, + "name": "Barronite deposits", + "xp": 30 + }, { "level": 15, "icon": 2351, From f06fee20a1e26da520d55ce76786533b8a2b10f2 Mon Sep 17 00:00:00 2001 From: pilino1234 Date: Tue, 31 Aug 2021 16:15:42 +0200 Subject: [PATCH 10/12] worldmap: Add mining spots in Ruins of Camdozaal --- .../runelite/client/plugins/worldmap/MiningSiteLocation.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSiteLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSiteLocation.java index b683414722..85fef484b9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSiteLocation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/MiningSiteLocation.java @@ -61,6 +61,8 @@ enum MiningSiteLocation BLAST_MINE_WEST(new WorldPoint(1471, 3865, 0), new Rock(22, Ore.HARD_ROCK)), BRIMHAVEN_NORTH(new WorldPoint(2732, 3225, 0), new Rock(10, Ore.GOLD)), BRIMHAVEN_SOUTH_(new WorldPoint(2743, 3150, 0), new Rock(6, Ore.GOLD)), + CAMDOZAAL_MINES_EAST(new WorldPoint(2934, 5811, 0), new Rock(8, Ore.BARRONITE), new Rock(1, Ore.CLAY), new Rock(2, Ore.TIN), new Rock(1, Ore.COPPER)), + CAMDOZAAL_MINES_WEST(new WorldPoint(2914, 5811, 0), new Rock(10, Ore.BARRONITE), new Rock(2, Ore.COPPER), new Rock(2, Ore.CLAY), new Rock(1, Ore.TIN)), CENTRAL_FREMENIK_ISLES(new WorldPoint(2374, 3850, 0), new Rock(7, Ore.COAL), new Rock(1, Ore.RUNITE)), CITHAREDE_ABBEY(new WorldPoint(3400, 3170, 0), new Rock(3, Ore.IRON), new Rock (3, Ore.COAL)), COAL_TRUCKS(new WorldPoint(2580, 3484, 0), new Rock(18, Ore.COAL)), @@ -238,6 +240,7 @@ enum MiningSiteLocation TIN("Tin"), LIMESTONE("Limestone"), BLURITE("Blurite"), + BARRONITE("Barronite"), IRON("Iron"), ELEMENTAL("Elemental"), SILVER("Silver"), From dbc7d4049f8de8e0a7124eff2fc593498158466f Mon Sep 17 00:00:00 2001 From: Ryan Date: Tue, 15 Jun 2021 17:24:20 -0400 Subject: [PATCH 11/12] ItemMapping: Add Tome of Water and Master Scroll Book --- .../src/main/java/net/runelite/client/game/ItemMapping.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java index a879164634..af2423a862 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java +++ b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java @@ -196,6 +196,7 @@ public enum ItemMapping ITEM_SANGUINESTI_STAFF(SANGUINESTI_STAFF_UNCHARGED, SANGUINESTI_STAFF, HOLY_SANGUINESTI_STAFF_UNCHARGED, HOLY_SANGUINESTI_STAFF), ITEM_SCYTHE_OF_VITUR(SCYTHE_OF_VITUR_UNCHARGED, SCYTHE_OF_VITUR, HOLY_SCYTHE_OF_VITUR_UNCHARGED, HOLY_SCYTHE_OF_VITUR, SANGUINE_SCYTHE_OF_VITUR_UNCHARGED, SANGUINE_SCYTHE_OF_VITUR), ITEM_TOME_OF_FIRE(TOME_OF_FIRE_EMPTY, TOME_OF_FIRE), + ITEM_TOME_OF_WATER(TOME_OF_WATER_EMPTY, TOME_OF_WATER), ITEM_CRAWS_BOW(CRAWS_BOW_U, CRAWS_BOW), ITEM_VIGGORAS_CHAINMACE(VIGGORAS_CHAINMACE_U, VIGGORAS_CHAINMACE), ITEM_THAMMARONS_SCEPTRE(THAMMARONS_SCEPTRE_U, THAMMARONS_SCEPTRE), @@ -255,6 +256,7 @@ public enum ItemMapping ITEM_VOLATILE_ORB(VOLATILE_ORB, VOLATILE_NIGHTMARE_STAFF), ITEM_NIGHTMARE_STAFF(NIGHTMARE_STAFF, ELDRITCH_NIGHTMARE_STAFF, HARMONISED_NIGHTMARE_STAFF, VOLATILE_NIGHTMARE_STAFF), ITEM_GHARZI_RAPIER(GHRAZI_RAPIER, HOLY_GHRAZI_RAPIER), + ITEM_MASTER_SCROLL_BOOK(MASTER_SCROLL_BOOK_EMPTY, MASTER_SCROLL_BOOK), // Trouver Parchment ITEM_TROUVER_PARCHMENT( From a3d33bee0d82868420028946cc8368157605118e Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 2 Sep 2021 10:57:57 -0400 Subject: [PATCH 12/12] logback: add duplicate exception filter This only applies to marked logged messages for overlay rendering and event subscribers, which are common sources of exceptions in 3rd party plugins --- .../runelite/client/eventbus/EventBus.java | 6 +- .../client/ui/overlay/OverlayRenderer.java | 5 +- .../client/util/DeduplicationFilter.java | 96 +++++++++++++++++++ .../src/main/resources/logback.xml | 2 + 4 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/util/DeduplicationFilter.java diff --git a/runelite-client/src/main/java/net/runelite/client/eventbus/EventBus.java b/runelite-client/src/main/java/net/runelite/client/eventbus/EventBus.java index 7845c80956..ed51aabb6e 100644 --- a/runelite-client/src/main/java/net/runelite/client/eventbus/EventBus.java +++ b/runelite-client/src/main/java/net/runelite/client/eventbus/EventBus.java @@ -44,12 +44,16 @@ import lombok.RequiredArgsConstructor; import lombok.Value; import lombok.extern.slf4j.Slf4j; import net.runelite.client.util.ReflectUtil; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; @Slf4j @RequiredArgsConstructor @ThreadSafe public class EventBus { + private static final Marker DEDUPLICATE = MarkerFactory.getMarker("DEDUPLICATE"); + @Value public static class Subscriber { @@ -82,7 +86,7 @@ public class EventBus */ public EventBus() { - this((e) -> log.warn("Uncaught exception in event subscriber", e)); + this((e) -> log.warn(DEDUPLICATE, "Uncaught exception in event subscriber", e)); } /** diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java index 463e05725e..99b75c0255 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java @@ -67,11 +67,14 @@ import net.runelite.client.input.MouseManager; import net.runelite.client.ui.ClientUI; import net.runelite.client.ui.JagexColors; import net.runelite.client.util.ColorUtil; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; @Singleton @Slf4j public class OverlayRenderer extends MouseAdapter implements KeyListener { + private static final Marker DEDUPLICATE = MarkerFactory.getMarker("DEDUPLICATE"); private static final int BORDER = 5; private static final int BORDER_TOP = BORDER + 15; private static final int PADDING = 2; @@ -748,7 +751,7 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener } catch (Exception ex) { - log.warn("Error during overlay rendering", ex); + log.warn(DEDUPLICATE, "Error during overlay rendering", ex); return; } diff --git a/runelite-client/src/main/java/net/runelite/client/util/DeduplicationFilter.java b/runelite-client/src/main/java/net/runelite/client/util/DeduplicationFilter.java new file mode 100644 index 0000000000..2b99a27e97 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/util/DeduplicationFilter.java @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2021, Adam + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +package net.runelite.client.util; + +import ch.qos.logback.classic.Level; +import ch.qos.logback.classic.Logger; +import ch.qos.logback.classic.turbo.TurboFilter; +import ch.qos.logback.core.spi.FilterReply; +import java.util.Deque; +import java.util.concurrent.ConcurrentLinkedDeque; +import lombok.EqualsAndHashCode; +import lombok.RequiredArgsConstructor; +import org.slf4j.Marker; +import org.slf4j.MarkerFactory; + +public class DeduplicationFilter extends TurboFilter +{ + private static final Marker deduplicateMarker = MarkerFactory.getMarker("DEDUPLICATE"); + private static final int CACHE_SIZE = 8; + private static final int DUPLICATE_LOG_COUNT = 1000; + + @RequiredArgsConstructor + @EqualsAndHashCode(exclude = {"count"}) + private static class LogException + { + private final String message; + private final StackTraceElement[] stackTraceElements; + private volatile int count; + } + + private final Deque cache = new ConcurrentLinkedDeque<>(); + + @Override + public void stop() + { + cache.clear(); + super.stop(); + } + + @Override + public FilterReply decide(Marker marker, Logger logger, Level level, String s, Object[] objects, Throwable throwable) + { + if (marker != deduplicateMarker || logger.isDebugEnabled() || throwable == null) + { + return FilterReply.NEUTRAL; + } + + LogException logException = new LogException(s, throwable.getStackTrace()); + for (LogException e : cache) + { + if (logException.equals(e)) + { + // this iinc is not atomic, but doesn't matter in practice + if (++e.count % DUPLICATE_LOG_COUNT == 0) + { + logger.warn("following log message logged " + DUPLICATE_LOG_COUNT + " times!"); + return FilterReply.NEUTRAL; + } + return FilterReply.DENY; + } + } + + synchronized (cache) + { + if (cache.size() >= CACHE_SIZE) + { + cache.pop(); + } + cache.push(logException); + } + + return FilterReply.NEUTRAL; + } +} diff --git a/runelite-client/src/main/resources/logback.xml b/runelite-client/src/main/resources/logback.xml index d3a5ffbcad..60152930ce 100644 --- a/runelite-client/src/main/resources/logback.xml +++ b/runelite-client/src/main/resources/logback.xml @@ -24,6 +24,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> + + %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n