[UPDATED][Release][OFFICIAL] v60 DC fix
First, in net.sf.odinms.net.mina.MaplePacketEncoder replace your encode function with this:
Code:
public void encode(IoSession session, Object message, ProtocolEncoderOutput out) throws Exception {
MapleClient client = (MapleClient) session.getAttribute(MapleClient.CLIENT_KEY);
if (client != null) {
byte[] input = ((MaplePacket) message).getBytes();
byte[] unencrypted = new byte[input.length];
System.arraycopy(input, 0, unencrypted, 0, input.length);
byte[] ret = new byte[unencrypted.length + 4];
byte[] header = client.getSendCrypto().getPacketHeader(unencrypted.length);
MapleCustomEncryption.encryptData(unencrypted);
synchronized(client.getSendCrypto()){
client.getSendCrypto().crypt(unencrypted);
System.arraycopy(header, 0, ret, 0, 4);
System.arraycopy(unencrypted, 0, ret, 4, unencrypted.length);
ByteBuffer out_buffer = ByteBuffer.wrap(ret);
out.write(out_buffer);
}
} else { // no client object created yet, send unencrypted (hello)
out.write(ByteBuffer.wrap(((MaplePacket) message).getBytes()));
}
}
Done.
CREDITS:
Me for making it
Bui for the old funnybytes (is not needed)
Danny(leifde) for telling me the old way (which didn't work)
ExtremeDevilz for testing.
A special person. <3