Clarify On Login Packets (#63)
* Clarify On Login Packets Clarify On Login Packets * Rebase Code On PIN/PIC For Login Packet Rebase Code On PIN/PIC For Login Packet * Whoops Sorry ! Whoops Sorry ! * Fixes DB Scheme Fixes DB Scheme * Fixed LoginPacket Information Fixed LoginPacket Information
This commit is contained in:
@@ -670,34 +670,36 @@ public class MaplePacketCreator {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a successful authentication and PIN Request packet.
|
||||
* Gets a successful authentication packet.
|
||||
*
|
||||
* @param c
|
||||
* @param account The account name.
|
||||
* @return The PIN request packet.
|
||||
* @return the successful authentication packet
|
||||
*/
|
||||
public static byte[] getAuthSuccess(MapleClient c) {
|
||||
final MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
|
||||
mplew.writeShort(SendOpcode.LOGIN_STATUS.getValue());
|
||||
mplew.writeInt(0);
|
||||
mplew.writeShort(0);
|
||||
mplew.writeInt(c.getAccID()); //user id
|
||||
mplew.writeInt(c.getAccID());
|
||||
mplew.write(c.getGender());
|
||||
mplew.writeBool(c.getGMLevel() > 0); //admin byte
|
||||
short toWrite = (short) (c.getGMLevel() * 64);
|
||||
//toWrite = toWrite |= 0x100; only in higher versions
|
||||
mplew.write(toWrite >= 0x80 ? 0x80 : 0);//0x80 is admin, 0x20 and 0x40 = subgm
|
||||
|
||||
mplew.writeBool(c.getGMLevel() > 0);
|
||||
//mplew.writeShort(toWrite > 0x80 ? 0x80 : toWrite); only in higher versions...
|
||||
|
||||
mplew.write(0); // Admin Byte. 0x80,0x40,0x20.. Rubbish.
|
||||
mplew.write(0); // Country Code.
|
||||
|
||||
mplew.writeMapleAsciiString(c.getAccountName());
|
||||
mplew.write(0);
|
||||
mplew.write(0); //isquietbanned
|
||||
mplew.writeLong(0);//isquietban time
|
||||
mplew.writeLong(c.getSessionId()); //creation time
|
||||
mplew.writeInt(0);
|
||||
|
||||
if (ServerConstants.ENABLE_PIN) mplew.writeShort(0);
|
||||
else mplew.writeShort(2);
|
||||
mplew.write(0); // IsQuietBan
|
||||
mplew.writeLong(0);//IsQuietBanTimeStamp
|
||||
mplew.writeLong(0); //CreationTimeStamp
|
||||
|
||||
mplew.writeInt(1); // 1: Remove the "Select the world you want to play in"
|
||||
|
||||
mplew.write(ServerConstants.ENABLE_PIN ? 0 : 1); // 0 = Pin-System Enabled, 1 = Disabled
|
||||
mplew.write(ServerConstants.ENABLE_PIC ? (c.getPic() == null ? 0 : 1) : 2); // 0 = Register PIC, 1 = Ask for PIC, 2 = Disabled
|
||||
|
||||
return mplew.getPacket();
|
||||
}
|
||||
@@ -861,12 +863,8 @@ public class MaplePacketCreator {
|
||||
for (MapleCharacter chr : chars) {
|
||||
addCharEntry(mplew, chr, false);
|
||||
}
|
||||
if (ServerConstants.ENABLE_PIC) {
|
||||
mplew.write(c.getPic() == null || c.getPic().length() == 0 ? 0 : 1);
|
||||
} else {
|
||||
mplew.write(2);
|
||||
}
|
||||
|
||||
mplew.write(ServerConstants.ENABLE_PIC ? (c.getPic() == null ? 0 : 1) : 2);
|
||||
mplew.writeInt(c.getCharacterSlots());
|
||||
return mplew.getPacket();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user