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.
This commit is contained in:
Adam
2022-01-03 14:26:52 -05:00
parent 8bdf78c874
commit fb035a8c13
2 changed files with 9 additions and 8 deletions

View File

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

View File

@@ -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;
});
}