From fb035a8c135edcd81e6a36c09bd47d92af99eafd Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 3 Jan 2022 14:26:52 -0500 Subject: [PATCH] world map: remove quest icon load retry if not logged in The quest icons are also loaded on world map open, so all this has to do is load the icons if the player is logged in with the map open at the time the plugin is started. --- .../net/runelite/client/callback/ClientThread.java | 4 ++++ .../client/plugins/worldmap/WorldMapPlugin.java | 13 +++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/callback/ClientThread.java b/runelite-client/src/main/java/net/runelite/client/callback/ClientThread.java index 2470b55056..17d2ffb177 100644 --- a/runelite-client/src/main/java/net/runelite/client/callback/ClientThread.java +++ b/runelite-client/src/main/java/net/runelite/client/callback/ClientThread.java @@ -110,6 +110,10 @@ public class ClientThread { ir.remove(); } + else + { + log.trace("Deferring task {}", r); + } } } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java index cfe7714b5e..36b11e2823 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/worldmap/WorldMapPlugin.java @@ -488,17 +488,14 @@ public class WorldMapPlugin extends Plugin } // Must setup the quest icons on the client thread, after the player has logged in. - clientThread.invokeLater(() -> + clientThread.invoke(() -> { - if (client.getGameState() != GameState.LOGGED_IN) + if (client.getGameState() == GameState.LOGGED_IN) { - return false; + Arrays.stream(QuestStartLocation.values()) + .map(this::createQuestStartPoint) + .forEach(worldMapPointManager::add); } - - Arrays.stream(QuestStartLocation.values()) - .map(this::createQuestStartPoint) - .forEach(worldMapPointManager::add); - return true; }); }