When I am at SERVERLIST and I tried selecting any channel other than channel 1, I receive this problem ![]()
I have no problem entering channel 1 though. What could have gone wrong? I tried looking into my SERVERLIST but I doubt it was my SERVERLIST
I have no problem entering channel 1 though. What could have gone wrong? I tried looking into my SERVERLIST but I doubt it was my SERVERLIST
PHP Code:
public static byte[] getServerList(int serverId, Map<Integer, Integer> channelLoad) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
System.out.println("START GETSERVERLIST");
mplew.writeShort(SendPacketOpcode.SERVERLIST.getValue());
mplew.write(serverId);
String worldName = LoginServer.getTrueServerName();
System.out.println("worldName: " + worldName);
mplew.writeMapleAsciiString(worldName);
mplew.write(WorldOption.getById(serverId).getFlag());
mplew.writeMapleAsciiString(LoginServer.getEventMessage());
mplew.writeShort(100);
mplew.writeShort(100);
//mplew.write(0);
int lastChannel = 1;
Set<Integer> channels = channelLoad.keySet();
for (int i = 30; i > 0; i--) {
if (channels.contains(i)) {
lastChannel = i;
break;
}
}
System.out.println("lastChannel: " + lastChannel);
mplew.write(lastChannel);
int load;
for (int i = 1; i <= lastChannel; i++) {
if (channels.contains(i)) {
load = channelLoad.get(i);
} else {
load = 1200;
}
mplew.writeMapleAsciiString(worldName + "-" + i);
mplew.writeInt(load);
mplew.write(serverId);
mplew.writeShort(i - 1);
}
mplew.writeShort(0);
mplew.writeInt(GameConstants.GMS ? 0 : GameConstants.getCurrentDate_NoTime());
mplew.write(0);
System.out.println("END GETSERVERLIST");
return mplew.getPacket();
}