From d924858d748ca981b6661f91efc1ecb87d040007 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Wed, 30 Jun 2021 21:30:49 +0100 Subject: [PATCH 01/18] clues: fix the other kourend hot/cold enemies --- .../plugins/cluescrolls/clues/hotcold/HotColdLocation.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java index cd0c8036da..8c769e3a55 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/hotcold/HotColdLocation.java @@ -168,8 +168,8 @@ public enum HotColdLocation WILDERNESS_54(MASTER, new WorldPoint(2981, 3944, 0), WILDERNESS, "West of the Wilderness Agility Course, level 54 Wilderness.", BRASSICAN_MAGE), ZEAH_BLASTMINE_BANK(MASTER, new WorldPoint(1504, 3859, 0), ZEAH, "Next to the bank in the Lovakengj blast mine.", BRASSICAN_MAGE), ZEAH_BLASTMINE_NORTH(MASTER, new WorldPoint(1488, 3881, 0), ZEAH, "Northern part of the Lovakengj blast mine.", BRASSICAN_MAGE), - ZEAH_LOVAKITE_FURNACE(MASTER, new WorldPoint(1507, 3819, 0), ZEAH, "Next to the lovakite furnace in Lovakengj.", ANCIENT_WIZARDS), - ZEAH_LOVAKENGJ_MINE(MASTER, new WorldPoint(1477, 3778, 0), ZEAH, "Next to mithril rock in the Lovakengj mine.", ANCIENT_WIZARDS), + ZEAH_LOVAKITE_FURNACE(MASTER, new WorldPoint(1507, 3819, 0), ZEAH, "Next to the lovakite furnace in Lovakengj.", BRASSICAN_MAGE), + ZEAH_LOVAKENGJ_MINE(MASTER, new WorldPoint(1477, 3778, 0), ZEAH, "Next to mithril rock in the Lovakengj mine.", BRASSICAN_MAGE), ZEAH_SULPHR_MINE(MASTER, new WorldPoint(1428, 3869, 0), ZEAH, "Western entrance in the Lovakengj sulphur mine. Facemask or Slayer Helmet recommended.", BRASSICAN_MAGE), ZEAH_SHAYZIEN_BANK(MASTER, new WorldPoint(1498, 3627, 0), ZEAH, "South-east of the bank in Shayzien Encampment.", BRASSICAN_MAGE), ZEAH_OVERPASS(MASTER, new WorldPoint(1467, 3714, 0), ZEAH, "Overpass between Lovakengj and Shayzien.", BRASSICAN_MAGE), @@ -179,7 +179,7 @@ public enum HotColdLocation ZEAH_LIBRARY(MASTER, new WorldPoint(1603, 3843, 0), ZEAH, "North-west of the Arceuus Library.", BRASSICAN_MAGE), ZEAH_HOUSECHURCH(MASTER, new WorldPoint(1682, 3792, 0), ZEAH, "By the entrance to the Arceuus church.", ANCIENT_WIZARDS), ZEAH_DARK_ALTAR(MASTER, new WorldPoint(1698, 3881, 0), ZEAH, "West of the Dark Altar.", BRASSICAN_MAGE), - ZEAH_ARCEUUS_HOUSE(MASTER, new WorldPoint(1710, 3700, 0), ZEAH, "By the southern entrance to Arceuus.", ANCIENT_WIZARDS), + ZEAH_ARCEUUS_HOUSE(MASTER, new WorldPoint(1710, 3700, 0), ZEAH, "By the south-eastern entrance to Arceuus.", BRASSICAN_MAGE), ZEAH_ESSENCE_MINE(MASTER, new WorldPoint(1762, 3852, 0), ZEAH, "By the Arceuus essence mine.", BRASSICAN_MAGE), ZEAH_ESSENCE_MINE_NE(MASTER, new WorldPoint(1773, 3867, 0), ZEAH, "North-east of the Arceuus essence mine.", BRASSICAN_MAGE), ZEAH_PISCARILUS_MINE(MASTER, new WorldPoint(1768, 3705, 0), ZEAH, "South of the Piscarilius mine.", ANCIENT_WIZARDS), From 44bb046cddddbb4e3c33e375756d65c1294643a7 Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Fri, 2 Jul 2021 13:11:29 +0100 Subject: [PATCH 02/18] chat commands: add shorthand names for phosani's nightmare --- .../plugins/chatcommands/ChatCommandsPlugin.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java index 5e5f95d903..9a998e8aca 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatcommands/ChatCommandsPlugin.java @@ -1738,12 +1738,22 @@ public class ChatCommandsPlugin extends Plugin case "the corrupted gauntlet": return "Corrupted Gauntlet"; + // The Nightmare case "nm": case "tnm": case "nmare": case "the nightmare": return "Nightmare"; + // Phosani's Nightmare + case "pnm": + case "phosani": + case "phosanis": + case "phosani nm": + case "phosani nightmare": + case "phosanis nightmare": + return "Phosani's Nightmare"; + // Hallowed Sepulchre case "hs": case "sepulchre": From 2f388c6d590d6781cbc9e13b01ec56a94efd620f Mon Sep 17 00:00:00 2001 From: Hydrox6 Date: Fri, 2 Jul 2021 12:42:32 +0100 Subject: [PATCH 03/18] xp tracker: fix intermediate markers not showing for xp based goal ends --- .../java/net/runelite/client/plugins/xptracker/XpInfoBox.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpInfoBox.java b/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpInfoBox.java index af9c35fa53..ea65fd3468 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpInfoBox.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/xptracker/XpInfoBox.java @@ -278,7 +278,7 @@ class XpInfoBox extends JPanel { final List positions = new ArrayList<>(); - for (int level = xpSnapshotSingle.getStartLevel() + 1; level < xpSnapshotSingle.getEndLevel(); level++) + for (int level = xpSnapshotSingle.getStartLevel() + 1; level <= xpSnapshotSingle.getEndLevel(); level++) { double relativeStartExperience = Experience.getXpForLevel(level) - xpSnapshotSingle.getStartGoalXp(); double relativeEndExperience = xpSnapshotSingle.getEndGoalXp() - xpSnapshotSingle.getStartGoalXp(); From 9a038f5025169923536e3b4ea6a6b4bc2eac74f5 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 3 Jul 2021 08:00:35 +1000 Subject: [PATCH 04/18] wintertodt: improve fletching activity status detection --- .../client/plugins/wintertodt/WintertodtPlugin.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/wintertodt/WintertodtPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/wintertodt/WintertodtPlugin.java index 398ee8eb94..63b7f61331 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/wintertodt/WintertodtPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/wintertodt/WintertodtPlugin.java @@ -260,6 +260,12 @@ public class WintertodtPlugin extends Plugin MessageNode messageNode = chatMessage.getMessageNode(); final WintertodtInterruptType interruptType; + if (messageNode.getValue().startsWith("You carefully fletch the root")) + { + setActivity(WintertodtActivity.FLETCHING); + return; + } + if (messageNode.getValue().startsWith("The cold of")) { interruptType = WintertodtInterruptType.COLD; From 14571bd15f11602a0d6386c01540ab33470f98fe Mon Sep 17 00:00:00 2001 From: Hydrox Date: Fri, 2 Jul 2021 23:01:22 +0100 Subject: [PATCH 05/18] loot manager: add phosani's nightmare --- .../src/main/java/net/runelite/client/game/LootManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/game/LootManager.java b/runelite-client/src/main/java/net/runelite/client/game/LootManager.java index 418e493738..124f7f8e94 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/LootManager.java +++ b/runelite-client/src/main/java/net/runelite/client/game/LootManager.java @@ -237,7 +237,7 @@ public class LootManager public void onNpcChanged(NpcChanged npcChanged) { final NPC npc = npcChanged.getNpc(); - if (npc.getId() == NpcID.THE_NIGHTMARE_9433) + if (npc.getId() == NpcID.THE_NIGHTMARE_9433 || npc.getId() == NpcID.PHOSANIS_NIGHTMARE_9424) { delayedLootNpc = npc; delayedLootTickLimit = 15; From 2be138bf72ea1e03e5efaa1ee307c712034320b3 Mon Sep 17 00:00:00 2001 From: Cyborger1 <45152844+Cyborger1@users.noreply.github.com> Date: Sat, 3 Jul 2021 13:33:07 -0400 Subject: [PATCH 06/18] clues: Fix capitalization for "New Recruit Tony" master anagram --- .../runelite/client/plugins/cluescrolls/clues/AnagramClue.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java index 137c058f94..56c4a846e9 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/AnagramClue.java @@ -149,7 +149,7 @@ public class AnagramClue extends ClueScroll implements TextClueScroll, NpcClueSc new AnagramClue("TEN WIGS ON", "Wingstone", new WorldPoint(3389, 2877, 0), "Between Nardah & Agility Pyramid"), new AnagramClue("THEM CAL CAME", "Cam the Camel", new WorldPoint(3300, 3231, 0), "Just outside of the Duel Arena"), new AnagramClue("THICKNO", "Hickton", new WorldPoint(2822, 3442, 0), "Catherby fletching shop", "How many ranges are there in Catherby?", "2"), - new AnagramClue("TWENTY CURE IRON", "New recruit Tony", new WorldPoint(1503, 3553, 0), "Shayzien Graveyard"), + new AnagramClue("TWENTY CURE IRON", "New Recruit Tony", new WorldPoint(1503, 3553, 0), "Shayzien Graveyard"), new AnagramClue("UNLEASH NIGHT MIST", "Sigli the Huntsman", new WorldPoint(2660, 3654, 0), "Rellekka", "What is the combined slayer requirement of every monster in the slayer cave?", "302"), new AnagramClue("VESTE", "Steve", new WorldPoint(2432, 3423, 0), "Upstairs Wyvern Area or Stronghold Slayer Cave", "How many farming patches are there in Gnome stronghold?", "2"), new AnagramClue("VEIL VEDA", "Evil Dave", new WorldPoint(3079, 9892, 0), "Doris' basement, Edgeville", "What is 333 multiplied by 2?", "666"), From 9c766e17fa3d1ac9a73de510f792672ab8c08597 Mon Sep 17 00:00:00 2001 From: "F.W. Dekker" Date: Sat, 3 Jul 2021 21:50:46 +0200 Subject: [PATCH 07/18] chat notifications: clarify how to enter multiple words --- .../plugins/chatnotifications/ChatNotificationsConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsConfig.java index 9b9cd45479..c2bc53909f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/chatnotifications/ChatNotificationsConfig.java @@ -44,7 +44,7 @@ public interface ChatNotificationsConfig extends Config position = 1, keyName = "highlightWordsString", name = "Highlight words", - description = "Highlights the following words in chat", + description = "Highlights the following words in chat, separated by commas", section = highlightLists ) default String highlightWordsString() From 6b11afd907c5f129e64b79cc99d1207b7d227ae5 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 3 Jul 2021 15:54:19 -0400 Subject: [PATCH 08/18] inventory viewer: add option to hide when inventory is open Co-authored-by: wclander --- .../inventoryviewer/InventoryViewerConfig.java | 11 +++++++++++ .../inventoryviewer/InventoryViewerOverlay.java | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/inventoryviewer/InventoryViewerConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/inventoryviewer/InventoryViewerConfig.java index 2c3dc07102..7b32ff3489 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/inventoryviewer/InventoryViewerConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/inventoryviewer/InventoryViewerConfig.java @@ -55,4 +55,15 @@ public interface InventoryViewerConfig extends Config { return false; } + + @ConfigItem( + keyName = "hideIfInventoryActive", + name = "Hidden on inventory tab", + description = "Whether or not the overlay is hidden when the inventory tab is open.", + position = 2 + ) + default boolean hideIfInventoryActive() + { + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/inventoryviewer/InventoryViewerOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/inventoryviewer/InventoryViewerOverlay.java index 2896a9cf65..c5915d9693 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/inventoryviewer/InventoryViewerOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/inventoryviewer/InventoryViewerOverlay.java @@ -35,6 +35,7 @@ import net.runelite.api.InventoryID; import net.runelite.api.Item; import net.runelite.api.ItemComposition; import net.runelite.api.ItemContainer; +import net.runelite.api.VarClientInt; import net.runelite.client.game.ItemManager; import net.runelite.client.ui.overlay.OverlayPanel; import net.runelite.client.ui.overlay.OverlayPosition; @@ -49,6 +50,7 @@ class InventoryViewerOverlay extends OverlayPanel private final Client client; private final ItemManager itemManager; + private final InventoryViewerConfig config; private boolean hidden; @Inject @@ -61,6 +63,7 @@ class InventoryViewerOverlay extends OverlayPanel panelComponent.setOrientation(ComponentOrientation.HORIZONTAL); this.itemManager = itemManager; this.client = client; + this.config = config; this.hidden = config.hiddenDefault(); } @@ -72,6 +75,11 @@ class InventoryViewerOverlay extends OverlayPanel return null; } + if (client.getVar(VarClientInt.INVENTORY_TAB) == 3 && config.hideIfInventoryActive()) + { + return null; + } + final ItemContainer itemContainer = client.getItemContainer(InventoryID.INVENTORY); if (itemContainer == null) From 5d420ae57b13e163c5563edeab28f4f1c92dab37 Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 4 Jul 2021 15:14:05 -0400 Subject: [PATCH 09/18] Close various resource inputstreams --- .../net/runelite/api/overlay/OverlayIndex.java | 5 ++--- .../java/net/runelite/client/Notifier.java | 15 ++++++--------- .../externalplugins/ExternalPluginClient.java | 8 ++++---- .../client/game/ItemVariationMapping.java | 18 +++++++++++++----- .../client/plugins/gpu/template/Template.java | 14 +++++++++++--- .../client/plugins/skybox/SkyboxPlugin.java | 6 +++++- .../net/runelite/client/rs/ClientLoader.java | 6 +++--- .../net/runelite/client/ui/FontManager.java | 17 ++++++++++------- .../net/runelite/client/util/ImageUtil.java | 5 +++-- .../net/runelite/client/util/ReflectUtil.java | 7 ++++--- .../client/plugins/skybox/SkyboxTest.java | 10 ++++++++-- .../worldmap/TeleportLocationDataTest.java | 9 +++++++-- 12 files changed, 76 insertions(+), 44 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/overlay/OverlayIndex.java b/runelite-api/src/main/java/net/runelite/api/overlay/OverlayIndex.java index 6aec875181..9af2b6cc35 100644 --- a/runelite-api/src/main/java/net/runelite/api/overlay/OverlayIndex.java +++ b/runelite-api/src/main/java/net/runelite/api/overlay/OverlayIndex.java @@ -38,9 +38,8 @@ public class OverlayIndex static { - InputStream indexStream = OverlayIndex.class.getResourceAsStream("/runelite/index"); - - try (DataInputStream in = new DataInputStream(indexStream)) + try (InputStream indexStream = OverlayIndex.class.getResourceAsStream("/runelite/index"); + DataInputStream in = new DataInputStream(indexStream)) { int id; while ((id = in.readInt()) != -1) diff --git a/runelite-client/src/main/java/net/runelite/client/Notifier.java b/runelite-client/src/main/java/net/runelite/client/Notifier.java index 53963e4b1b..f225064734 100644 --- a/runelite-client/src/main/java/net/runelite/client/Notifier.java +++ b/runelite-client/src/main/java/net/runelite/client/Notifier.java @@ -479,14 +479,11 @@ public class Notifier { if (NOTIFICATION_FILE.exists()) { - try + try (InputStream fileStream = new BufferedInputStream(new FileInputStream(NOTIFICATION_FILE)); + AudioInputStream sound = AudioSystem.getAudioInputStream(fileStream)) { - InputStream fileStream = new BufferedInputStream(new FileInputStream(NOTIFICATION_FILE)); - try (AudioInputStream sound = AudioSystem.getAudioInputStream(fileStream)) - { - clip.open(sound); - return true; - } + clip.open(sound); + return true; } catch (UnsupportedAudioFileException | IOException | LineUnavailableException e) { @@ -495,8 +492,8 @@ public class Notifier } // Otherwise load from the classpath - InputStream fileStream = new BufferedInputStream(Notifier.class.getResourceAsStream("notification.wav")); - try (AudioInputStream sound = AudioSystem.getAudioInputStream(fileStream)) + try (InputStream fileStream = new BufferedInputStream(Notifier.class.getResourceAsStream("notification.wav")); + AudioInputStream sound = AudioSystem.getAudioInputStream(fileStream)) { clip.open(sound); return true; diff --git a/runelite-client/src/main/java/net/runelite/client/externalplugins/ExternalPluginClient.java b/runelite-client/src/main/java/net/runelite/client/externalplugins/ExternalPluginClient.java index ccf4b9fad3..d101cc22bb 100644 --- a/runelite-client/src/main/java/net/runelite/client/externalplugins/ExternalPluginClient.java +++ b/runelite-client/src/main/java/net/runelite/client/externalplugins/ExternalPluginClient.java @@ -30,6 +30,7 @@ import com.google.gson.JsonSyntaxException; import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; +import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.security.InvalidKeyException; @@ -134,13 +135,12 @@ public class ExternalPluginClient private static Certificate loadCertificate() { - try + try (InputStream in = ExternalPluginClient.class.getResourceAsStream("externalplugins.crt")) { CertificateFactory certFactory = CertificateFactory.getInstance("X.509"); - Certificate certificate = certFactory.generateCertificate(ExternalPluginClient.class.getResourceAsStream("externalplugins.crt")); - return certificate; + return certFactory.generateCertificate(in); } - catch (CertificateException e) + catch (CertificateException | IOException e) { throw new RuntimeException(e); } diff --git a/runelite-client/src/main/java/net/runelite/client/game/ItemVariationMapping.java b/runelite-client/src/main/java/net/runelite/client/game/ItemVariationMapping.java index 5daec1aee9..2161bedba2 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/ItemVariationMapping.java +++ b/runelite-client/src/main/java/net/runelite/client/game/ItemVariationMapping.java @@ -30,6 +30,7 @@ import com.google.common.collect.ImmutableMultimap; import com.google.common.collect.Multimap; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; +import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; @@ -49,12 +50,19 @@ public class ItemVariationMapping static { final Gson gson = new Gson(); - final TypeToken>> typeToken = new TypeToken>>() - { - }; + // CHECKSTYLE:OFF + final TypeToken>> typeToken = new TypeToken>>(){}; + // CHECKSTYLE:ON - final InputStream geLimitData = ItemVariationMapping.class.getResourceAsStream("/item_variations.json"); - final Map> itemVariations = gson.fromJson(new InputStreamReader(geLimitData, StandardCharsets.UTF_8), typeToken.getType()); + final Map> itemVariations; + try (InputStream geLimitData = ItemVariationMapping.class.getResourceAsStream("/item_variations.json")) + { + itemVariations = gson.fromJson(new InputStreamReader(geLimitData, StandardCharsets.UTF_8), typeToken.getType()); + } + catch (IOException e) + { + throw new RuntimeException(e); + } ImmutableMap.Builder builder = new ImmutableMap.Builder<>(); ImmutableMultimap.Builder invertedBuilder = new ImmutableMultimap.Builder<>(); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/template/Template.java b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/template/Template.java index 67ed68ca7f..22972a5e77 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/gpu/template/Template.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/gpu/template/Template.java @@ -32,7 +32,9 @@ import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; import java.util.function.Function; +import lombok.extern.slf4j.Slf4j; +@Slf4j public class Template { private final List> resourceLoaders = new ArrayList<>(); @@ -80,10 +82,16 @@ public class Template { return add(f -> { - InputStream is = clazz.getResourceAsStream(f); - if (is != null) + try (InputStream is = clazz.getResourceAsStream(f)) { - return inputStreamToString(is); + if (is != null) + { + return inputStreamToString(is); + } + } + catch (IOException ex) + { + log.warn(null, ex); } return null; }); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/skybox/SkyboxPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/skybox/SkyboxPlugin.java index 468e23a201..ecb90c6dab 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/skybox/SkyboxPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/skybox/SkyboxPlugin.java @@ -28,6 +28,7 @@ import com.google.inject.Inject; import com.google.inject.Provides; import java.awt.Color; import java.io.IOException; +import java.io.InputStream; import net.runelite.api.Client; import net.runelite.api.Constants; import net.runelite.api.GameState; @@ -59,7 +60,10 @@ public class SkyboxPlugin extends Plugin @Override public void startUp() throws IOException { - skybox = new Skybox(SkyboxPlugin.class.getResourceAsStream("skybox.txt"), "skybox.txt"); + try (InputStream in = SkyboxPlugin.class.getResourceAsStream("skybox.txt")) + { + skybox = new Skybox(in, "skybox.txt"); + } } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java b/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java index bc7a98faef..713f93a10f 100644 --- a/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java +++ b/runelite-client/src/main/java/net/runelite/client/rs/ClientLoader.java @@ -559,13 +559,13 @@ public class ClientLoader implements Supplier private static Certificate[] getJagexCertificateChain() { - try + try (InputStream in = ClientLoader.class.getResourceAsStream("jagex.crt")) { CertificateFactory certificateFactory = CertificateFactory.getInstance("X.509"); - Collection certificates = certificateFactory.generateCertificates(ClientLoader.class.getResourceAsStream("jagex.crt")); + Collection certificates = certificateFactory.generateCertificates(in); return certificates.toArray(new Certificate[0]); } - catch (CertificateException e) + catch (CertificateException | IOException e) { throw new RuntimeException("Unable to parse pinned certificates", e); } diff --git a/runelite-client/src/main/java/net/runelite/client/ui/FontManager.java b/runelite-client/src/main/java/net/runelite/client/ui/FontManager.java index 5305506a41..0921ab6975 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/FontManager.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/FontManager.java @@ -28,6 +28,7 @@ import java.awt.Font; import java.awt.FontFormatException; import java.awt.GraphicsEnvironment; import java.io.IOException; +import java.io.InputStream; import javax.swing.text.StyleContext; import lombok.Getter; @@ -48,10 +49,12 @@ public class FontManager { GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); - try + try (InputStream inRunescape = FontManager.class.getResourceAsStream("runescape.ttf"); + InputStream inRunescapeSmall = FontManager.class.getResourceAsStream("runescape_small.ttf"); + InputStream inRunescapeBold = FontManager.class.getResourceAsStream("runescape_bold.ttf")) { - Font font = Font.createFont(Font.TRUETYPE_FONT, - FontManager.class.getResourceAsStream("runescape.ttf")) + // runescape + Font font = Font.createFont(Font.TRUETYPE_FONT, inRunescape) .deriveFont(Font.PLAIN, 16); ge.registerFont(font); @@ -59,8 +62,8 @@ public class FontManager .getFont(font.getName(), Font.PLAIN, 16); ge.registerFont(runescapeFont); - Font smallFont = Font.createFont(Font.TRUETYPE_FONT, - FontManager.class.getResourceAsStream("runescape_small.ttf")) + // small + Font smallFont = Font.createFont(Font.TRUETYPE_FONT, inRunescapeSmall) .deriveFont(Font.PLAIN, 16); ge.registerFont(smallFont); @@ -68,8 +71,8 @@ public class FontManager .getFont(smallFont.getName(), Font.PLAIN, 16); ge.registerFont(runescapeSmallFont); - Font boldFont = Font.createFont(Font.TRUETYPE_FONT, - FontManager.class.getResourceAsStream("runescape_bold.ttf")) + // bold + Font boldFont = Font.createFont(Font.TRUETYPE_FONT, inRunescapeBold) .deriveFont(Font.BOLD, 16); ge.registerFont(boldFont); diff --git a/runelite-client/src/main/java/net/runelite/client/util/ImageUtil.java b/runelite-client/src/main/java/net/runelite/client/util/ImageUtil.java index ac25611df1..c1bdd2f5cf 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/ImageUtil.java +++ b/runelite-client/src/main/java/net/runelite/client/util/ImageUtil.java @@ -35,6 +35,7 @@ import java.awt.image.DirectColorModel; import java.awt.image.PixelGrabber; import java.awt.image.RescaleOp; import java.io.IOException; +import java.io.InputStream; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -382,11 +383,11 @@ public class ImageUtil */ public static BufferedImage loadImageResource(final Class c, final String path) { - try + try (InputStream in = c.getResourceAsStream(path)) { synchronized (ImageIO.class) { - return ImageIO.read(c.getResourceAsStream(path)); + return ImageIO.read(in); } } catch (IllegalArgumentException e) diff --git a/runelite-client/src/main/java/net/runelite/client/util/ReflectUtil.java b/runelite-client/src/main/java/net/runelite/client/util/ReflectUtil.java index fbcc28d28d..78bd1262bb 100644 --- a/runelite-client/src/main/java/net/runelite/client/util/ReflectUtil.java +++ b/runelite-client/src/main/java/net/runelite/client/util/ReflectUtil.java @@ -27,6 +27,7 @@ package net.runelite.client.util; import com.google.common.io.ByteStreams; import java.io.IOException; +import java.io.InputStream; import java.lang.invoke.MethodHandles; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; @@ -104,10 +105,10 @@ public class ReflectUtil */ public static void installLookupHelper(PrivateLookupableClassLoader cl) { - try + String name = PrivateLookupHelper.class.getName(); + try (InputStream in = ReflectUtil.class.getResourceAsStream("/" + name.replace('.', '/') + ".class")) { - String name = PrivateLookupHelper.class.getName(); - byte[] classData = ByteStreams.toByteArray(ReflectUtil.class.getResourceAsStream("/" + name.replace('.', '/') + ".class")); + byte[] classData = ByteStreams.toByteArray(in); Class clazz = cl.defineClass0(name, classData, 0, classData.length); // force to run diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/skybox/SkyboxTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/skybox/SkyboxTest.java index 6787759ead..579ba38fb4 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/skybox/SkyboxTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/skybox/SkyboxTest.java @@ -29,6 +29,7 @@ import com.google.common.io.CharSource; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; +import java.io.InputStream; import javax.imageio.ImageIO; import lombok.extern.slf4j.Slf4j; import org.junit.Assert; @@ -50,8 +51,13 @@ public class SkyboxTest @Test public void testLoadActual() throws IOException { - long start = System.nanoTime(); - Skybox skybox = new Skybox(SkyboxPlugin.class.getResourceAsStream("skybox.txt"), "skybox.txt"); + long start; + Skybox skybox; + try (InputStream in = SkyboxPlugin.class.getResourceAsStream("skybox.txt")) + { + start = System.nanoTime(); + skybox = new Skybox(in, "skybox.txt"); + } log.info("Parse took {}ms", (System.nanoTime() - start) / 1_000_000); String skyboxFile = System.getProperty("skyboxExport"); diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/worldmap/TeleportLocationDataTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/worldmap/TeleportLocationDataTest.java index 2c52d0ae4f..ae984d9088 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/worldmap/TeleportLocationDataTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/worldmap/TeleportLocationDataTest.java @@ -25,19 +25,24 @@ */ package net.runelite.client.plugins.worldmap; +import java.io.IOException; +import java.io.InputStream; import static org.junit.Assert.assertNotNull; import org.junit.Test; public class TeleportLocationDataTest { @Test - public void testResources() + public void testResources() throws IOException { for (TeleportLocationData data : TeleportLocationData.values()) { String path = data.getIconPath(); assertNotNull(path); - assertNotNull(path, getClass().getResourceAsStream(path)); + try (InputStream in = getClass().getResourceAsStream(path)) + { + assertNotNull(in); + } } } } \ No newline at end of file From c5e05889d88e38cb100d3398797b302dc13a8466 Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Sun, 4 Jul 2021 21:28:23 -0700 Subject: [PATCH 10/18] CoordinateClue: Add South of Shayziens' Wall clue --- .../client/plugins/cluescrolls/clues/CoordinateClue.java | 1 + 1 file changed, 1 insertion(+) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CoordinateClue.java b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CoordinateClue.java index 5f4dfdcc16..58b98cd6cd 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CoordinateClue.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/cluescrolls/clues/CoordinateClue.java @@ -171,6 +171,7 @@ public class CoordinateClue extends ClueScroll implements TextClueScroll, Locati .put(new WorldPoint(3143, 3774, 0), new CoordinateClueInfo("In level 32 Wilderness, by the black chinchompa hunting area.", ZAMORAK_WIZARD)) .put(new WorldPoint(2992, 3941, 0), new CoordinateClueInfo("Wilderness Agility Course, past the log balance.", ZAMORAK_WIZARD)) .put(new WorldPoint(1410, 3611, 0), new CoordinateClueInfo("Lake Molch dock west of Shayzien Encampment.", SARADOMIN_WIZARD)) + .put(new WorldPoint(1409, 3483, 0), new CoordinateClueInfo("South of Shayziens' Wall.", SARADOMIN_WIZARD)) // Elite .put(new WorldPoint(2357, 3151, 0), new CoordinateClueInfo("Lletya.", ARMADYLEAN_OR_BANDOSIAN_GUARD)) .put(new WorldPoint(3587, 3180, 0), new CoordinateClueInfo("Meiyerditch.", ARMADYLEAN_OR_BANDOSIAN_GUARD)) From 557921950a0edf7635d86420bccf3aa6647cf077 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 5 Jul 2021 12:16:03 -0400 Subject: [PATCH 11/18] object indicators: don't mark unnamed objects --- .../objectindicators/ObjectIndicatorsOverlay.java | 6 +++++- .../objectindicators/ObjectIndicatorsPlugin.java | 14 +++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsOverlay.java index 087eff54f6..a984549712 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsOverlay.java @@ -24,6 +24,7 @@ */ package net.runelite.client.plugins.objectindicators; +import com.google.common.base.Strings; import java.awt.BasicStroke; import java.awt.Color; import java.awt.Dimension; @@ -85,7 +86,10 @@ class ObjectIndicatorsOverlay extends Overlay // This is a multiloc composition = composition.getImpostor(); // Only mark the object if the name still matches - if (composition == null || !composition.getName().equals(colorTileObject.getName())) + if (composition == null + || Strings.isNullOrEmpty(composition.getName()) + || "null".equals(composition.getName()) + || !composition.getName().equals(colorTileObject.getName())) { continue; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java index 86a27c8915..5fe914b968 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java @@ -288,6 +288,18 @@ public class ObjectIndicatorsPlugin extends Plugin return; } + ObjectComposition objectComposition = client.getObjectDefinition(object.getId()); + if (objectComposition.getImpostorIds() == null) + { + // Multiloc names are instead checked in the overlay + String name = objectComposition.getName(); + if (Strings.isNullOrEmpty(name) || name.equals("null")) + { + // was marked, but name has changed + return; + } + } + for (ObjectPoint objectPoint : objectPoints) { if (worldPoint.getRegionX() == objectPoint.getRegionX() @@ -297,7 +309,7 @@ public class ObjectIndicatorsPlugin extends Plugin { log.debug("Marking object {} due to matching {}", object, objectPoint); objects.add(new ColorTileObject(object, - client.getObjectDefinition(object.getId()), + objectComposition, objectPoint.getName(), objectPoint.getColor())); break; From 850bf3d333550c37ac0149035a1586c2a9b507ed Mon Sep 17 00:00:00 2001 From: Adam Date: Sun, 4 Jul 2021 21:23:20 -0400 Subject: [PATCH 12/18] api: fix computing scene coord for negative local points Also add an isInScene method to make testing if a point is in the scene easier, and use it. --- .../java/net/runelite/api/Perspective.java | 31 +++++++++---------- .../net/runelite/api/coords/LocalPoint.java | 14 +++++++-- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/Perspective.java b/runelite-api/src/main/java/net/runelite/api/Perspective.java index 06c84f08f2..af61d02134 100644 --- a/runelite-api/src/main/java/net/runelite/api/Perspective.java +++ b/runelite-api/src/main/java/net/runelite/api/Perspective.java @@ -410,6 +410,21 @@ public class Perspective int plane, int zOffset) { + if (!localLocation.isInScene()) + { + return null; + } + + final byte[][][] tileSettings = client.getTileSettings(); + final int sceneX = localLocation.getSceneX(); + final int sceneY = localLocation.getSceneY(); + + int tilePlane = plane; + if (plane < Constants.MAX_Z - 1 && (tileSettings[1][sceneX][sceneY] & TILE_FLAG_BRIDGE) == TILE_FLAG_BRIDGE) + { + tilePlane = plane + 1; + } + final int swX = localLocation.getX() - (sizeX * LOCAL_TILE_SIZE / 2); final int swY = localLocation.getY() - (sizeY * LOCAL_TILE_SIZE / 2); @@ -422,22 +437,6 @@ public class Perspective final int nwX = neX; final int nwY = swY; - final byte[][][] tileSettings = client.getTileSettings(); - - final int sceneX = localLocation.getSceneX(); - final int sceneY = localLocation.getSceneY(); - - if (sceneX < 0 || sceneY < 0 || sceneX >= SCENE_SIZE || sceneY >= SCENE_SIZE) - { - return null; - } - - int tilePlane = plane; - if (plane < Constants.MAX_Z - 1 && (tileSettings[1][sceneX][sceneY] & TILE_FLAG_BRIDGE) == TILE_FLAG_BRIDGE) - { - tilePlane = plane + 1; - } - final int swHeight = getHeight(client, swX, swY, tilePlane) - zOffset; final int nwHeight = getHeight(client, nwX, nwY, tilePlane) - zOffset; final int neHeight = getHeight(client, neX, neY, tilePlane) - zOffset; diff --git a/runelite-api/src/main/java/net/runelite/api/coords/LocalPoint.java b/runelite-api/src/main/java/net/runelite/api/coords/LocalPoint.java index e8df3e9d7d..3a726fc765 100644 --- a/runelite-api/src/main/java/net/runelite/api/coords/LocalPoint.java +++ b/runelite-api/src/main/java/net/runelite/api/coords/LocalPoint.java @@ -95,6 +95,16 @@ public class LocalPoint return (int) Math.hypot(getX() - other.getX(), getY() - other.getY()); } + /** + * Test if this point is in the loaded scene, a 104x104 tile area. + * @return + */ + public boolean isInScene() + { + return x >= 0 && x < Perspective.SCENE_SIZE << Perspective.LOCAL_COORD_BITS + && y >= 0 && y < Perspective.SCENE_SIZE << Perspective.LOCAL_COORD_BITS; + } + /** * Gets the coordinate at the center of the passed tile. * @@ -117,7 +127,7 @@ public class LocalPoint */ public int getSceneX() { - return x >>> Perspective.LOCAL_COORD_BITS; + return x >> Perspective.LOCAL_COORD_BITS; } /** @@ -127,6 +137,6 @@ public class LocalPoint */ public int getSceneY() { - return y >>> Perspective.LOCAL_COORD_BITS; + return y >> Perspective.LOCAL_COORD_BITS; } } From 8d53957b956a2188be03a056e89eba0f6b2d5aa9 Mon Sep 17 00:00:00 2001 From: LlemonDuck Date: Mon, 5 Jul 2021 18:17:01 -0400 Subject: [PATCH 13/18] raids: screenshot overlay from client thread --- .../java/net/runelite/client/plugins/raids/RaidsPlugin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java index f5a3871422..3cc468a39d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/raids/RaidsPlugin.java @@ -872,7 +872,7 @@ public class RaidsPlugin extends Plugin @Override public void hotkeyPressed() { - screenshotScoutOverlay(); + clientThread.invoke(RaidsPlugin.this::screenshotScoutOverlay); } }; From 778d679ab0c5bcfc49a92db4cbf74b35ed4a501e Mon Sep 17 00:00:00 2001 From: Max Weber Date: Tue, 6 Jul 2021 17:39:52 -0600 Subject: [PATCH 14/18] worldmap: fix tooltip widget id --- .../java/net/runelite/api/widgets/WidgetID.java | 5 ++--- .../net/runelite/api/widgets/WidgetInfo.java | 2 +- .../GroundMarkerSharingManager.java | 10 +++++----- .../plugins/instancemap/InstanceMapPlugin.java | 6 +++--- .../runelite/client/menus/MenuManagerTest.java | 16 ++++++++-------- 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java index 2ae045b5b3..2a2f448809 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java @@ -76,7 +76,6 @@ public class WidgetID public static final int SLAYER_REWARDS_GROUP_ID = 426; public static final int PRIVATE_CHAT = 163; public static final int CHATBOX_GROUP_ID = 162; - public static final int WORLD_MAP_MENU_GROUP_ID = 160; public static final int VOLCANIC_MINE_GROUP_ID = 611; public static final int BA_ATTACKER_GROUP_ID = 485; public static final int BA_COLLECTOR_GROUP_ID = 486; @@ -175,8 +174,7 @@ public class WidgetID static final int BOTTOM_BAR = 23; static final int SEARCH = 26; static final int SURFACE_SELECTOR = 34; - static final int TOOLTIP = 43; - static final int OPTION = 48; + static final int TOOLTIP = 41; } static class SlayerRewards @@ -359,6 +357,7 @@ public class WidgetID static final int SPEC_ORB = 29; static final int WORLDMAP_ORB = 43; static final int WIKI_BANNER = 45; + static final int WORLDMAP_OPTIONS = 48; } static class LoginClickToPlayScreen diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java index 1ae170ede5..0a47c8993a 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java @@ -55,7 +55,6 @@ public enum WidgetInfo WORLD_MAP_SEARCH(WidgetID.WORLD_MAP_GROUP_ID, WidgetID.WorldMap.SEARCH), WORLD_MAP_SURFACE_SELECTOR(WidgetID.WORLD_MAP_GROUP_ID, WidgetID.WorldMap.SURFACE_SELECTOR), WORLD_MAP_TOOLTIP(WidgetID.WORLD_MAP_GROUP_ID, WidgetID.WorldMap.TOOLTIP), - WORLD_MAP_OPTION(WidgetID.WORLD_MAP_MENU_GROUP_ID, WidgetID.WorldMap.OPTION), CLUE_SCROLL_TEXT(WidgetID.CLUE_SCROLL_GROUP_ID, WidgetID.Cluescroll.CLUE_TEXT), CLUE_SCROLL_REWARD_ITEM_CONTAINER(WidgetID.CLUE_SCROLL_REWARD_GROUP_ID, WidgetID.Cluescroll.CLUE_SCROLL_ITEM_CONTAINER), @@ -183,6 +182,7 @@ public enum WidgetInfo MINIMAP_SPEC_ORB(WidgetID.MINIMAP_GROUP_ID, WidgetID.Minimap.SPEC_ORB), MINIMAP_WORLDMAP_ORB(WidgetID.MINIMAP_GROUP_ID, WidgetID.Minimap.WORLDMAP_ORB), MINIMAP_WIKI_BANNER(WidgetID.MINIMAP_GROUP_ID, WidgetID.Minimap.WIKI_BANNER), + MINIMAP_WORLDMAP_OPTIONS(WidgetID.MINIMAP_GROUP_ID, WidgetID.Minimap.WORLDMAP_OPTIONS), LMS_INFO(WidgetID.LMS_GROUP_ID, WidgetID.Lms.INFO), LMS_KDA(WidgetID.LMS_INGAME_GROUP_ID, WidgetID.LmsKDA.INFO), diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/groundmarkers/GroundMarkerSharingManager.java b/runelite-client/src/main/java/net/runelite/client/plugins/groundmarkers/GroundMarkerSharingManager.java index ff4be28f8a..d311a51319 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/groundmarkers/GroundMarkerSharingManager.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/groundmarkers/GroundMarkerSharingManager.java @@ -46,7 +46,7 @@ import lombok.extern.slf4j.Slf4j; import net.runelite.api.ChatMessageType; import net.runelite.api.Client; import net.runelite.api.events.WidgetMenuOptionClicked; -import static net.runelite.api.widgets.WidgetInfo.WORLD_MAP_OPTION; +import static net.runelite.api.widgets.WidgetInfo.MINIMAP_WORLDMAP_OPTIONS; import net.runelite.client.chat.ChatMessageManager; import net.runelite.client.chat.QueuedMessage; import net.runelite.client.eventbus.Subscribe; @@ -57,9 +57,9 @@ import net.runelite.client.menus.WidgetMenuOption; @Slf4j class GroundMarkerSharingManager { - private static final WidgetMenuOption EXPORT_MARKERS_OPTION = new WidgetMenuOption("Export", "Ground Markers", WORLD_MAP_OPTION); - private static final WidgetMenuOption IMPORT_MARKERS_OPTION = new WidgetMenuOption("Import", "Ground Markers", WORLD_MAP_OPTION); - private static final WidgetMenuOption CLEAR_MARKERS_OPTION = new WidgetMenuOption("Clear", "Ground Markers", WORLD_MAP_OPTION); + private static final WidgetMenuOption EXPORT_MARKERS_OPTION = new WidgetMenuOption("Export", "Ground Markers", MINIMAP_WORLDMAP_OPTIONS); + private static final WidgetMenuOption IMPORT_MARKERS_OPTION = new WidgetMenuOption("Import", "Ground Markers", MINIMAP_WORLDMAP_OPTIONS); + private static final WidgetMenuOption CLEAR_MARKERS_OPTION = new WidgetMenuOption("Clear", "Ground Markers", MINIMAP_WORLDMAP_OPTIONS); private final GroundMarkerPlugin plugin; private final Client client; @@ -108,7 +108,7 @@ class GroundMarkerSharingManager public void onWidgetMenuOptionClicked(WidgetMenuOptionClicked event) { // ensure that the option clicked is the export markers option - if (event.getWidget() != WORLD_MAP_OPTION) + if (event.getWidget() != MINIMAP_WORLDMAP_OPTIONS) { return; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/instancemap/InstanceMapPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/instancemap/InstanceMapPlugin.java index 003a5bbc2e..f5cc4b6a51 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/instancemap/InstanceMapPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/instancemap/InstanceMapPlugin.java @@ -28,7 +28,7 @@ import com.google.inject.Binder; import javax.inject.Inject; import net.runelite.api.events.GameStateChanged; import net.runelite.api.events.WidgetMenuOptionClicked; -import static net.runelite.api.widgets.WidgetInfo.WORLD_MAP_OPTION; +import static net.runelite.api.widgets.WidgetInfo.MINIMAP_WORLDMAP_OPTIONS; import net.runelite.client.eventbus.Subscribe; import net.runelite.client.input.KeyManager; import net.runelite.client.input.MouseManager; @@ -44,7 +44,7 @@ import net.runelite.client.ui.overlay.OverlayManager; ) public class InstanceMapPlugin extends Plugin { - private final WidgetMenuOption openMapOption = new WidgetMenuOption("Show", "Instance Map", WORLD_MAP_OPTION); + private final WidgetMenuOption openMapOption = new WidgetMenuOption("Show", "Instance Map", MINIMAP_WORLDMAP_OPTIONS); @Inject private InstanceMapInputListener inputListener; @@ -115,7 +115,7 @@ public class InstanceMapPlugin extends Plugin @Subscribe public void onWidgetMenuOptionClicked(WidgetMenuOptionClicked event) { - if (event.getWidget() != WORLD_MAP_OPTION) + if (event.getWidget() != MINIMAP_WORLDMAP_OPTIONS) { return; } diff --git a/runelite-client/src/test/java/net/runelite/client/menus/MenuManagerTest.java b/runelite-client/src/test/java/net/runelite/client/menus/MenuManagerTest.java index 891170ca48..30ca3dfeda 100644 --- a/runelite-client/src/test/java/net/runelite/client/menus/MenuManagerTest.java +++ b/runelite-client/src/test/java/net/runelite/client/menus/MenuManagerTest.java @@ -34,7 +34,7 @@ import static net.runelite.api.MenuAction.CC_OP; import static net.runelite.api.MenuAction.RUNELITE; import net.runelite.api.MenuEntry; import net.runelite.api.events.MenuEntryAdded; -import static net.runelite.api.widgets.WidgetInfo.WORLD_MAP_OPTION; +import static net.runelite.api.widgets.WidgetInfo.MINIMAP_WORLDMAP_OPTIONS; import net.runelite.client.util.Text; import static org.junit.Assert.assertArrayEquals; import org.junit.Before; @@ -70,7 +70,7 @@ public class MenuManagerTest { CANCEL.setOption("Cancel"); CANCEL.setType(MenuAction.CANCEL.getId()); - CANCEL.setParam1(WORLD_MAP_OPTION.getPackedId()); + CANCEL.setParam1(MINIMAP_WORLDMAP_OPTIONS.getPackedId()); } @Before @@ -94,19 +94,19 @@ public class MenuManagerTest final MenuEntry third = new MenuEntry(); first.setOption("Test"); first.setTarget("First Entry"); - first.setParam1(WORLD_MAP_OPTION.getPackedId()); + first.setParam1(MINIMAP_WORLDMAP_OPTIONS.getPackedId()); first.setType(RUNELITE.getId()); second.setOption("Test"); second.setTarget("Second Entry"); - second.setParam1(WORLD_MAP_OPTION.getPackedId()); + second.setParam1(MINIMAP_WORLDMAP_OPTIONS.getPackedId()); second.setType(RUNELITE.getId()); third.setOption("Test"); third.setTarget("Third Entry"); - third.setParam1(WORLD_MAP_OPTION.getPackedId()); + third.setParam1(MINIMAP_WORLDMAP_OPTIONS.getPackedId()); third.setType(RUNELITE.getId()); - menuManager.addManagedCustomMenu(new WidgetMenuOption(first.getOption(), first.getTarget(), WORLD_MAP_OPTION)); - menuManager.addManagedCustomMenu(new WidgetMenuOption(second.getOption(), second.getTarget(), WORLD_MAP_OPTION)); - menuManager.addManagedCustomMenu(new WidgetMenuOption(third.getOption(), third.getTarget(), WORLD_MAP_OPTION)); + menuManager.addManagedCustomMenu(new WidgetMenuOption(first.getOption(), first.getTarget(), MINIMAP_WORLDMAP_OPTIONS)); + menuManager.addManagedCustomMenu(new WidgetMenuOption(second.getOption(), second.getTarget(), MINIMAP_WORLDMAP_OPTIONS)); + menuManager.addManagedCustomMenu(new WidgetMenuOption(third.getOption(), third.getTarget(), MINIMAP_WORLDMAP_OPTIONS)); menuManager.onMenuEntryAdded(new MenuEntryAdded( CANCEL.getOption(), From 2f7463662f6c169a4c96e0a611d3a7fa159b8118 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 6 Jul 2021 14:47:00 -0600 Subject: [PATCH 15/18] Update NPC IDs to 2021-7-7 --- runelite-api/src/main/java/net/runelite/api/NpcID.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/NpcID.java b/runelite-api/src/main/java/net/runelite/api/NpcID.java index 5ef310cdab..01479be017 100644 --- a/runelite-api/src/main/java/net/runelite/api/NpcID.java +++ b/runelite-api/src/main/java/net/runelite/api/NpcID.java @@ -7368,7 +7368,7 @@ public final class NpcID public static final int AMELIA = 8180; public static final int JONATHAN = 8181; public static final int NATURAL_HISTORIAN_8182 = 8182; - public static final int LITTLE_PARASAITE = 8183; + public static final int LITTLE_PARASITE = 8183; public static final int BOULDER_8188 = 8188; public static final int GRAVE_DIGGER = 8189; public static final int JAMES = 8193; @@ -7634,7 +7634,7 @@ public final class NpcID public static final int ELISE = 8538; public static final int ARC_TEST_01 = 8539; public static final int ARC_TEST_02 = 8540; - public static final int LITTLE_PARASITE = 8541; + public static final int LITTLE_PARASITE_8541 = 8541; public static final int ROYAL_GUARD = 8542; public static final int ROYAL_GUARD_8543 = 8543; public static final int UNDOR = 8544; From 50356add98d0f30d93075b76e881cb389bef094e Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Tue, 6 Jul 2021 14:47:01 -0600 Subject: [PATCH 16/18] Update Widget IDs to 2021-7-7 --- .../src/main/java/net/runelite/api/widgets/WidgetID.java | 4 ++-- .../src/main/java/net/runelite/api/widgets/WidgetInfo.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java index 2a2f448809..237f78d08e 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java @@ -671,8 +671,8 @@ public class WidgetID static class ExperienceTracker { - static final int WIDGET = 3; - static final int BOTTOM_BAR = 15; + static final int WIDGET = 4; + static final int BOTTOM_BAR = 16; } static class FairyRingPanel diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java index 0a47c8993a..0511f440c9 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java @@ -530,7 +530,7 @@ public enum WidgetInfo GAUNTLET_TIMER_CONTAINER(WidgetID.GAUNTLET_TIMER_GROUP_ID, WidgetID.GauntletTimer.CONTAINER), HALLOWED_SEPULCHRE_TIMER_CONTAINER(WidgetID.HALLOWED_SEPULCHRE_TIMER_GROUP_ID, WidgetID.HallowedSepulchreTimer.CONTAINER), - HEALTH_OVERLAY_BAR(WidgetID.HEALTH_OVERLAY_BAR_GROUP_ID, 4), + HEALTH_OVERLAY_BAR(WidgetID.HEALTH_OVERLAY_BAR_GROUP_ID, 5), TRAILBLAZER_AREA_TELEPORT(WidgetID.TRAILBLAZER_AREAS_GROUP_ID, WidgetID.TrailblazerAreas.TELEPORT), From 136738fb1e7ef99857730c209a7f75dbb87c2fb1 Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Wed, 7 Jul 2021 11:03:47 +0000 Subject: [PATCH 17/18] Release 1.7.15 --- cache-client/pom.xml | 2 +- cache-updater/pom.xml | 2 +- cache/pom.xml | 2 +- http-api/pom.xml | 2 +- http-service/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-jshell/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index 9f4a8b1935..994766049d 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.15-SNAPSHOT + 1.7.15 cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index 8336a86d91..d692b007f4 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.15-SNAPSHOT + 1.7.15 Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 519f6f2013..5361581f30 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.15-SNAPSHOT + 1.7.15 cache diff --git a/http-api/pom.xml b/http-api/pom.xml index 7c5cfaef5f..6014d3fb3f 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.15-SNAPSHOT + 1.7.15 Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index b18670df11..f5e63443ec 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.15-SNAPSHOT + 1.7.15 Web Service diff --git a/pom.xml b/pom.xml index 4f8caaacd6..f098b6cf81 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.15-SNAPSHOT + 1.7.15 pom RuneLite @@ -61,7 +61,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - HEAD + runelite-parent-1.7.15 diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 42d35244d9..171b2ea7ea 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.15-SNAPSHOT + 1.7.15 runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index bc416cfac1..f6002efd69 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.15-SNAPSHOT + 1.7.15 client diff --git a/runelite-jshell/pom.xml b/runelite-jshell/pom.xml index 059090cbbf..be6a15e19f 100644 --- a/runelite-jshell/pom.xml +++ b/runelite-jshell/pom.xml @@ -30,7 +30,7 @@ net.runelite runelite-parent - 1.7.15-SNAPSHOT + 1.7.15 jshell diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index 69d6bbf343..ac71a2c2a2 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.15-SNAPSHOT + 1.7.15 script-assembler-plugin From 05846303aeb4fb8b5af056a6447a4253159bf042 Mon Sep 17 00:00:00 2001 From: Runelite auto updater Date: Wed, 7 Jul 2021 11:03:51 +0000 Subject: [PATCH 18/18] Bump for 1.7.16-SNAPSHOT --- cache-client/pom.xml | 2 +- cache-updater/pom.xml | 2 +- cache/pom.xml | 2 +- http-api/pom.xml | 2 +- http-service/pom.xml | 2 +- pom.xml | 4 ++-- runelite-api/pom.xml | 2 +- runelite-client/pom.xml | 2 +- runelite-jshell/pom.xml | 2 +- runelite-script-assembler-plugin/pom.xml | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/cache-client/pom.xml b/cache-client/pom.xml index 994766049d..04cea45525 100644 --- a/cache-client/pom.xml +++ b/cache-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.15 + 1.7.16-SNAPSHOT cache-client diff --git a/cache-updater/pom.xml b/cache-updater/pom.xml index d692b007f4..45456766ac 100644 --- a/cache-updater/pom.xml +++ b/cache-updater/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.15 + 1.7.16-SNAPSHOT Cache Updater diff --git a/cache/pom.xml b/cache/pom.xml index 5361581f30..fb3d60842c 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.15 + 1.7.16-SNAPSHOT cache diff --git a/http-api/pom.xml b/http-api/pom.xml index 6014d3fb3f..3940730d95 100644 --- a/http-api/pom.xml +++ b/http-api/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.15 + 1.7.16-SNAPSHOT Web API diff --git a/http-service/pom.xml b/http-service/pom.xml index f5e63443ec..f4a232aa6b 100644 --- a/http-service/pom.xml +++ b/http-service/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.15 + 1.7.16-SNAPSHOT Web Service diff --git a/pom.xml b/pom.xml index f098b6cf81..101c3202dc 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.7.15 + 1.7.16-SNAPSHOT pom RuneLite @@ -61,7 +61,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - runelite-parent-1.7.15 + HEAD diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 171b2ea7ea..d37e97322a 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.15 + 1.7.16-SNAPSHOT runelite-api diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index f6002efd69..084f65a6e0 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.15 + 1.7.16-SNAPSHOT client diff --git a/runelite-jshell/pom.xml b/runelite-jshell/pom.xml index be6a15e19f..1663a1f9a9 100644 --- a/runelite-jshell/pom.xml +++ b/runelite-jshell/pom.xml @@ -30,7 +30,7 @@ net.runelite runelite-parent - 1.7.15 + 1.7.16-SNAPSHOT jshell diff --git a/runelite-script-assembler-plugin/pom.xml b/runelite-script-assembler-plugin/pom.xml index ac71a2c2a2..1d4c973779 100644 --- a/runelite-script-assembler-plugin/pom.xml +++ b/runelite-script-assembler-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.7.15 + 1.7.16-SNAPSHOT script-assembler-plugin