1) Use this and it will works. (The 6 at the end of the code are the character slots).
PHP Code:
public void sendCharList(int server) {
this.session.write(MaplePacketCreator.getCharList(this, server, 6));
}
And replace your GetCharList in Maplepacketcreator with this:
PHP Code:
public static MaplePacket getCharList(MapleClient c, int serverId, int charslots) {
MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
mplew.writeShort(SendOpcode.CHARLIST.getValue());
mplew.write(0);
List<MapleCharacter> chars = c.loadCharacters(serverId);
mplew.write((byte) chars.size());
for (final MapleCharacter chr : chars) {
addCharEntry(mplew, chr, false, false);
}
mplew.write(1);
mplew.write(0); //v109.2 (my guess: some black cipher related stuff since its all that was added in .2)
mplew.writeInt(charslots);
mplew.writeInt(0);
System.out.println(mplew.toString());
return mplew.getPacket();
}
2) Replace
PHP Code:
mplew.writeAsciiString(chr.getName(), 13);
With :
PHP Code:
mplew.writeAsciiString(StringUtil.getRightPaddedStr(chr.getName(), '\0', 13));
And for SimpleDateFormat and Calender add this to your imports:
PHP Code:
import java.text.SimpleDateFormat;
Or just simply click on the error ALT + ENTER --> Add Imports.
Next time use [PHP.][./PHP] or CODE Tags. Thank you :)