runescape-client: fix the thing

This commit is contained in:
ThatGamerBlue
2020-12-11 06:14:29 +00:00
parent f74baf08ce
commit 463bc42f5f
325 changed files with 35526 additions and 35531 deletions

View File

@@ -66,7 +66,7 @@ public class WorldMapSection2 implements WorldMapSection {
int field218;
WorldMapSection2() {
}
} // L: 18
@ObfuscatedName("h")
@ObfuscatedSignature(
@@ -80,18 +80,18 @@ public class WorldMapSection2 implements WorldMapSection {
}
if (var1.regionHighX < this.field216) {
var1.regionHighX = this.field216;
var1.regionHighX = this.field216; // L: 22
}
if (var1.regionLowY > this.field213) {
if (var1.regionLowY > this.field213) { // L: 23
var1.regionLowY = this.field213;
}
if (var1.regionHighY < this.field218) {
if (var1.regionHighY < this.field218) { // L: 24
var1.regionHighY = this.field218;
}
}
} // L: 25
@ObfuscatedName("v")
@ObfuscatedSignature(
@@ -100,10 +100,10 @@ public class WorldMapSection2 implements WorldMapSection {
)
@Export("containsCoord")
public boolean containsCoord(int var1, int var2, int var3) {
if (var1 >= this.minPlane && var1 < this.planes + this.minPlane) {
return var2 >> 6 >= this.regionStartX && var2 >> 6 <= this.regionEndX && var3 >> 6 >= this.regionStartY && var3 >> 6 <= this.regionEndY;
if (var1 >= this.minPlane && var1 < this.planes + this.minPlane) { // L: 28
return var2 >> 6 >= this.regionStartX && var2 >> 6 <= this.regionEndX && var3 >> 6 >= this.regionStartY && var3 >> 6 <= this.regionEndY; // L: 31
} else {
return false;
return false; // L: 29
}
}
@@ -114,7 +114,7 @@ public class WorldMapSection2 implements WorldMapSection {
)
@Export("containsPosition")
public boolean containsPosition(int var1, int var2) {
return var1 >> 6 >= this.field209 && var1 >> 6 <= this.field216 && var2 >> 6 >= this.field213 && var2 >> 6 <= this.field218;
return var1 >> 6 >= this.field209 && var1 >> 6 <= this.field216 && var2 >> 6 >= this.field213 && var2 >> 6 <= this.field218; // L: 35
}
@ObfuscatedName("w")
@@ -124,11 +124,11 @@ public class WorldMapSection2 implements WorldMapSection {
)
@Export("getBorderTileLengths")
public int[] getBorderTileLengths(int var1, int var2, int var3) {
if (!this.containsCoord(var1, var2, var3)) {
return null;
if (!this.containsCoord(var1, var2, var3)) { // L: 39
return null; // L: 40
} else {
int[] var4 = new int[]{this.field209 * 64 - this.regionStartX * 64 + var2, var3 + (this.field213 * 64 - this.regionStartY * 64)};
return var4;
int[] var4 = new int[]{var2 + (this.field209 * 64 - this.regionStartX * 64), var3 + (this.field213 * 64 - this.regionStartY * 64)}; // L: 42 43 44
return var4; // L: 45
}
}
@@ -139,12 +139,12 @@ public class WorldMapSection2 implements WorldMapSection {
)
@Export("coord")
public Coord coord(int var1, int var2) {
if (!this.containsPosition(var1, var2)) {
return null;
if (!this.containsPosition(var1, var2)) { // L: 49
return null; // L: 50
} else {
int var3 = this.regionStartX * 64 - this.field209 * 64 + var1;
int var4 = this.regionStartY * 64 - this.field213 * 64 + var2;
return new Coord(this.minPlane, var3, var4);
int var3 = this.regionStartX * 64 - this.field209 * 64 + var1; // L: 52
int var4 = var2 + (this.regionStartY * 64 - this.field213 * 64); // L: 53
return new Coord(this.minPlane, var3, var4); // L: 54
}
}
@@ -155,18 +155,18 @@ public class WorldMapSection2 implements WorldMapSection {
)
@Export("read")
public void read(Buffer var1) {
this.minPlane = var1.readUnsignedByte();
this.planes = var1.readUnsignedByte();
this.regionStartX = var1.readUnsignedShort();
this.regionStartY = var1.readUnsignedShort();
this.regionEndX = var1.readUnsignedShort();
this.regionEndY = var1.readUnsignedShort();
this.field209 = var1.readUnsignedShort();
this.field213 = var1.readUnsignedShort();
this.field216 = var1.readUnsignedShort();
this.field218 = var1.readUnsignedShort();
this.postRead();
}
this.minPlane = var1.readUnsignedByte(); // L: 58
this.planes = var1.readUnsignedByte(); // L: 59
this.regionStartX = var1.readUnsignedShort(); // L: 60
this.regionStartY = var1.readUnsignedShort(); // L: 61
this.regionEndX = var1.readUnsignedShort(); // L: 62
this.regionEndY = var1.readUnsignedShort(); // L: 63
this.field209 = var1.readUnsignedShort(); // L: 64
this.field213 = var1.readUnsignedShort(); // L: 65
this.field216 = var1.readUnsignedShort(); // L: 66
this.field218 = var1.readUnsignedShort(); // L: 67
this.postRead(); // L: 68
} // L: 69
@ObfuscatedName("n")
@ObfuscatedSignature(
@@ -175,7 +175,7 @@ public class WorldMapSection2 implements WorldMapSection {
)
@Export("postRead")
void postRead() {
}
} // L: 71
@ObfuscatedName("w")
@ObfuscatedSignature(
@@ -183,7 +183,7 @@ public class WorldMapSection2 implements WorldMapSection {
garbageValue = "-695771514"
)
public static boolean method378(int var0) {
return (var0 >> 28 & 1) != 0;
return (var0 >> 28 & 1) != 0; // L: 21
}
@ObfuscatedName("hf")
@@ -192,21 +192,21 @@ public class WorldMapSection2 implements WorldMapSection {
garbageValue = "240691072"
)
static final void method377(boolean var0) {
FontName.playPcmPlayers();
++Client.packetWriter.pendingWrites;
if (Client.packetWriter.pendingWrites >= 50 || var0) {
Client.packetWriter.pendingWrites = 0;
if (!Client.field696 && Client.packetWriter.getSocket() != null) {
PacketBufferNode var1 = ItemContainer.getPacketBufferNode(ClientPacket.field2322, Client.packetWriter.isaacCipher);
Client.packetWriter.addNode(var1);
FontName.playPcmPlayers(); // L: 5471
++Client.packetWriter.pendingWrites; // L: 5472
if (Client.packetWriter.pendingWrites >= 50 || var0) { // L: 5473
Client.packetWriter.pendingWrites = 0; // L: 5474
if (!Client.field696 && Client.packetWriter.getSocket() != null) { // L: 5475
PacketBufferNode var1 = ItemContainer.getPacketBufferNode(ClientPacket.field2322, Client.packetWriter.isaacCipher); // L: 5477
Client.packetWriter.addNode(var1); // L: 5478
try {
Client.packetWriter.flush();
} catch (IOException var3) {
Client.field696 = true;
Client.packetWriter.flush(); // L: 5480
} catch (IOException var3) { // L: 5482
Client.field696 = true; // L: 5483
}
}
}
}
} // L: 5486
}