Ryan
June 27th, 2010, 18:03
Picture says it all.
Only the registered members can see the link.
Ignore the 474 chat box, this is galkons refactored, witch it wont be using.
Now, for the chat, the chat goes in the text box, but not above the character. I looked at Riot Scape and Creative Scapes chat packet, and it looks pretty much exactly the same. Does anybody see anything wrong with it?
public class Chat implements Packet {
public static final int REGULAR_CHAT = 4;
@Override
public void handlePacket(Client client, int packetType, int packetSize) {
switch (packetType) {
case REGULAR_CHAT:
client.chatTextEffects = client.getInStream().readUnsignedByteS();
client.chatTextColor = client.getInStream().readUnsignedByteS();
client.chatTextSize = (byte) (packetSize - 2);
client.getInStream().readBytes_reverseA(client.cha tText,
client.chatTextSize, 0);
client.chatTextUpdateRequired = true;
client.updateRequired = true;
break;
}
}
}
Ignore how I'm using a switch statement for only one case, this class contains chat related stuff, regular chat, private messaging, etc. I just shortened it for you guys.
Only the registered members can see the link.
Ignore the 474 chat box, this is galkons refactored, witch it wont be using.
Now, for the chat, the chat goes in the text box, but not above the character. I looked at Riot Scape and Creative Scapes chat packet, and it looks pretty much exactly the same. Does anybody see anything wrong with it?
public class Chat implements Packet {
public static final int REGULAR_CHAT = 4;
@Override
public void handlePacket(Client client, int packetType, int packetSize) {
switch (packetType) {
case REGULAR_CHAT:
client.chatTextEffects = client.getInStream().readUnsignedByteS();
client.chatTextColor = client.getInStream().readUnsignedByteS();
client.chatTextSize = (byte) (packetSize - 2);
client.getInStream().readBytes_reverseA(client.cha tText,
client.chatTextSize, 0);
client.chatTextUpdateRequired = true;
client.updateRequired = true;
break;
}
}
}
Ignore how I'm using a switch statement for only one case, this class contains chat related stuff, regular chat, private messaging, etc. I just shortened it for you guys.