First one sends byteA via stream class.
|
What do the red colored parts do?Code:public void initialize() { synchronized (this) { outStream.createFrame(249); outStream.writeByteA(1); // 1 for members, zero for free outStream.writeWordBigEndianA(playerId); for (int j = 0; j < Server.playerHandler.players.length; j++) { if (j == playerId) continue; if (Server.playerHandler.players[j] != null) { if (Server.playerHandler.players[j].playerName.equalsIgnoreCase(playerName)) disconnected = true; } }
Use Eclipse and highlight any statement, and it will tell you what it means.
packet 249 is the first packet sent after login, it sends the playerid and the member byte, 0 means f2p world and will show things as "member items", 1 means p2p world, and will show all item/member names, playerId is your id in the clientside player array, without it your player updating will mess up,
The second bit checks whether you're already online, if you are it disconnects you..and a stupid way of doing it if i do say so myself.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |