Search in sources :

Example 41 with ObfuscatedName

use of net.runelite.mapping.ObfuscatedName in project runelite by runelite.

the class ClanMemberManager method method5490.

@ObfuscatedName("d")
@ObfuscatedSignature(signature = "(Lgp;I)V", garbageValue = "-605643198")
public final void method5490(Buffer var1) {
    Name var2 = new Name(var1.readString(), this.field3861);
    int var3 = var1.readUnsignedShort();
    byte var4 = var1.readByte();
    boolean var5 = false;
    if (var4 == -128) {
        var5 = true;
    }
    ClanMember var6;
    if (var5) {
        if (this.getCount() == 0) {
            return;
        }
        var6 = (ClanMember) this.method5319(var2);
        if (var6 != null && var6.method5400() == var3) {
            this.method5321(var6);
        }
    } else {
        var1.readString();
        var6 = (ClanMember) this.method5319(var2);
        if (var6 == null) {
            if (this.getCount() > super.field3833) {
                return;
            }
            var6 = (ClanMember) this.method5322(var2);
        }
        var6.method5395(var3, ++this.field3863 - 1);
        var6.rank = var4;
        this.method5466(var6);
    }
}
Also used : ObfuscatedName(net.runelite.mapping.ObfuscatedName) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 42 with ObfuscatedName

use of net.runelite.mapping.ObfuscatedName in project runelite by runelite.

the class Player method decodeApperance.

@ObfuscatedName("c")
@ObfuscatedSignature(signature = "(Lgp;I)V", garbageValue = "-2010554176")
@Export("decodeApperance")
final void decodeApperance(Buffer var1) {
    var1.offset = 0;
    int var2 = var1.readUnsignedByte();
    this.skullIcon = var1.readByte();
    this.overheadIcon = var1.readByte();
    int var3 = -1;
    this.team = 0;
    int[] var4 = new int[12];
    int var6;
    int var7;
    for (int var5 = 0; var5 < 12; ++var5) {
        var6 = var1.readUnsignedByte();
        if (var6 == 0) {
            var4[var5] = 0;
        } else {
            var7 = var1.readUnsignedByte();
            var4[var5] = var7 + (var6 << 8);
            if (var5 == 0 && var4[0] == 65535) {
                var3 = var1.readUnsignedShort();
                break;
            }
            if (var4[var5] >= 512) {
                int var8 = GameObject.getItemDefinition(var4[var5] - 512).int1;
                if (var8 != 0) {
                    this.team = var8;
                }
            }
        }
    }
    int[] var9 = new int[5];
    for (var6 = 0; var6 < 5; ++var6) {
        var7 = var1.readUnsignedByte();
        if (var7 < 0 || var7 >= GameCanvas.colorsToReplace[var6].length) {
            var7 = 0;
        }
        var9[var6] = var7;
    }
    super.idlePoseAnimation = var1.readUnsignedShort();
    if (super.idlePoseAnimation == 65535) {
        super.idlePoseAnimation = -1;
    }
    super.field1195 = var1.readUnsignedShort();
    if (super.field1195 == 65535) {
        super.field1195 = -1;
    }
    super.field1157 = super.field1195;
    super.field1158 = var1.readUnsignedShort();
    if (super.field1158 == 65535) {
        super.field1158 = -1;
    }
    super.field1172 = var1.readUnsignedShort();
    if (super.field1172 == 65535) {
        super.field1172 = -1;
    }
    super.field1160 = var1.readUnsignedShort();
    if (super.field1160 == 65535) {
        super.field1160 = -1;
    }
    super.field1161 = var1.readUnsignedShort();
    if (super.field1161 == 65535) {
        super.field1161 = -1;
    }
    super.field1162 = var1.readUnsignedShort();
    if (super.field1162 == 65535) {
        super.field1162 = -1;
    }
    this.name = new Name(var1.readString(), Client.loginType);
    this.method1166();
    this.method1145();
    if (this == WorldComparator.localPlayer) {
        RunException.field2176 = this.name.getName();
    }
    this.combatLevel = var1.readUnsignedByte();
    this.totalLevel = var1.readUnsignedShort();
    this.hidden = var1.readUnsignedByte() == 1;
    if (Client.socketType == 0 && Client.rights >= 2) {
        this.hidden = false;
    }
    if (this.composition == null) {
        this.composition = new PlayerComposition();
    }
    this.composition.method4408(var4, var9, var2 == 1, var3);
}
Also used : ObfuscatedName(net.runelite.mapping.ObfuscatedName) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 43 with ObfuscatedName

use of net.runelite.mapping.ObfuscatedName in project runelite by runelite.

the class Fonts method createMap.

@ObfuscatedName("c")
@ObfuscatedSignature(signature = "([Lkd;I)Ljava/util/HashMap;", garbageValue = "80099990")
@Export("createMap")
public HashMap createMap(FontName[] var1) {
    HashMap var2 = new HashMap();
    FontName[] var3 = var1;
    for (int var4 = 0; var4 < var3.length; ++var4) {
        FontName var5 = var3[var4];
        if (this.map.containsKey(var5)) {
            var2.put(var5, this.map.get(var5));
        } else {
            IndexDataBase var7 = this.field3882;
            IndexDataBase var8 = this.field3883;
            String var9 = var5.field3876;
            int var10 = var7.getFile(var9);
            int var11 = var7.getChild(var10, "");
            Font var12;
            if (!class288.method5204(var7, var10, var11)) {
                var12 = null;
            } else {
                var12 = Area.method4772(var8.getConfigData(var10, var11));
            }
            if (var12 != null) {
                this.map.put(var5, var12);
                var2.put(var5, var12);
            }
        }
    }
    return var2;
}
Also used : HashMap(java.util.HashMap) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 44 with ObfuscatedName

use of net.runelite.mapping.ObfuscatedName in project runelite by runelite.

the class MapLabel method method387.

@ObfuscatedName("c")
@ObfuscatedSignature(signature = "(B)J", garbageValue = "1")
static long method387() {
    try {
        URL var0 = new URL(ClientPacket.method3421("services", false) + "m=accountappeal/login.ws");
        URLConnection var1 = var0.openConnection();
        var1.setRequestProperty("connection", "close");
        var1.setDoInput(true);
        var1.setDoOutput(true);
        var1.setConnectTimeout(5000);
        OutputStreamWriter var2 = new OutputStreamWriter(var1.getOutputStream());
        var2.write("data1=req");
        var2.flush();
        InputStream var3 = var1.getInputStream();
        Buffer var4 = new Buffer(new byte[1000]);
        do {
            int var5 = var3.read(var4.payload, var4.offset, 1000 - var4.offset);
            if (var5 == -1) {
                var4.offset = 0;
                long var7 = var4.readLong();
                return var7;
            }
            var4.offset += var5;
        } while (var4.offset < 1000);
        return 0L;
    } catch (Exception var9) {
        return 0L;
    }
}
Also used : InputStream(java.io.InputStream) OutputStreamWriter(java.io.OutputStreamWriter) URL(java.net.URL) URLConnection(java.net.URLConnection) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 45 with ObfuscatedName

use of net.runelite.mapping.ObfuscatedName in project runelite by runelite.

the class InvType method method4737.

@ObfuscatedName("c")
@ObfuscatedSignature(signature = "(Ljava/lang/String;Ljava/lang/String;IB)Ljava/io/File;", garbageValue = "16")
public static File method4737(String var0, String var1, int var2) {
    String var3 = var2 == 0 ? "" : "" + var2;
    class167.jagexClDat = new File(class22.userHome, "jagex_cl_" + var0 + "_" + var1 + var3 + ".dat");
    String var4 = null;
    String var5 = null;
    boolean var6 = false;
    int var11;
    File var26;
    if (class167.jagexClDat.exists()) {
        try {
            FileOnDisk var7 = new FileOnDisk(class167.jagexClDat, "rw", 10000L);
            Buffer var8;
            int var9;
            for (var8 = new Buffer((int) var7.length()); var8.offset < var8.payload.length; var8.offset += var9) {
                var9 = var7.read(var8.payload, var8.offset, var8.payload.length - var8.offset);
                if (var9 == -1) {
                    throw new IOException();
                }
            }
            var8.offset = 0;
            var9 = var8.readUnsignedByte();
            if (var9 < 1 || var9 > 3) {
                throw new IOException("" + var9);
            }
            int var10 = 0;
            if (var9 > 1) {
                var10 = var8.readUnsignedByte();
            }
            if (var9 <= 2) {
                var4 = var8.getJagString();
                if (var10 == 1) {
                    var5 = var8.getJagString();
                }
            } else {
                var4 = var8.getCESU8();
                if (var10 == 1) {
                    var5 = var8.getCESU8();
                }
            }
            var7.close();
        } catch (IOException var24) {
            var24.printStackTrace();
        }
        if (var4 != null) {
            var26 = new File(var4);
            if (!var26.exists()) {
                var4 = null;
            }
        }
        if (var4 != null) {
            var26 = new File(var4, "test.dat");
            boolean var27;
            try {
                RandomAccessFile var15 = new RandomAccessFile(var26, "rw");
                var11 = var15.read();
                var15.seek(0L);
                var15.write(var11);
                var15.seek(0L);
                var15.close();
                var26.delete();
                var27 = true;
            } catch (Exception var22) {
                var27 = false;
            }
            if (!var27) {
                var4 = null;
            }
        }
    }
    if (var4 == null && var2 == 0) {
        label137: for (int var16 = 0; var16 < class167.field2214.length; ++var16) {
            for (int var17 = 0; var17 < class27.cacheLocations.length; ++var17) {
                File var18 = new File(class27.cacheLocations[var17] + class167.field2214[var16] + File.separatorChar + var0 + File.separatorChar);
                if (var18.exists()) {
                    File var19 = new File(var18, "test.dat");
                    boolean var28;
                    try {
                        RandomAccessFile var12 = new RandomAccessFile(var19, "rw");
                        int var13 = var12.read();
                        var12.seek(0L);
                        var12.write(var13);
                        var12.seek(0L);
                        var12.close();
                        var19.delete();
                        var28 = true;
                    } catch (Exception var21) {
                        var28 = false;
                    }
                    if (var28) {
                        var4 = var18.toString();
                        var6 = true;
                        break label137;
                    }
                }
            }
        }
    }
    if (var4 == null) {
        var4 = class22.userHome + File.separatorChar + "jagexcache" + var3 + File.separatorChar + var0 + File.separatorChar + var1 + File.separatorChar;
        var6 = true;
    }
    if (var5 != null) {
        File var25 = new File(var5);
        var26 = new File(var4);
        try {
            File[] var31 = var25.listFiles();
            File[] var30 = var31;
            for (var11 = 0; var11 < var30.length; ++var11) {
                File var29 = var30[var11];
                File var20 = new File(var26, var29.getName());
                boolean var14 = var29.renameTo(var20);
                if (!var14) {
                    throw new IOException();
                }
            }
        } catch (Exception var23) {
            var23.printStackTrace();
        }
        var6 = true;
    }
    if (var6) {
        ObjectComposition.method5052(new File(var4), (File) null);
    }
    return new File(var4);
}
Also used : RandomAccessFile(java.io.RandomAccessFile) IOException(java.io.IOException) RandomAccessFile(java.io.RandomAccessFile) File(java.io.File) IOException(java.io.IOException) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Aggregations

ObfuscatedName (net.runelite.mapping.ObfuscatedName)72 ObfuscatedSignature (net.runelite.mapping.ObfuscatedSignature)71 Iterator (java.util.Iterator)30 Export (net.runelite.mapping.Export)23 IOException (java.io.IOException)11 LinkedList (java.util.LinkedList)10 List (java.util.List)6 Container (java.awt.Container)5 Insets (java.awt.Insets)5 HashSet (java.util.HashSet)5 JSObject (netscape.javascript.JSObject)5 URL (java.net.URL)4 HashMap (java.util.HashMap)4 ByteArrayInputStream (java.io.ByteArrayInputStream)3 File (java.io.File)3 URI (java.net.URI)3 Canvas (java.awt.Canvas)2 Graphics (java.awt.Graphics)2 BufferedImage (java.awt.image.BufferedImage)2 PixelGrabber (java.awt.image.PixelGrabber)2