project: rev 192

This commit is contained in:
ThatGamerBlue
2020-10-21 14:30:57 +02:00
parent 47583ab7c6
commit 88599e5dd3
355 changed files with 53400 additions and 49134 deletions

View File

@@ -3,85 +3,102 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import net.runelite.mapping.Export;
import net.runelite.mapping.Implements;
import net.runelite.mapping.ObfuscatedGetter;
import net.runelite.mapping.ObfuscatedName;
import net.runelite.mapping.ObfuscatedSignature;
@ObfuscatedName("fh")
@ObfuscatedName("fa")
@Implements("NetSocket")
public final class NetSocket extends AbstractSocket implements Runnable {
@ObfuscatedName("er")
@ObfuscatedName("rx")
@ObfuscatedSignature(
descriptor = "Llb;"
descriptor = "Ldw;"
)
static GraphicsDefaults spriteIds;
@ObfuscatedName("z")
@Export("decimator")
static Decimator decimator;
@ObfuscatedName("f")
@Export("inputStream")
InputStream inputStream;
@ObfuscatedName("k")
@ObfuscatedName("b")
@Export("outputStream")
OutputStream outputStream;
@ObfuscatedName("s")
@ObfuscatedName("l")
@Export("socket")
Socket socket;
@ObfuscatedName("t")
@ObfuscatedName("m")
@Export("isClosed")
boolean isClosed;
@ObfuscatedName("i")
@ObfuscatedSignature(
descriptor = "Lfo;"
)
TaskHandler taskHandler;
@ObfuscatedName("o")
@ObfuscatedName("z")
@ObfuscatedSignature(
descriptor = "Lfl;"
)
@Export("taskHandler")
TaskHandler taskHandler;
@ObfuscatedName("q")
@ObfuscatedSignature(
descriptor = "Lfu;"
)
@Export("task")
Task task;
@ObfuscatedName("x")
@ObfuscatedName("k")
@Export("outBuffer")
byte[] outBuffer;
@ObfuscatedName("w")
@ObfuscatedName("c")
@ObfuscatedGetter(
intValue = -43739121
intValue = -67963133
)
@Export("outLength")
int outLength;
@ObfuscatedName("g")
@ObfuscatedName("u")
@ObfuscatedGetter(
intValue = -1877498573
intValue = -599652531
)
@Export("outOffset")
int outOffset;
@ObfuscatedName("m")
@ObfuscatedName("t")
@Export("exceptionWriting")
boolean exceptionWriting;
@ObfuscatedName("n")
@ObfuscatedName("e")
@ObfuscatedGetter(
intValue = -1318092279
intValue = 1080404053
)
@Export("bufferLength")
final int bufferLength;
@ObfuscatedName("d")
@ObfuscatedName("o")
@ObfuscatedGetter(
intValue = 202627819
intValue = -273885437
)
@Export("maxPacketLength")
final int maxPacketLength;
@ObfuscatedSignature(
descriptor = "(Ljava/net/Socket;Lfo;I)V"
descriptor = "(Ljava/net/Socket;Lfl;I)V"
)
public NetSocket(Socket var1, TaskHandler var2, int var3) throws IOException {
this.isClosed = false; // L: 16
this.outLength = 0; // L: 20
this.outOffset = 0; // L: 21
this.exceptionWriting = false; // L: 22
this.taskHandler = var2;
this.socket = var1;
this.bufferLength = var3;
this.maxPacketLength = var3 - 100;
this.socket.setSoTimeout(30000);
this.socket.setTcpNoDelay(true);
this.taskHandler = var2; // L: 28
this.socket = var1; // L: 29
this.bufferLength = var3; // L: 30
this.maxPacketLength = var3 - 100; // L: 31
this.socket.setSoTimeout(30000); // L: 32
this.socket.setTcpNoDelay(true); // L: 33
this.socket.setReceiveBufferSize(65536); // L: 34
this.socket.setSendBufferSize(65536);
this.socket.setSendBufferSize(65536); // L: 35
this.inputStream = this.socket.getInputStream(); // L: 36
this.outputStream = this.socket.getOutputStream(); // L: 37
} // L: 38
@ObfuscatedName("z")
@ObfuscatedName("f")
@ObfuscatedSignature(
descriptor = "(I)V",
garbageValue = "-147773206"
garbageValue = "1983450651"
)
@Export("close")
public void close() {
if (!this.isClosed) { // L: 41
synchronized(this) { // L: 42
@@ -89,9 +106,9 @@ public final class NetSocket extends AbstractSocket implements Runnable {
this.notifyAll(); // L: 44
} // L: 45
if (this.task != null) {
while (this.task.status == 0) {
class227.sleepExact(1L); // L: 48
if (this.task != null) { // L: 46
while (this.task.status == 0) { // L: 47
WorldMapSection3.sleepExact(1L); // L: 48
}
if (this.task.status == 1) { // L: 50
@@ -106,29 +123,32 @@ public final class NetSocket extends AbstractSocket implements Runnable {
}
} // L: 58
@ObfuscatedName("k")
@ObfuscatedName("b")
@ObfuscatedSignature(
descriptor = "(B)I",
garbageValue = "-99"
garbageValue = "1"
)
@Export("readUnsignedByte")
public int readUnsignedByte() throws IOException {
return this.isClosed ? 0 : this.inputStream.read(); // L: 65 66
}
@ObfuscatedName("s")
@ObfuscatedName("l")
@ObfuscatedSignature(
descriptor = "(B)I",
garbageValue = "12"
descriptor = "(I)I",
garbageValue = "933186835"
)
@Export("available")
public int available() throws IOException {
return this.isClosed ? 0 : this.inputStream.available(); // L: 70 71
}
@ObfuscatedName("t")
@ObfuscatedName("m")
@ObfuscatedSignature(
descriptor = "(IB)Z",
garbageValue = "-78"
descriptor = "(II)Z",
garbageValue = "-916126565"
)
@Export("isAvailable")
public boolean isAvailable(int var1) throws IOException {
if (this.isClosed) { // L: 75
return false;
@@ -137,11 +157,12 @@ public final class NetSocket extends AbstractSocket implements Runnable {
}
}
@ObfuscatedName("i")
@ObfuscatedName("z")
@ObfuscatedSignature(
descriptor = "([BIII)I",
garbageValue = "-1533815985"
garbageValue = "1049423117"
)
@Export("read")
public int read(byte[] var1, int var2, int var3) throws IOException {
if (this.isClosed) { // L: 80
return 0;
@@ -161,11 +182,12 @@ public final class NetSocket extends AbstractSocket implements Runnable {
}
}
@ObfuscatedName("o")
@ObfuscatedName("q")
@ObfuscatedSignature(
descriptor = "([BIII)V",
garbageValue = "-588582807"
descriptor = "([BIIB)V",
garbageValue = "79"
)
@Export("write0")
void write0(byte[] var1, int var2, int var3) throws IOException {
if (!this.isClosed) { // L: 92
if (this.exceptionWriting) { // L: 93
@@ -180,7 +202,7 @@ public final class NetSocket extends AbstractSocket implements Runnable {
for (int var5 = 0; var5 < var3; ++var5) { // L: 99
this.outBuffer[this.outOffset] = var1[var5 + var2]; // L: 100
this.outOffset = (this.outOffset + 1) % this.bufferLength; // L: 101
if ((this.maxPacketLength + this.outLength) % this.bufferLength == this.outOffset) { // L: 102
if ((this.outLength + this.maxPacketLength) % this.bufferLength == this.outOffset) { // L: 102
throw new IOException(); // L: 103
}
}
@@ -195,19 +217,16 @@ public final class NetSocket extends AbstractSocket implements Runnable {
}
} // L: 111
@ObfuscatedName("x")
@ObfuscatedName("k")
@ObfuscatedSignature(
descriptor = "([BIIB)V",
garbageValue = "52"
descriptor = "([BIII)V",
garbageValue = "1456512196"
)
@Export("write")
public void write(byte[] var1, int var2, int var3) throws IOException {
this.write0(var1, var2, var3); // L: 160
} // L: 161
protected void finalize() {
this.close(); // L: 61
} // L: 62
public void run() {
try {
while (true) {
@@ -275,97 +294,12 @@ public final class NetSocket extends AbstractSocket implements Runnable {
break;
}
} catch (Exception var12) { // L: 154
Decimator.RunException_sendStackTrace((String)null, var12); // L: 155
PacketWriter.RunException_sendStackTrace((String)null, var12); // L: 155
}
} // L: 157
@ObfuscatedName("k")
@ObfuscatedSignature(
descriptor = "(II)Ljj;",
garbageValue = "2080665133"
)
public static StructDefinition StructDefinition_getStructDefinition(int var0) {
StructDefinition var1 = (StructDefinition)StructDefinition.StructDefinition_cached.get((long)var0); // L: 23
if (var1 != null) { // L: 24
return var1;
} else {
byte[] var2 = StructDefinition.StructDefinition_archive.takeFile(34, var0); // L: 25
var1 = new StructDefinition(); // L: 26
if (var2 != null) { // L: 27
var1.decode(new Buffer(var2));
}
var1.postDecode();
StructDefinition.StructDefinition_cached.put(var1, (long)var0);
return var1;
}
}
@ObfuscatedName("s")
@ObfuscatedSignature(
descriptor = "(III)I",
garbageValue = "2086304619"
)
static int method3628(int var0, int var1) {
ItemContainer var2 = (ItemContainer)ItemContainer.itemContainers.get((long)var0); // L: 28
if (var2 == null) { // L: 29
return 0;
} else if (var1 == -1) { // L: 30
return 0;
} else {
int var3 = 0; // L: 31
for (int var4 = 0; var4 < var2.quantities.length; ++var4) { // L: 32
if (var2.ids[var4] == var1) {
var3 += var2.quantities[var4]; // L: 33
}
}
return var3; // L: 35
}
}
@ObfuscatedName("t")
@ObfuscatedSignature(
descriptor = "(I)V",
garbageValue = "1873415823"
)
public static void method3626() {
VarbitDefinition.VarbitDefinition_cached.clear(); // L: 46
} // L: 47
@ObfuscatedName("g")
@ObfuscatedSignature(
descriptor = "(Lhq;I[B[BI)V",
garbageValue = "-421721574"
)
static final void Widget_setKey(Widget var0, int var1, byte[] var2, byte[] var3) {
if (var0.field2626 == null) { // L: 902
if (var2 == null) { // L: 903
return; // L: 909
}
var0.field2626 = new byte[11][]; // L: 904
var0.field2719 = new byte[11][]; // L: 905
var0.field2682 = new int[11]; // L: 906
var0.field2683 = new int[11]; // L: 907
}
var0.field2626[var1] = var2; // L: 911
if (var2 != null) {
var0.field2676 = true; // L: 912
} else {
var0.field2676 = false; // L: 914
for (int var4 = 0; var4 < var0.field2626.length; ++var4) { // L: 915
if (var0.field2626[var4] != null) { // L: 916
var0.field2676 = true; // L: 917
break;
}
}
}
var0.field2719[var1] = var3; // L: 922
} // L: 923
protected void finalize() {
this.close(); // L: 61
} // L: 62
}