use of net.runelite.mapping.ObfuscatedName in project runelite by runelite.
the class Preferences method serialize.
@ObfuscatedName("i")
@ObfuscatedSignature(signature = "(I)Lgp;", garbageValue = "717909734")
@Export("serialize")
Buffer serialize() {
Buffer var1 = new Buffer(100);
var1.putByte(field1237);
var1.putByte(this.hideRoofs ? 1 : 0);
var1.putByte(this.muted ? 1 : 0);
var1.putByte(this.screenType);
var1.putByte(this.preferences.size());
Iterator var2 = this.preferences.entrySet().iterator();
while (var2.hasNext()) {
Entry var3 = (Entry) var2.next();
var1.putInt(((Integer) var3.getKey()).intValue());
var1.putInt(((Integer) var3.getValue()).intValue());
}
var1.putString(this.rememberedUsername != null ? this.rememberedUsername : "");
var1.writeBooleanAsByte(this.hideUsername);
return var1;
}
use of net.runelite.mapping.ObfuscatedName in project runelite by runelite.
the class Renderable method getPreferencesFile.
@ObfuscatedName("o")
@ObfuscatedSignature(signature = "(Ljava/lang/String;Ljava/lang/String;ZI)Ldp;", garbageValue = "435090535")
@Export("getPreferencesFile")
public static FileOnDisk getPreferencesFile(String var0, String var1, boolean var2) {
File var3 = new File(class167.field2206, "preferences" + var0 + ".dat");
if (var3.exists()) {
try {
FileOnDisk var10 = new FileOnDisk(var3, "rw", 10000L);
return var10;
} catch (IOException var9) {
;
}
}
String var4 = "";
if (PendingSpawn.field1146 == 33) {
var4 = "_rc";
} else if (PendingSpawn.field1146 == 34) {
var4 = "_wip";
}
File var5 = new File(class22.userHome, "jagex_" + var1 + "_preferences" + var0 + var4 + ".dat");
FileOnDisk var6;
if (!var2 && var5.exists()) {
try {
var6 = new FileOnDisk(var5, "rw", 10000L);
return var6;
} catch (IOException var8) {
;
}
}
try {
var6 = new FileOnDisk(var3, "rw", 10000L);
return var6;
} catch (IOException var7) {
throw new RuntimeException();
}
}
use of net.runelite.mapping.ObfuscatedName in project runelite by runelite.
the class MapIconReference method method749.
@ObfuscatedName("c")
@ObfuscatedSignature(signature = "(I)Z", garbageValue = "-1167165949")
public static boolean method749() {
long var0 = ScriptVarType.method28();
int var2 = (int) (var0 - class264.field3413);
class264.field3413 = var0;
if (var2 > 200) {
var2 = 200;
}
class264.field3410 += var2;
if (class264.NetCache_pendingResponsesCount == 0 && class264.NetCache_pendingPriorityResponsesCount == 0 && class264.NetCache_pendingWritesCount == 0 && class264.NetCache_pendingPriorityWritesCount == 0) {
return true;
} else if (class264.NetCache_socket == null) {
return false;
} else {
try {
if (class264.field3410 > 30000) {
throw new IOException();
} else {
FileRequest var3;
Buffer var4;
while (class264.NetCache_pendingPriorityResponsesCount < 200 && class264.NetCache_pendingPriorityWritesCount > 0) {
var3 = (FileRequest) class264.NetCache_pendingPriorityWrites.first();
var4 = new Buffer(4);
var4.putByte(1);
var4.put24bitInt((int) var3.hash);
class264.NetCache_socket.vmethod3320(var4.payload, 0, 4);
class264.NetCache_pendingPriorityResponses.put(var3, var3.hash);
--class264.NetCache_pendingPriorityWritesCount;
++class264.NetCache_pendingPriorityResponsesCount;
}
while (class264.NetCache_pendingResponsesCount < 200 && class264.NetCache_pendingWritesCount > 0) {
var3 = (FileRequest) class264.NetCache_pendingWritesQueue.peek();
var4 = new Buffer(4);
var4.putByte(0);
var4.put24bitInt((int) var3.hash);
class264.NetCache_socket.vmethod3320(var4.payload, 0, 4);
var3.unlinkDual();
class264.NetCache_pendingResponses.put(var3, var3.hash);
--class264.NetCache_pendingWritesCount;
++class264.NetCache_pendingResponsesCount;
}
for (int var15 = 0; var15 < 100; ++var15) {
int var16 = class264.NetCache_socket.vmethod3316();
if (var16 < 0) {
throw new IOException();
}
if (var16 == 0) {
break;
}
class264.field3410 = 0;
byte var5 = 0;
if (GraphicsObject.currentRequest == null) {
var5 = 8;
} else if (class264.field3416 == 0) {
var5 = 1;
}
int var6;
int var7;
int var8;
int var10;
if (var5 > 0) {
var6 = var5 - class264.NetCache_responseHeaderBuffer.offset;
if (var6 > var16) {
var6 = var16;
}
class264.NetCache_socket.vmethod3318(class264.NetCache_responseHeaderBuffer.payload, class264.NetCache_responseHeaderBuffer.offset, var6);
if (class264.field3420 != 0) {
for (var7 = 0; var7 < var6; ++var7) {
class264.NetCache_responseHeaderBuffer.payload[var7 + class264.NetCache_responseHeaderBuffer.offset] ^= class264.field3420;
}
}
class264.NetCache_responseHeaderBuffer.offset += var6;
if (class264.NetCache_responseHeaderBuffer.offset < var5) {
break;
}
if (GraphicsObject.currentRequest == null) {
class264.NetCache_responseHeaderBuffer.offset = 0;
var7 = class264.NetCache_responseHeaderBuffer.readUnsignedByte();
var8 = class264.NetCache_responseHeaderBuffer.readUnsignedShort();
int var9 = class264.NetCache_responseHeaderBuffer.readUnsignedByte();
var10 = class264.NetCache_responseHeaderBuffer.readInt();
long var11 = (long) (var8 + (var7 << 16));
FileRequest var13 = (FileRequest) class264.NetCache_pendingPriorityResponses.get(var11);
IndexStoreActionHandler.field3388 = true;
if (var13 == null) {
var13 = (FileRequest) class264.NetCache_pendingResponses.get(var11);
IndexStoreActionHandler.field3388 = false;
}
if (var13 == null) {
throw new IOException();
}
int var14 = var9 == 0 ? 5 : 9;
GraphicsObject.currentRequest = var13;
ISAACCipher.NetCache_responseArchiveBuffer = new Buffer(var10 + var14 + GraphicsObject.currentRequest.padding);
ISAACCipher.NetCache_responseArchiveBuffer.putByte(var9);
ISAACCipher.NetCache_responseArchiveBuffer.putInt(var10);
class264.field3416 = 8;
class264.NetCache_responseHeaderBuffer.offset = 0;
} else if (class264.field3416 == 0) {
if (class264.NetCache_responseHeaderBuffer.payload[0] == -1) {
class264.field3416 = 1;
class264.NetCache_responseHeaderBuffer.offset = 0;
} else {
GraphicsObject.currentRequest = null;
}
}
} else {
var6 = ISAACCipher.NetCache_responseArchiveBuffer.payload.length - GraphicsObject.currentRequest.padding;
var7 = 512 - class264.field3416;
if (var7 > var6 - ISAACCipher.NetCache_responseArchiveBuffer.offset) {
var7 = var6 - ISAACCipher.NetCache_responseArchiveBuffer.offset;
}
if (var7 > var16) {
var7 = var16;
}
class264.NetCache_socket.vmethod3318(ISAACCipher.NetCache_responseArchiveBuffer.payload, ISAACCipher.NetCache_responseArchiveBuffer.offset, var7);
if (class264.field3420 != 0) {
for (var8 = 0; var8 < var7; ++var8) {
ISAACCipher.NetCache_responseArchiveBuffer.payload[ISAACCipher.NetCache_responseArchiveBuffer.offset + var8] ^= class264.field3420;
}
}
ISAACCipher.NetCache_responseArchiveBuffer.offset += var7;
class264.field3416 += var7;
if (var6 == ISAACCipher.NetCache_responseArchiveBuffer.offset) {
if (16711935L == GraphicsObject.currentRequest.hash) {
class264.NetCache_reference = ISAACCipher.NetCache_responseArchiveBuffer;
for (var8 = 0; var8 < 256; ++var8) {
IndexData var17 = class264.NetCache_indexCaches[var8];
if (var17 != null) {
class264.NetCache_reference.offset = var8 * 8 + 5;
var10 = class264.NetCache_reference.readInt();
int var18 = class264.NetCache_reference.readInt();
var17.setInformation(var10, var18);
}
}
} else {
class264.NetCache_crc.reset();
class264.NetCache_crc.update(ISAACCipher.NetCache_responseArchiveBuffer.payload, 0, var6);
var8 = (int) class264.NetCache_crc.getValue();
if (var8 != GraphicsObject.currentRequest.crc) {
try {
class264.NetCache_socket.vmethod3325();
} catch (Exception var20) {
;
}
++class264.field3423;
class264.NetCache_socket = null;
class264.field3420 = (byte) ((int) (Math.random() * 255.0D + 1.0D));
return false;
}
class264.field3423 = 0;
class264.field3422 = 0;
GraphicsObject.currentRequest.index.write((int) (GraphicsObject.currentRequest.hash & 65535L), ISAACCipher.NetCache_responseArchiveBuffer.payload, 16711680L == (GraphicsObject.currentRequest.hash & 16711680L), IndexStoreActionHandler.field3388);
}
GraphicsObject.currentRequest.unlink();
if (IndexStoreActionHandler.field3388) {
--class264.NetCache_pendingPriorityResponsesCount;
} else {
--class264.NetCache_pendingResponsesCount;
}
class264.field3416 = 0;
GraphicsObject.currentRequest = null;
ISAACCipher.NetCache_responseArchiveBuffer = null;
} else {
if (class264.field3416 != 512) {
break;
}
class264.field3416 = 0;
}
}
}
return true;
}
} catch (IOException var21) {
try {
class264.NetCache_socket.vmethod3325();
} catch (Exception var19) {
;
}
++class264.field3422;
class264.NetCache_socket = null;
return false;
}
}
}
use of net.runelite.mapping.ObfuscatedName in project runelite by runelite.
the class UrlRequest method processClientError.
@ObfuscatedName("c")
@ObfuscatedSignature(signature = "(Ljava/lang/String;Ljava/lang/Throwable;B)V", garbageValue = "-68")
@Export("processClientError")
public static void processClientError(String var0, Throwable var1) {
if (var1 != null) {
var1.printStackTrace();
} else {
try {
String var2 = "";
if (var1 != null) {
Throwable var4 = var1;
String var5;
if (var1 instanceof RunException) {
RunException var6 = (RunException) var1;
var5 = var6.field2184 + " | ";
var4 = var6.parent;
} else {
var5 = "";
}
StringWriter var18 = new StringWriter();
PrintWriter var7 = new PrintWriter(var18);
var4.printStackTrace(var7);
var7.close();
String var8 = var18.toString();
BufferedReader var9 = new BufferedReader(new StringReader(var8));
String var10 = var9.readLine();
label64: while (true) {
while (true) {
String var11 = var9.readLine();
if (var11 == null) {
var5 = var5 + "| " + var10;
var2 = var5;
break label64;
}
int var12 = var11.indexOf(40);
int var13 = var11.indexOf(41, var12 + 1);
if (var12 >= 0 && var13 >= 0) {
String var14 = var11.substring(var12 + 1, var13);
int var15 = var14.indexOf(".java:");
if (var15 >= 0) {
var14 = var14.substring(0, var15) + var14.substring(var15 + 5);
var5 = var5 + var14 + ' ';
continue;
}
var11 = var11.substring(0, var12);
}
var11 = var11.trim();
var11 = var11.substring(var11.lastIndexOf(32) + 1);
var11 = var11.substring(var11.lastIndexOf(9) + 1);
var5 = var5 + var11 + ' ';
}
}
}
if (var0 != null) {
if (var1 != null) {
var2 = var2 + " | ";
}
var2 = var2 + var0;
}
System.out.println("Error: " + var2);
var2 = var2.replace(':', '.');
var2 = var2.replace('@', '_');
var2 = var2.replace('&', '_');
var2 = var2.replace('#', '_');
if (RunException.field2178 == null) {
return;
}
URL var3 = new URL(RunException.field2178.getCodeBase(), "clienterror.ws?c=" + RunException.revision + "&u=" + RunException.field2176 + "&v1=" + class241.javaVendor + "&v2=" + Signlink.javaVersion + "&e=" + var2);
DataInputStream var17 = new DataInputStream(var3.openStream());
var17.read();
var17.close();
} catch (Exception var16) {
;
}
}
}
use of net.runelite.mapping.ObfuscatedName in project runelite by runelite.
the class MainBufferProvider method drawSub.
@ObfuscatedName("k")
@ObfuscatedSignature(signature = "(Ljava/awt/Graphics;IIIII)V", garbageValue = "1026383004")
@Export("drawSub")
final void drawSub(Graphics var1, int var2, int var3, int var4, int var5) {
try {
Shape var6 = var1.getClip();
var1.clipRect(var2, var3, var4, var5);
var1.drawImage(this.image, 0, 0, this.component);
var1.setClip(var6);
} catch (Exception var7) {
this.component.repaint();
}
}
Aggregations