Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

Sign up now!

Resolved WorldSelect#getWorld returns null unless if it's in the lobby.

Joined
Nov 9, 2013
Messages
16
WorldSelect#getWorld seems to return null unless it's been logged in game atleast once (limited testing, but i think once it has logged ingame once, it no longer returns null), but this causes things such as WorldSelect.setPreferedWorld on onstart to function properly

(Ignore title where i said it returns null unless it's in lobby)
 
Last edited:
Engineer
Joined
Jul 28, 2013
Messages
2,776
The data is taken from the same source as the world selection list and thus is not available until Jagex decides to populate it.
 
Joined
Nov 9, 2013
Messages
16
Doesn't the data stay the same? It would be beneficial if we could set a preferred world before logging in.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
Doesn't the data stay the same? It would be beneficial if we could set a preferred world before logging in.
Jagex periodically adds new worlds, removes old ones, and changes the general assignments. They also frequently take them down for maintenance and other things and because of that we need to always have access to the latest worlds and their relevant information.
 
Engineer
Joined
Jul 28, 2013
Messages
2,776
By my understanding this is desired behavior and not a bug. Resolving.
I'm not entirely sure if I'd say this is entirely resolved or not. Optimally you would be able to get world data even if it's not currently loaded in rs client so that you can set it in onStart, however it would mean slightly changing our implementation.
What are your thoughts on
A. An hourly cron job that parses (or simply requests) a list of the currently available worlds and their attributes, and then stores them. We could then provide this list while syncing with our server, and use this list until the list from within the rs client is available.
B. Caching the list of worlds locally after the first time they become available, and using the cache until the list is available from within the rs client. This would work for every run after the first, however it wouldn't work for the first time and it would also make it so the list will be out of date if they haven't ran the client recently.
 
Author of MaxiBots
Joined
Dec 3, 2013
Messages
6,771
I'm not entirely sure if I'd say this is entirely resolved or not. Optimally you would be able to get world data even if it's not currently loaded in rs client so that you can set it in onStart, however it would mean slightly changing our implementation.
What are your thoughts on
A. An hourly cron job that parses (or simply requests) a list of the currently available worlds and their attributes, and then stores them. We could then provide this list while syncing with our server, and use this list until the list from within the rs client is available.
B. Caching the list of worlds locally after the first time they become available, and using the cache until the list is available from within the rs client. This would work for every run after the first, however it wouldn't work for the first time and it would also make it so the list will be out of date if they haven't ran the client recently.
I'd go for A :) @Arbiter
 
Primate
Joined
Oct 30, 2014
Messages
3,470
I'm not entirely sure if I'd say this is entirely resolved or not. Optimally you would be able to get world data even if it's not currently loaded in rs client so that you can set it in onStart, however it would mean slightly changing our implementation.
What are your thoughts on
A. An hourly cron job that parses (or simply requests) a list of the currently available worlds and their attributes, and then stores them. We could then provide this list while syncing with our server, and use this list until the list from within the rs client is available.
B. Caching the list of worlds locally after the first time they become available, and using the cache until the list is available from within the rs client. This would work for every run after the first, however it wouldn't work for the first time and it would also make it so the list will be out of date if they haven't ran the client recently.
Option A would be nice.
 
Top