use of net.runelite.mapping.Export 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.Export 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.Export 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.Export 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();
}
}
use of net.runelite.mapping.Export in project runelite by runelite.
the class Client method init.
@Export("init")
@ObfuscatedName("init")
public final void init() {
try {
if (this.isValidHost()) {
Parameters[] var1 = new Parameters[] { Parameters.field3804, Parameters.field3805, Parameters.field3806, Parameters.field3797, Parameters.field3794, Parameters.field3802, Parameters.field3796, Parameters.field3801, Parameters.field3795, Parameters.field3807, Parameters.field3803, Parameters.field3800, Parameters.field3792, Parameters.field3793, Parameters.field3798, Parameters.field3799 };
Parameters[] var2 = var1;
int var3;
for (var3 = 0; var3 < var2.length; ++var3) {
Parameters var4 = var2[var3];
String var5 = this.getParameter(var4.key);
if (var5 != null) {
switch(Integer.parseInt(var4.key)) {
case 1:
GameCanvas.field627 = var5;
break;
case 2:
PlayerComposition.field2791 = Integer.parseInt(var5);
break;
case 3:
GraphicsObject.sessionToken = var5;
break;
case 4:
JagexGame[] var6 = new JagexGame[] { JagexGame.field3350, JagexGame.field3354, JagexGame.field3349, JagexGame.field3348, JagexGame.field3351, JagexGame.field3352 };
class71.field816 = (JagexGame) class44.forOrdinal(var6, Integer.parseInt(var5));
if (class71.field816 == JagexGame.field3352) {
loginType = JagexLoginType.field4071;
} else {
loginType = JagexLoginType.field4068;
}
case 5:
case 13:
default:
break;
case 6:
flags = Integer.parseInt(var5);
break;
case 7:
class315.field3918 = Integer.parseInt(var5);
break;
case 8:
field905 = Integer.parseInt(var5) != 0;
break;
case 9:
if (var5.equalsIgnoreCase("true")) {
;
}
break;
case 10:
JagexGame.field3355 = HorizontalAlignment.method5117(Integer.parseInt(var5));
break;
case 11:
socketType = Integer.parseInt(var5);
break;
case 12:
if (var5.equalsIgnoreCase("true")) {
isMembers = true;
} else {
isMembers = false;
}
break;
case 14:
world = Integer.parseInt(var5);
break;
case 15:
languageId = Integer.parseInt(var5);
}
}
}
class297.method5286();
host = this.getCodeBase().getHost();
String var23 = JagexGame.field3355.identifier;
byte var11 = 0;
try {
class316.idxCount = 17;
PendingSpawn.field1146 = var11;
try {
class190.osName = System.getProperty("os.name");
} catch (Exception var19) {
class190.osName = "Unknown";
}
class185.osNameLC = class190.osName.toLowerCase();
try {
class22.userHome = System.getProperty("user.home");
if (class22.userHome != null) {
class22.userHome = class22.userHome + "/";
}
} catch (Exception var18) {
;
}
try {
if (class185.osNameLC.startsWith("win")) {
if (class22.userHome == null) {
class22.userHome = System.getenv("USERPROFILE");
}
} else if (class22.userHome == null) {
class22.userHome = System.getenv("HOME");
}
if (class22.userHome != null) {
class22.userHome = class22.userHome + "/";
}
} catch (Exception var17) {
;
}
if (class22.userHome == null) {
class22.userHome = "~/";
}
class27.cacheLocations = new String[] { "c:/rscache/", "/rscache/", "c:/windows/", "c:/winnt/", "c:/", class22.userHome, "/tmp/", "" };
class167.field2214 = new String[] { ".jagex_cache_" + PendingSpawn.field1146, ".file_store_" + PendingSpawn.field1146 };
label170: for (var3 = 0; var3 < 4; ++var3) {
class167.field2206 = InvType.method4737("oldschool", var23, var3);
if (!class167.field2206.exists()) {
class167.field2206.mkdirs();
}
File[] var24 = class167.field2206.listFiles();
if (var24 == null) {
break;
}
File[] var26 = var24;
int var13 = 0;
while (true) {
if (var13 >= var26.length) {
break label170;
}
File var7 = var26[var13];
boolean var8;
try {
RandomAccessFile var9 = new RandomAccessFile(var7, "rw");
int var10 = var9.read();
var9.seek(0L);
var9.write(var10);
var9.seek(0L);
var9.close();
var8 = true;
} catch (Exception var16) {
var8 = false;
}
if (!var8) {
break;
}
++var13;
}
}
class7.method41(class167.field2206);
try {
File var12 = new File(class22.userHome, "random.dat");
int var15;
if (var12.exists()) {
class167.randomDat = new CacheFile(new FileOnDisk(var12, "rw", 25L), 24, 0);
} else {
label149: for (int var14 = 0; var14 < class167.field2214.length; ++var14) {
for (var15 = 0; var15 < class27.cacheLocations.length; ++var15) {
File var27 = new File(class27.cacheLocations[var15] + class167.field2214[var14] + File.separatorChar + "random.dat");
if (var27.exists()) {
class167.randomDat = new CacheFile(new FileOnDisk(var27, "rw", 25L), 24, 0);
break label149;
}
}
}
}
if (class167.randomDat == null) {
RandomAccessFile var25 = new RandomAccessFile(var12, "rw");
var15 = var25.read();
var25.seek(0L);
var25.write(var15);
var25.seek(0L);
var25.close();
class167.randomDat = new CacheFile(new FileOnDisk(var12, "rw", 25L), 24, 0);
}
} catch (IOException var20) {
;
}
class167.dat2File = new CacheFile(new FileOnDisk(class27.method229("main_file_cache.dat2"), "rw", 1048576000L), 5200, 0);
class167.idx255File = new CacheFile(new FileOnDisk(class27.method229("main_file_cache.idx255"), "rw", 1048576L), 6000, 0);
class167.idxFiles = new CacheFile[class316.idxCount];
for (var3 = 0; var3 < class316.idxCount; ++var3) {
class167.idxFiles[var3] = new CacheFile(new FileOnDisk(class27.method229("main_file_cache.idx" + var3), "rw", 1048576L), 6000, 0);
}
} catch (Exception var21) {
UrlRequest.processClientError((String) null, var21);
}
BoundingBox.clientInstance = this;
this.initialize(765, 503, 167);
}
} catch (RuntimeException var22) {
throw KeyFocusListener.method808(var22, "client.init(" + ')');
}
}
Aggregations