Revert "world map: use game state change event to load quest icons"

This reverts commit 97c484fc38.
This commit is contained in:
Adam
2022-01-03 14:25:14 -05:00
parent a2f8a4219e
commit 8bdf78c874
2 changed files with 8 additions and 19 deletions

View File

@@ -110,10 +110,6 @@ public class ClientThread
{
ir.remove();
}
else
{
log.trace("Deferring task {}", r);
}
}
}
}

View File

@@ -34,7 +34,6 @@ import net.runelite.api.Client;
import net.runelite.api.GameState;
import net.runelite.api.Quest;
import net.runelite.api.Skill;
import net.runelite.api.events.GameStateChanged;
import net.runelite.api.events.StatChanged;
import net.runelite.api.events.WidgetLoaded;
import net.runelite.api.widgets.WidgetID;
@@ -169,15 +168,6 @@ public class WorldMapPlugin extends Plugin
woodcuttingLevel = 0;
}
@Subscribe
public void onGameStateChanged(GameStateChanged gameStateChanged)
{
if (gameStateChanged.getGameState() == GameState.LOGGED_IN)
{
updateQuestStartPointIcons();
}
}
@Subscribe
public void onConfigChanged(ConfigChanged event)
{
@@ -498,14 +488,17 @@ public class WorldMapPlugin extends Plugin
}
// Must setup the quest icons on the client thread, after the player has logged in.
clientThread.invoke(() ->
clientThread.invokeLater(() ->
{
if (client.getGameState() == GameState.LOGGED_IN)
if (client.getGameState() != GameState.LOGGED_IN)
{
Arrays.stream(QuestStartLocation.values())
.map(this::createQuestStartPoint)
.forEach(worldMapPointManager::add);
return false;
}
Arrays.stream(QuestStartLocation.values())
.map(this::createQuestStartPoint)
.forEach(worldMapPointManager::add);
return true;
});
}