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

@@ -42,24 +42,24 @@ public class TaskHandler implements Runnable {
boolean isClosed;
public TaskHandler() {
this.current = null;
this.task = null;
this.isClosed = false;
javaVendor = "Unknown";
javaVersion = "1.6";
this.current = null; // L: 11
this.task = null; // L: 12
this.isClosed = false; // L: 14
javaVendor = "Unknown"; // L: 20
javaVersion = "1.6"; // L: 21
try {
javaVendor = System.getProperty("java.vendor");
javaVersion = System.getProperty("java.version");
} catch (Exception var2) {
javaVendor = System.getProperty("java.vendor"); // L: 23
javaVersion = System.getProperty("java.version"); // L: 24
} catch (Exception var2) { // L: 26
}
this.isClosed = false;
this.thread = new Thread(this);
this.thread.setPriority(10);
this.thread.setDaemon(true);
this.thread.start();
}
this.isClosed = false; // L: 27
this.thread = new Thread(this); // L: 28
this.thread.setPriority(10); // L: 29
this.thread.setDaemon(true); // L: 30
this.thread.start(); // L: 31
} // L: 32
@ObfuscatedName("h")
@ObfuscatedSignature(
@@ -68,17 +68,17 @@ public class TaskHandler implements Runnable {
)
@Export("close")
public final void close() {
synchronized(this) {
this.isClosed = true;
this.notifyAll();
}
synchronized(this) { // L: 35
this.isClosed = true; // L: 36
this.notifyAll(); // L: 37
} // L: 38
try {
this.thread.join();
} catch (InterruptedException var3) {
this.thread.join(); // L: 40
} catch (InterruptedException var3) { // L: 42
}
}
} // L: 43
@ObfuscatedName("v")
@ObfuscatedSignature(
@@ -87,20 +87,20 @@ public class TaskHandler implements Runnable {
)
@Export("newTask")
final Task newTask(int var1, int var2, int var3, Object var4) {
Task var5 = new Task();
var5.type = var1;
var5.intArgument = var2;
var5.objectArgument = var4;
synchronized(this) {
if (this.task != null) {
this.task.next = var5;
this.task = var5;
Task var5 = new Task(); // L: 90
var5.type = var1; // L: 91
var5.intArgument = var2; // L: 92
var5.objectArgument = var4; // L: 93
synchronized(this) { // L: 94
if (this.task != null) { // L: 95
this.task.next = var5; // L: 96
this.task = var5; // L: 97
} else {
this.task = this.current = var5;
this.task = this.current = var5; // L: 100
}
this.notify();
return var5;
this.notify(); // L: 102
return var5; // L: 104
}
}
@@ -111,7 +111,7 @@ public class TaskHandler implements Runnable {
)
@Export("newSocketTask")
public final Task newSocketTask(String var1, int var2) {
return this.newTask(1, var2, 0, var1);
return this.newTask(1, var2, 0, var1); // L: 108
}
@ObfuscatedName("w")
@@ -121,53 +121,53 @@ public class TaskHandler implements Runnable {
)
@Export("newThreadTask")
public final Task newThreadTask(Runnable var1, int var2) {
return this.newTask(2, var2, 0, var1);
return this.newTask(2, var2, 0, var1); // L: 112
}
public final void run() {
while (true) {
Task var1;
synchronized(this) {
synchronized(this) { // L: 48
while (true) {
if (this.isClosed) {
if (this.isClosed) { // L: 50
return;
}
if (this.current != null) {
var1 = this.current;
this.current = this.current.next;
if (this.current == null) {
if (this.current != null) { // L: 51
var1 = this.current; // L: 52
this.current = this.current.next; // L: 53
if (this.current == null) { // L: 54
this.task = null;
}
break;
}
try {
this.wait();
} catch (InterruptedException var8) {
this.wait(); // L: 58
} catch (InterruptedException var8) { // L: 60
}
}
}
try {
int var5 = var1.type;
if (var5 == 1) {
var1.result = new Socket(InetAddress.getByName((String)var1.objectArgument), var1.intArgument);
} else if (var5 == 2) {
Thread var3 = new Thread((Runnable)var1.objectArgument);
var3.setDaemon(true);
var3.start();
var3.setPriority(var1.intArgument);
var1.result = var3;
} else if (var5 == 4) {
var1.result = new DataInputStream(((URL)var1.objectArgument).openStream());
int var5 = var1.type; // L: 64
if (var5 == 1) { // L: 65
var1.result = new Socket(InetAddress.getByName((String)var1.objectArgument), var1.intArgument); // L: 66
} else if (var5 == 2) { // L: 68
Thread var3 = new Thread((Runnable)var1.objectArgument); // L: 69
var3.setDaemon(true); // L: 70
var3.start(); // L: 71
var3.setPriority(var1.intArgument); // L: 72
var1.result = var3; // L: 73
} else if (var5 == 4) { // L: 75
var1.result = new DataInputStream(((URL)var1.objectArgument).openStream()); // L: 76
}
var1.status = 1;
} catch (ThreadDeath var6) {
throw var6;
} catch (Throwable var7) {
var1.status = 2;
var1.status = 1; // L: 78
} catch (ThreadDeath var6) { // L: 80
throw var6; // L: 81
} catch (Throwable var7) { // L: 83
var1.status = 2; // L: 84
}
}
}
@@ -179,9 +179,9 @@ public class TaskHandler implements Runnable {
)
@Export("sortWorldList")
static void sortWorldList(int var0, boolean var1, int var2, boolean var3) {
if (World.World_worlds != null) {
class25.doWorldSorting(0, World.World_worlds.length - 1, var0, var1, var2, var3);
if (World.World_worlds != null) { // L: 171
class25.doWorldSorting(0, World.World_worlds.length - 1, var0, var1, var2, var3); // L: 172
}
}
} // L: 174
}