Clean up Client - visibleWorlds & canRequestCharlist

canRequestCharlist is a relic from the past when "View all char"
functionality was hacked together with wrong packets.

visibleWorlds I'm less sure about. I suppose it's useful if you add world
(via command) while someone is still on the login screen.
But the functionality of adding/removing worlds live is a recipe for disaster
and will eventually (likely) be removed.
This commit is contained in:
P0nk
2023-08-06 20:02:39 +02:00
parent f44083aeba
commit 48d9aaa871
4 changed files with 8 additions and 37 deletions

View File

@@ -1497,11 +1497,8 @@ public class Server {
}
}
public SortedMap<Integer, List<Character>> loadAccountCharlist(int accountId, int visibleWorlds) {
public SortedMap<Integer, List<Character>> loadAccountCharlist(int accountId) {
List<World> worlds = this.getWorlds();
if (worlds.size() > visibleWorlds) {
worlds = worlds.subList(0, visibleWorlds);
}
SortedMap<Integer, List<Character>> worldChrs = new TreeMap<>();
int chrTotal = 0;