Post: [PI] Instant Switching
04-08-2015, 10:41 PM #1
Stunz
Former Staff
(adsbygoogle = window.adsbygoogle || []).push({});
ConnectionHandler.java - Replace:

    
public void messageReceived(IoSession arg0, Object arg1) throws Exception {
if (arg0.getAttachment() != null) {
Packet packet = (Packet)arg1;
Client client = (client) arg0.getAttachment();
if(packet.getId() == 41) {
client.timeOutCounter = 0;
client.wearId = packet.readUnsignedWord();
client.wearSlot = packet.readUnsignedWordA();
client.interfaceId = packet.readUnsignedWordA();
client.getItems().wearItem(client.wearId, client.wearSlot);
} else {
client.queueMessage((Packet) arg1);
}
}
}


Packet.java - Add:

    
public int readUnsignedWord() {
caret += 2;
return ((pData[caret - 2] & 0xff) << Cool Man (aka Tustin) + (pData[caret - 1] & 0xff);
}

public int readUnsignedWordA() {
caret += 2;
return ((pData[caret - 2] & 0xff) << Cool Man (aka Tustin) + (pData[caret - 1] - 128 & 0xff);
}
04-14-2015, 11:41 PM #2
Why not using final modifiers aswell protected incase its actually in an package ?

Also the replace is bullshit depending on which server base you are. (last time I checked years ago their where mutliple bases)

The following user thanked mx1000 for this useful post:

Stunz
04-14-2015, 11:47 PM #3
Stunz
Former Staff
Originally posted by mx1000 View Post
Why not using final modifiers aswell protected incase its actually in an package ?

Also the replace is bullshit depending on which server base you are. (last time I checked years ago their where mutliple bases)
This method is PI based.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo