Just to piss off
this troll I quickly downloaded Ruse v2 and fixed the Construction packets which were messed up. There's still some work required to make the Construction fully functional, but I'd rather not release that right now.
In PacketSender.java, find and replace:
Code:
public PacketSender constructMapRegion(Palette palette) {
PacketBuilder bldr = new PacketBuilder(241, PacketType.SHORT);
bldr.putShort(player.getPosition().getRegionY() + 6, ValueType.A);
bldr.putShort(player.getPosition().getRegionX() + 6);
bldr.initializeAccess(AccessType.BIT);
for (int z = 0; z < 4; z++) {
for (int x = 0; x < 13; x++) {
for (int y = 0; y < 13; y++) {
PaletteTile tile = palette.getTile(x, y, z);
boolean b = false;
if (x < 2 || x > 10 || y < 2 || y > 10)
b = true;
bldr.putBits(1, !b && tile != null ? 1 : 0);
if (tile != null && !b) {
bldr.putBits(
26,
tile.getX() << 14 | tile.getY() << 3
| tile.getZ() << 24
| tile.getRotation() << 1);
}
}
}
}
bldr.initializeAccess(AccessType.BYTE);
player.getSession().queueMessage(bldr);
return this;
}
Client.java, find and replace:
Code:
if (pktType == 241) {
i11 = getInputBuffer().method435();
l2 = getInputBuffer().getUnsignedShort();
getInputBuffer().initBitAccess();
for (int j16 = 0; j16 < 4; j16++) {
for (int l20 = 0; l20 < 13; l20++) {
for (int j23 = 0; j23 < 13; j23++) {
int emptyFloor = getInputBuffer().getBits(1);
if (emptyFloor == 1) {
anIntArrayArrayArray1129[j16][l20][j23] = getInputBuffer().getBits(26);
} else {
anIntArrayArrayArray1129[j16][l20][j23] = -1;
}
}
}
}
getInputBuffer().finishBitAccess();
aBoolean1159 = true;
}
if (pktType != 241 && anInt1069 == l2 && anInt1070 == i11 && loadingStage == 2) {
pktType = -1;
return true;
}
Oh and make sure the size of packet 241 is -2 (it should be by default).
Fix for construction object spawns packet:
In Client.java, find and replace the following:
Code:
case 4:
case 44:
case 84:
case 101:
case 105:
case 117:
case 147:
case 151:
case 156:
case 160:
case 215:
parseEntityPacket(getInputBuffer(), pktType);
pktType = -1;
return true;
Under void parseEntityPacket, add the following:
Code:
if (j == 152) {
int tileData = stream.method426();
int tileX = anInt1268 + (tileData >> 4 & 7);
int tileY = anInt1268 + (tileData & 7);
int objID = stream.getShortBigEndian();
int typeAndFaceBits = stream.method428();
int obType = typeAndFaceBits >> 2;
int obFace = typeAndFaceBits & 3;
int toPlane = stream.getByte();
int l17 = anIntArray1177[obType];
if (tileX >= 0 && tileY >= 0 && tileX < 104 && tileY < 104)
method130(-1, objID, obFace, l17, tileY, obType,
toPlane, tileX, 0);
return;
}