Search in sources :

Example 21 with ObfuscatedSignature

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

the class Reflection method getParameterTypes.

public static Class<?>[] getParameterTypes(Method method) {
    ObfuscatedSignature sig = method.getAnnotation(ObfuscatedSignature.class);
    Class<?>[] types = method.getParameterTypes();
    if (sig == null) {
        return types;
    }
    String s = sig.signature();
    int i = s.lastIndexOf(')');
    char c = s.charAt(i - 1);
    Class<?> last;
    switch(c) {
        case 'B':
            last = byte.class;
            break;
        case 'I':
            last = int.class;
            break;
        case 'S':
            last = short.class;
            break;
        default:
            throw new IllegalStateException();
    }
    types = Arrays.copyOf(types, types.length + 1);
    types[types.length - 1] = last;
    return types;
}
Also used : ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature)

Example 22 with ObfuscatedSignature

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

the class class304 method method5420.

@ObfuscatedName("w")
@ObfuscatedSignature(signature = "(Lgp;II)V", garbageValue = "-1858683533")
public void method5420(Buffer var1, int var2) {
    while (true) {
        if (var1.offset < var2) {
            boolean var3 = var1.readUnsignedByte() == 1;
            Name var4 = new Name(var1.readString(), this.field3845);
            Name var5 = new Name(var1.readString(), this.field3845);
            int var6 = var1.readUnsignedShort();
            int var7 = var1.readUnsignedByte();
            int var8 = var1.readUnsignedByte();
            boolean var9 = (var8 & 2) != 0;
            boolean var10 = (var8 & 1) != 0;
            if (var6 > 0) {
                var1.readString();
                var1.readUnsignedByte();
                var1.readInt();
            }
            var1.readString();
            if (var4 != null && var4.method5450()) {
                Friend var11 = (Friend) this.method5319(var4);
                if (var3) {
                    Friend var12 = (Friend) this.method5319(var5);
                    if (var12 != null) {
                        if (var11 != null) {
                            this.method5321(var12);
                        } else {
                            var11 = var12;
                        }
                    }
                }
                if (var11 != null) {
                    this.method5326(var11, var4, var5);
                    if (var6 != var11.world) {
                        boolean var14 = true;
                        for (class308 var13 = (class308) this.field3847.method4061(); var13 != null; var13 = (class308) this.field3847.method4062()) {
                            if (var13.field3865.equals(var4)) {
                                if (var6 != 0 && var13.field3866 == 0) {
                                    var13.method4069();
                                    var14 = false;
                                } else if (var6 == 0 && var13.field3866 != 0) {
                                    var13.method4069();
                                    var14 = false;
                                }
                            }
                        }
                        if (var14) {
                            this.field3847.method4067(new class308(var4, var6));
                        }
                    }
                } else {
                    if (this.getCount() >= 400) {
                        continue;
                    }
                    var11 = (Friend) this.method5323(var4, var5);
                }
                if (var6 != var11.world) {
                    var11.field3839 = ++this.field3846 - 1;
                    if (var11.world == -1 && var6 == 0) {
                        var11.field3839 = -(var11.field3839 * 1320922141) * 806385205;
                    }
                    var11.world = var6;
                }
                var11.rank = var7;
                var11.field3854 = var9;
                var11.field3855 = var10;
                continue;
            }
            throw new IllegalStateException();
        }
        this.method5333();
        return;
    }
}
Also used : ObfuscatedName(net.runelite.mapping.ObfuscatedName) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 23 with ObfuscatedSignature

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

the class Client method method1204.

@ObfuscatedName("fu")
@ObfuscatedSignature(signature = "(B)V", garbageValue = "-10")
final void method1204() {
    Object var1 = field902.getSocket();
    PacketBuffer var2 = field902.packetBuffer;
    try {
        if (loginState == 0) {
            if (var1 != null) {
                ((class169) var1).vmethod3325();
                var1 = null;
            }
            Projectile.field1402 = null;
            socketError = false;
            field891 = 0;
            loginState = 1;
        }
        if (loginState == 1) {
            if (Projectile.field1402 == null) {
                Projectile.field1402 = GameEngine.taskManager.createSocket(host, Player.myWorldPort);
            }
            if (Projectile.field1402.status == 2) {
                throw new IOException();
            }
            if (Projectile.field1402.status == 1) {
                if (field905) {
                    var1 = UrlRequester.method3107((Socket) Projectile.field1402.value, 40000, 5000);
                } else {
                    var1 = new class173((Socket) Projectile.field1402.value, GameEngine.taskManager, 5000);
                }
                field902.setSocket((class169) var1);
                Projectile.field1402 = null;
                loginState = 2;
            }
        }
        if (loginState == 2) {
            field902.method2033();
            PacketNode var3 = BoundingBox2D.method44();
            var3.packetBuffer.putByte(LoginPacket.field2477.id);
            field902.method2036(var3);
            field902.method2035();
            var2.offset = 0;
            loginState = 3;
        }
        int var4;
        boolean var10;
        if (loginState == 3) {
            if (OwnWorldComparator.soundSystem0 != null) {
                OwnWorldComparator.soundSystem0.method2191();
            }
            if (Tile.soundSystem1 != null) {
                Tile.soundSystem1.method2191();
            }
            var10 = true;
            if (field905 && !((class169) var1).vmethod3338(1)) {
                var10 = false;
            }
            if (var10) {
                var4 = ((class169) var1).vmethod3315();
                if (OwnWorldComparator.soundSystem0 != null) {
                    OwnWorldComparator.soundSystem0.method2191();
                }
                if (Tile.soundSystem1 != null) {
                    Tile.soundSystem1.method2191();
                }
                if (var4 != 0) {
                    class19.method168(var4);
                    return;
                }
                var2.offset = 0;
                loginState = 4;
            }
        }
        int var23;
        if (loginState == 4) {
            if (var2.offset < 8) {
                var23 = ((class169) var1).vmethod3316();
                if (var23 > 8 - var2.offset) {
                    var23 = 8 - var2.offset;
                }
                if (var23 > 0) {
                    ((class169) var1).vmethod3318(var2.payload, var2.offset, var23);
                    var2.offset += var23;
                }
            }
            if (var2.offset == 8) {
                var2.offset = 0;
                class5.field35 = var2.readLong();
                loginState = 5;
            }
        }
        int var6;
        if (loginState == 5) {
            field902.packetBuffer.offset = 0;
            field902.method2033();
            PacketBuffer var17 = new PacketBuffer(500);
            int[] var11 = new int[] { (int) (Math.random() * 9.9999999E7D), (int) (Math.random() * 9.9999999E7D), (int) (class5.field35 >> 32), (int) (class5.field35 & -1L) };
            var17.offset = 0;
            var17.putByte(1);
            var17.putByte(field1041.rsOrdinal());
            var17.putInt(var11[0]);
            var17.putInt(var11[1]);
            var17.putInt(var11[2]);
            var17.putInt(var11[3]);
            switch(field1041.field2154) {
                case 0:
                case 2:
                    var17.put24bitInt(PendingSpawn.field1145);
                    var17.offset += 5;
                    break;
                case 1:
                    var17.putInt(((Integer) class46.preferences.preferences.get(Integer.valueOf(SceneTilePaint.method2873(class90.username)))).intValue());
                    var17.offset += 4;
                    break;
                case 3:
                    var17.offset += 8;
            }
            var17.putString(class90.password);
            var17.encryptRsa(class88.field1330, class88.field1326);
            PacketNode var5 = BoundingBox2D.method44();
            var5.packetBuffer.offset = 0;
            if (gameState == 40) {
                var5.packetBuffer.putByte(LoginPacket.field2473.id);
            } else {
                var5.packetBuffer.putByte(LoginPacket.field2475.id);
            }
            var5.packetBuffer.putShort(0);
            var6 = var5.packetBuffer.offset;
            var5.packetBuffer.putInt(167);
            var5.packetBuffer.putBytes(var17.payload, 0, var17.offset);
            int var7 = var5.packetBuffer.offset;
            var5.packetBuffer.putString(class90.username);
            var5.packetBuffer.putByte((isResized ? 1 : 0) << 1 | (lowMemory ? 1 : 0));
            var5.packetBuffer.putShort(Sequence.canvasWidth);
            var5.packetBuffer.putShort(class45.canvasHeight);
            Buffer.method3727(var5.packetBuffer);
            var5.packetBuffer.putString(GraphicsObject.sessionToken);
            var5.packetBuffer.putInt(class315.field3918);
            Buffer var8 = new Buffer(JagexLoginType.platformInfo.method6238());
            JagexLoginType.platformInfo.method6228(var8);
            var5.packetBuffer.putBytes(var8.payload, 0, var8.payload.length);
            var5.packetBuffer.putByte(PlayerComposition.field2791);
            var5.packetBuffer.putInt(0);
            var5.packetBuffer.putInt(class169.indexInterfaces.crc);
            var5.packetBuffer.putInt(class19.indexSoundEffects.crc);
            var5.packetBuffer.putInt(WorldMapType2.configsIndex.crc);
            var5.packetBuffer.putInt(class55.indexCache3.crc);
            var5.packetBuffer.putInt(class44.indexCache4.crc);
            var5.packetBuffer.putInt(class1.indexMaps.crc);
            var5.packetBuffer.putInt(class1.indexTrack1.crc);
            var5.packetBuffer.putInt(class44.indexModels.crc);
            var5.packetBuffer.putInt(class44.indexSprites.crc);
            var5.packetBuffer.putInt(PendingSpawn.indexTextures.crc);
            var5.packetBuffer.putInt(indexCache10.crc);
            var5.packetBuffer.putInt(class157.indexTrack2.crc);
            var5.packetBuffer.putInt(MapLabel.indexScripts.crc);
            var5.packetBuffer.putInt(class18.indexCache13.crc);
            var5.packetBuffer.putInt(ScriptEvent.vorbisIndex.crc);
            var5.packetBuffer.putInt(Renderable.indexCache15.crc);
            var5.packetBuffer.putInt(class151.indexWorldMap.crc);
            var5.packetBuffer.encryptXtea(var11, var7, var5.packetBuffer.offset);
            var5.packetBuffer.method3515(var5.packetBuffer.offset - var6);
            field902.method2036(var5);
            field902.method2035();
            field902.field1475 = new ISAACCipher(var11);
            for (int var9 = 0; var9 < 4; ++var9) {
                var11[var9] += 50;
            }
            var2.seed(var11);
            loginState = 6;
        }
        if (loginState == 6 && ((class169) var1).vmethod3316() > 0) {
            var23 = ((class169) var1).vmethod3315();
            if (var23 == 21 && gameState == 20) {
                loginState = 7;
            } else if (var23 == 2) {
                loginState = 9;
            } else if (var23 == 15 && gameState == 40) {
                field902.packetLength = -1;
                loginState = 13;
            } else if (var23 == 23 && field1110 < 1) {
                ++field1110;
                loginState = 0;
            } else {
                if (var23 != 29) {
                    class19.method168(var23);
                    return;
                }
                loginState = 11;
            }
        }
        if (loginState == 7 && ((class169) var1).vmethod3316() > 0) {
            field894 = (((class169) var1).vmethod3315() + 3) * 60;
            loginState = 8;
        }
        if (loginState == 8) {
            field891 = 0;
            class33.method385("You have only just left another world.", "Your profile will be transferred in:", field894 / 60 + " seconds.");
            if (--field894 <= 0) {
                loginState = 0;
            }
        } else {
            if (loginState == 9 && ((class169) var1).vmethod3316() >= 13) {
                var10 = ((class169) var1).vmethod3315() == 1;
                ((class169) var1).vmethod3318(var2.payload, 0, 4);
                var2.offset = 0;
                boolean var19 = false;
                if (var10) {
                    var4 = var2.readOpcode() << 24;
                    var4 |= var2.readOpcode() << 16;
                    var4 |= var2.readOpcode() << 8;
                    var4 |= var2.readOpcode();
                    int var12 = SceneTilePaint.method2873(class90.username);
                    if (class46.preferences.preferences.size() >= 10 && !class46.preferences.preferences.containsKey(Integer.valueOf(var12))) {
                        Iterator var13 = class46.preferences.preferences.entrySet().iterator();
                        var13.next();
                        var13.remove();
                    }
                    class46.preferences.preferences.put(Integer.valueOf(var12), Integer.valueOf(var4));
                }
                if (class90.Login_isUsernameRemembered) {
                    class46.preferences.rememberedUsername = class90.username;
                } else {
                    class46.preferences.rememberedUsername = null;
                }
                class46.method694();
                rights = ((class169) var1).vmethod3315();
                field1025 = ((class169) var1).vmethod3315() == 1;
                localInteractingIndex = ((class169) var1).vmethod3315();
                localInteractingIndex <<= 8;
                localInteractingIndex += ((class169) var1).vmethod3315();
                field973 = ((class169) var1).vmethod3315();
                ((class169) var1).vmethod3318(var2.payload, 0, 1);
                var2.offset = 0;
                ServerPacket[] var20 = GameSocket.method3366();
                var6 = var2.method3792();
                if (var6 < 0 || var6 >= var20.length) {
                    throw new IOException(var6 + " " + var2.offset);
                }
                field902.serverPacket = var20[var6];
                field902.packetLength = field902.serverPacket.packetLength;
                ((class169) var1).vmethod3318(var2.payload, 0, 2);
                var2.offset = 0;
                field902.packetLength = var2.readUnsignedShort();
                try {
                    Client var14 = BoundingBox.clientInstance;
                    JSObject.getWindow(var14).call("zap", (Object[]) null);
                } catch (Throwable var15) {
                    ;
                }
                loginState = 10;
            }
            if (loginState == 10) {
                if (((class169) var1).vmethod3316() >= field902.packetLength) {
                    var2.offset = 0;
                    ((class169) var1).vmethod3318(var2.payload, 0, field902.packetLength);
                    field1050.method5213();
                    class245.method4505();
                    class5.initializeGPI(var2);
                    class171.field2225 = -1;
                    MouseRecorder.xteaChanged(false, var2);
                    field902.serverPacket = null;
                }
            } else {
                if (loginState == 11 && ((class169) var1).vmethod3316() >= 2) {
                    var2.offset = 0;
                    ((class169) var1).vmethod3318(var2.payload, 0, 2);
                    var2.offset = 0;
                    GroundObject.field1786 = var2.readUnsignedShort();
                    loginState = 12;
                }
                if (loginState == 12 && ((class169) var1).vmethod3316() >= GroundObject.field1786) {
                    var2.offset = 0;
                    ((class169) var1).vmethod3318(var2.payload, 0, GroundObject.field1786);
                    var2.offset = 0;
                    String var18 = var2.readString();
                    String var24 = var2.readString();
                    String var21 = var2.readString();
                    class33.method385(var18, var24, var21);
                    MapIconReference.setGameState(10);
                }
                if (loginState != 13) {
                    ++field891;
                    if (field891 > 2000) {
                        if (field1110 < 1) {
                            if (Player.myWorldPort == WorldMapRegion.port1) {
                                Player.myWorldPort = FontName.port2;
                            } else {
                                Player.myWorldPort = WorldMapRegion.port1;
                            }
                            ++field1110;
                            loginState = 0;
                        } else {
                            class19.method168(-3);
                        }
                    }
                } else {
                    if (field902.packetLength == -1) {
                        if (((class169) var1).vmethod3316() < 2) {
                            return;
                        }
                        ((class169) var1).vmethod3318(var2.payload, 0, 2);
                        var2.offset = 0;
                        field902.packetLength = var2.readUnsignedShort();
                    }
                    if (((class169) var1).vmethod3316() >= field902.packetLength) {
                        ((class169) var1).vmethod3318(var2.payload, 0, field902.packetLength);
                        var2.offset = 0;
                        var23 = field902.packetLength;
                        field1050.method5229();
                        field902.method2033();
                        field902.packetBuffer.offset = 0;
                        field902.serverPacket = null;
                        field902.field1485 = null;
                        field902.field1473 = null;
                        field902.field1471 = null;
                        field902.packetLength = 0;
                        field902.field1480 = 0;
                        field873 = 0;
                        class45.method670();
                        field1087 = 0;
                        destinationX = 0;
                        for (var4 = 0; var4 < 2048; ++var4) {
                            cachedPlayers[var4] = null;
                        }
                        WorldComparator.localPlayer = null;
                        for (var4 = 0; var4 < cachedNPCs.length; ++var4) {
                            NPC var22 = cachedNPCs[var4];
                            if (var22 != null) {
                                var22.interacting = -1;
                                var22.field1177 = false;
                            }
                        }
                        class229.method4142();
                        MapIconReference.setGameState(30);
                        for (var4 = 0; var4 < 100; ++var4) {
                            field1060[var4] = true;
                        }
                        Permission.method4535();
                        class5.initializeGPI(var2);
                        if (var23 != var2.offset) {
                            throw new RuntimeException();
                        }
                    }
                }
            }
        }
    } catch (IOException var16) {
        if (field1110 < 1) {
            if (WorldMapRegion.port1 == Player.myWorldPort) {
                Player.myWorldPort = FontName.port2;
            } else {
                Player.myWorldPort = WorldMapRegion.port1;
            }
            ++field1110;
            loginState = 0;
        } else {
            class19.method168(-2);
        }
    }
}
Also used : IOException(java.io.IOException) Iterator(java.util.Iterator) JSObject(netscape.javascript.JSObject) Socket(java.net.Socket) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 24 with ObfuscatedSignature

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

the class Client method method1209.

@ObfuscatedName("hh")
@ObfuscatedSignature(signature = "(Lco;B)Z", garbageValue = "67")
final boolean method1209(NetWriter var1) {
    class169 var2 = var1.getSocket();
    PacketBuffer var3 = var1.packetBuffer;
    if (var2 == null) {
        return false;
    } else {
        String var24;
        int var25;
        try {
            int var5;
            if (var1.serverPacket == null) {
                if (var1.field1479) {
                    if (!var2.vmethod3338(1)) {
                        return false;
                    }
                    var2.vmethod3318(var1.packetBuffer.payload, 0, 1);
                    var1.field1480 = 0;
                    var1.field1479 = false;
                }
                var3.offset = 0;
                if (var3.method3813()) {
                    if (!var2.vmethod3338(1)) {
                        return false;
                    }
                    var2.vmethod3318(var1.packetBuffer.payload, 1, 1);
                    var1.field1480 = 0;
                }
                var1.field1479 = true;
                ServerPacket[] var4 = GameSocket.method3366();
                var5 = var3.method3792();
                if (var5 < 0 || var5 >= var4.length) {
                    throw new IOException(var5 + " " + var3.offset);
                }
                var1.serverPacket = var4[var5];
                var1.packetLength = var1.serverPacket.packetLength;
            }
            if (var1.packetLength == -1) {
                if (!var2.vmethod3338(1)) {
                    return false;
                }
                var1.getSocket().vmethod3318(var3.payload, 0, 1);
                var1.packetLength = var3.payload[0] & 255;
            }
            if (var1.packetLength == -2) {
                if (!var2.vmethod3338(2)) {
                    return false;
                }
                var1.getSocket().vmethod3318(var3.payload, 0, 2);
                var3.offset = 0;
                var1.packetLength = var3.readUnsignedShort();
            }
            if (!var2.vmethod3338(var1.packetLength)) {
                return false;
            }
            var3.offset = 0;
            var2.vmethod3318(var3.payload, 0, var1.packetLength);
            var1.field1480 = 0;
            field1050.method5210();
            var1.field1471 = var1.field1473;
            var1.field1473 = var1.field1485;
            var1.field1485 = var1.serverPacket;
            if (ServerPacket.field2288 == var1.serverPacket) {
                BoundingBox.method58(class183.field2486);
                var1.serverPacket = null;
                return true;
            }
            Widget var6;
            int var23;
            if (ServerPacket.field2309 == var1.serverPacket) {
                var23 = var3.method3566();
                var5 = var3.method3716();
                var6 = class3.getWidget(var23);
                if (var6.modelType != 1 || var5 != var6.modelId) {
                    var6.modelType = 1;
                    var6.modelId = var5;
                    WorldMapType1.method274(var6);
                }
                var1.serverPacket = null;
                return true;
            }
            boolean var60;
            if (ServerPacket.field2333 == var1.serverPacket) {
                var23 = var3.readInt();
                var60 = var3.method3549() == 1;
                var6 = class3.getWidget(var23);
                if (var60 != var6.isHidden) {
                    var6.isHidden = var60;
                    WorldMapType1.method274(var6);
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2320 == var1.serverPacket) {
                WorldMapManager.field533 = var3.method3549();
                GameEngine.field673 = var3.method3549();
                var1.serverPacket = null;
                return true;
            }
            Widget var77;
            if (ServerPacket.field2313 == var1.serverPacket) {
                var23 = var3.readInt();
                var77 = class3.getWidget(var23);
                for (var25 = 0; var25 < var77.itemIds.length; ++var25) {
                    var77.itemIds[var25] = -1;
                    var77.itemIds[var25] = 0;
                }
                WorldMapType1.method274(var77);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2350 == var1.serverPacket) {
                var23 = var3.readInt();
                var5 = var3.readInt();
                var25 = VertexNormal.method2789();
                PacketNode var65 = FaceNormal.method3078(ClientPacket.field2411, field902.field1475);
                var65.packetBuffer.putShortLE(GameEngine.FPS);
                var65.packetBuffer.putShortLE(var25);
                var65.packetBuffer.method3670(var23);
                var65.packetBuffer.method3677(var5);
                field902.method2036(var65);
                var1.serverPacket = null;
                return true;
            }
            long var9;
            long var12;
            int var15;
            long var26;
            long var28;
            String var54;
            if (ServerPacket.field2364 == var1.serverPacket) {
                var54 = var3.readString();
                var26 = var3.readLong();
                var28 = (long) var3.readUnsignedShort();
                var9 = (long) var3.read24BitInt();
                Permission var68 = (Permission) class44.forOrdinal(class3.method6(), var3.readUnsignedByte());
                var12 = var9 + (var28 << 32);
                boolean var72 = false;
                for (var15 = 0; var15 < 100; ++var15) {
                    if (var12 == field989[var15]) {
                        var72 = true;
                        break;
                    }
                }
                if (var68.field3327 && RunException.friendManager.method1695(new Name(var54, loginType))) {
                    var72 = true;
                }
                if (!var72 && myPlayerIndex == 0) {
                    field989[field1075] = var12;
                    field1075 = (field1075 + 1) % 100;
                    String var85 = BaseVarType.method13(var3, 32767);
                    String var74 = FontTypeFace.appendTags(Item.method1925(var85));
                    if (var68.field3334 != -1) {
                        class251.addChatMessage(9, class22.method186(var68.field3334) + var54, var74, GraphicsObject.method1798(var26));
                    } else {
                        class251.addChatMessage(9, var54, var74, GraphicsObject.method1798(var26));
                    }
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2314 == var1.serverPacket) {
                var23 = var3.readUnsignedByte();
                BoundingBox3DDrawMode.method67(var23);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2341 == var1.serverPacket) {
                BoundingBox.method58(class183.field2488);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2361 == var1.serverPacket) {
                WorldMapType1.method298();
                energy = var3.readUnsignedByte();
                field1052 = cycleCntr;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2332 == var1.serverPacket) {
                FriendManager.method1722();
                var1.serverPacket = null;
                return false;
            }
            if (ServerPacket.field2292 == var1.serverPacket) {
                BoundingBox.method58(class183.field2481);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2355 == var1.serverPacket) {
                if (widgetRoot != -1) {
                    DState.method3500(widgetRoot, 0);
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2344 == var1.serverPacket) {
                var23 = var3.readInt();
                WidgetNode var82 = (WidgetNode) componentTable.get((long) var23);
                if (var82 != null) {
                    class44.closeWidget(var82, true);
                }
                if (field1102 != null) {
                    WorldMapType1.method274(field1102);
                    field1102 = null;
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2339 == var1.serverPacket) {
                field1099 = true;
                MapLabel.field451 = var3.readUnsignedByte();
                WorldComparator.field261 = var3.readUnsignedByte();
                CombatInfo2.field3523 = var3.readUnsignedShort();
                class110.field1590 = var3.readUnsignedByte();
                class49.field578 = var3.readUnsignedByte();
                if (class49.field578 >= 100) {
                    Sequence.cameraX = MapLabel.field451 * 128 + 64;
                    ChatLineBuffer.cameraY = WorldComparator.field261 * 128 + 64;
                    Area.cameraZ = class5.getTileHeight(Sequence.cameraX, ChatLineBuffer.cameraY, class237.plane) - CombatInfo2.field3523;
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2290 == var1.serverPacket) {
                field1087 = var3.readUnsignedByte();
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2345 == var1.serverPacket) {
                BoundingBox.method58(class183.field2485);
                var1.serverPacket = null;
                return true;
            }
            int var8;
            int var31;
            if (ServerPacket.field2335 == var1.serverPacket) {
                var23 = var3.method3716();
                if (var23 == 65535) {
                    var23 = -1;
                }
                var5 = var3.readUnsignedShort();
                if (var5 == 65535) {
                    var5 = -1;
                }
                var25 = var3.method3566();
                var31 = var3.method3565();
                for (var8 = var5; var8 <= var23; ++var8) {
                    var9 = (long) var8 + ((long) var31 << 32);
                    Node var66 = widgetFlags.get(var9);
                    if (var66 != null) {
                        var66.unlink();
                    }
                    widgetFlags.put(new IntegerNode(var25), var9);
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2294 == var1.serverPacket) {
                var23 = var3.readUnsignedShort();
                var5 = var3.readUnsignedByte();
                var25 = var3.readUnsignedShort();
                Permission.method4531(var23, var5, var25);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2331 == var1.serverPacket) {
                destinationX = var3.readUnsignedByte();
                if (destinationX == 255) {
                    destinationX = 0;
                }
                destinationY = var3.readUnsignedByte();
                if (destinationY == 255) {
                    destinationY = 0;
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2316 == var1.serverPacket) {
                WorldMapType1.method298();
                weight = var3.readShort();
                field1052 = cycleCntr;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2303 == var1.serverPacket) {
                RunException.friendManager.field1249.method5310(var3, var1.packetLength);
                Iterator var57 = class95.messages.iterator();
                while (var57.hasNext()) {
                    MessageNode var81 = (MessageNode) var57.next();
                    var81.method1107();
                }
                if (class33.clanMemberManager != null) {
                    class33.clanMemberManager.method5469();
                }
                field1048 = cycleCntr;
                var1.serverPacket = null;
                return true;
            }
            Widget var87;
            if (ServerPacket.field2300 == var1.serverPacket) {
                var23 = var3.method3716();
                var5 = var3.method3566();
                var25 = var3.method3513();
                var31 = var3.readUnsignedShortOb1();
                var87 = class3.getWidget(var5);
                if (var25 != var87.rotationX || var23 != var87.rotationZ || var31 != var87.modelZoom) {
                    var87.rotationX = var25;
                    var87.rotationZ = var23;
                    var87.modelZoom = var31;
                    WorldMapType1.method274(var87);
                }
                var1.serverPacket = null;
                return true;
            }
            Widget var62;
            if (ServerPacket.field2352 == var1.serverPacket) {
                var23 = var3.method3716();
                if (var23 == 65535) {
                    var23 = -1;
                }
                var5 = var3.readInt();
                var25 = var3.readInt();
                var62 = class3.getWidget(var25);
                ItemComposition var91;
                if (!var62.hasScript) {
                    if (var23 == -1) {
                        var62.modelType = 0;
                        var1.serverPacket = null;
                        return true;
                    }
                    var91 = GameObject.getItemDefinition(var23);
                    var62.modelType = 4;
                    var62.modelId = var23;
                    var62.rotationX = var91.xan2d;
                    var62.rotationZ = var91.yan2d;
                    var62.modelZoom = var91.zoom2d * 100 / var5;
                    WorldMapType1.method274(var62);
                } else {
                    var62.itemId = var23;
                    var62.itemQuantity = var5;
                    var91 = GameObject.getItemDefinition(var23);
                    var62.rotationX = var91.xan2d;
                    var62.rotationZ = var91.yan2d;
                    var62.rotationY = var91.zan2d;
                    var62.offsetX2d = var91.offsetX2d;
                    var62.offsetY2d = var91.offsetY2d;
                    var62.modelZoom = var91.zoom2d;
                    if (var91.isStackable == 1) {
                        var62.field2872 = 1;
                    } else {
                        var62.field2872 = 2;
                    }
                    if (var62.field2869 > 0) {
                        var62.modelZoom = var62.modelZoom * 32 / var62.field2869;
                    } else if (var62.originalWidth > 0) {
                        var62.modelZoom = var62.modelZoom * 32 / var62.originalWidth;
                    }
                    WorldMapType1.method274(var62);
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2327 == var1.serverPacket) {
                var23 = var3.readUnsignedShortOb1();
                widgetRoot = var23;
                this.method1347(false);
                class251.method4520(var23);
                FriendManager.runWidgetOnLoadListener(widgetRoot);
                for (var5 = 0; var5 < 100; ++var5) {
                    field1060[var5] = true;
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2285 == var1.serverPacket) {
                var54 = var3.readString();
                Object[] var80 = new Object[var54.length() + 1];
                for (var25 = var54.length() - 1; var25 >= 0; --var25) {
                    if (var54.charAt(var25) == 's') {
                        var80[var25 + 1] = var3.readString();
                    } else {
                        var80[var25 + 1] = new Integer(var3.readInt());
                    }
                }
                var80[0] = new Integer(var3.readInt());
                ScriptEvent var69 = new ScriptEvent();
                var69.objs = var80;
                AbstractByteBuffer.method3757(var69);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2349 == var1.serverPacket) {
                var23 = var3.method3566();
                var5 = var3.readUnsignedShort();
                var6 = class3.getWidget(var23);
                if (var6 != null && var6.type == 0) {
                    if (var5 > var6.scrollHeight - var6.height) {
                        var5 = var6.scrollHeight - var6.height;
                    }
                    if (var5 < 0) {
                        var5 = 0;
                    }
                    if (var5 != var6.scrollY) {
                        var6.scrollY = var5;
                        WorldMapType1.method274(var6);
                    }
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2307 == var1.serverPacket) {
                if (class33.clanMemberManager != null) {
                    class33.clanMemberManager.method5490(var3);
                }
                field1049 = cycleCntr;
                IndexStoreActionHandler.field3392 = true;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2342 == var1.serverPacket) {
                for (var23 = 0; var23 < cachedPlayers.length; ++var23) {
                    if (cachedPlayers[var23] != null) {
                        cachedPlayers[var23].animation = -1;
                    }
                }
                for (var23 = 0; var23 < cachedNPCs.length; ++var23) {
                    if (cachedNPCs[var23] != null) {
                        cachedNPCs[var23].animation = -1;
                    }
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2366 == var1.serverPacket) {
                field1099 = false;
                for (var23 = 0; var23 < 5; ++var23) {
                    field901[var23] = false;
                }
                var1.serverPacket = null;
                return true;
            }
            int var10;
            int var14;
            int var18;
            int var34;
            String var86;
            String var89;
            if (ServerPacket.field2367 == var1.serverPacket) {
                var23 = var1.packetLength;
                ClassInfo var79 = new ClassInfo();
                var79.count = var3.readUnsignedByte();
                var79.field3948 = var3.readInt();
                var79.type = new int[var79.count];
                var79.errorIdentifiers = new int[var79.count];
                var79.fields = new Field[var79.count];
                var79.field3947 = new int[var79.count];
                var79.methods = new Method[var79.count];
                var79.args = new byte[var79.count][][];
                for (var25 = 0; var25 < var79.count; ++var25) {
                    try {
                        var31 = var3.readUnsignedByte();
                        if (var31 != 0 && var31 != 1 && var31 != 2) {
                            if (var31 == 3 || var31 == 4) {
                                var86 = var3.readString();
                                var89 = var3.readString();
                                var10 = var3.readUnsignedByte();
                                String[] var11 = new String[var10];
                                for (var34 = 0; var34 < var10; ++var34) {
                                    var11[var34] = var3.readString();
                                }
                                String var93 = var3.readString();
                                byte[][] var71 = new byte[var10][];
                                if (var31 == 3) {
                                    for (var14 = 0; var14 < var10; ++var14) {
                                        var15 = var3.readInt();
                                        var71[var14] = new byte[var15];
                                        var3.readBytes(var71[var14], 0, var15);
                                    }
                                }
                                var79.type[var25] = var31;
                                Class[] var94 = new Class[var10];
                                for (var15 = 0; var15 < var10; ++var15) {
                                    var94[var15] = WorldMapRectangle.loadClassFromDescriptor(var11[var15]);
                                }
                                Class var30 = WorldMapRectangle.loadClassFromDescriptor(var93);
                                if (WorldMapRectangle.loadClassFromDescriptor(var86).getClassLoader() == null) {
                                    throw new SecurityException();
                                }
                                Method[] var16 = WorldMapRectangle.loadClassFromDescriptor(var86).getDeclaredMethods();
                                Method[] var17 = var16;
                                for (var18 = 0; var18 < var17.length; ++var18) {
                                    Method var19 = var17[var18];
                                    if (Reflection.getMethodName(var19).equals(var89)) {
                                        Class[] var20 = Reflection.getParameterTypes(var19);
                                        if (var20.length == var94.length) {
                                            boolean var21 = true;
                                            for (int var22 = 0; var22 < var94.length; ++var22) {
                                                if (var20[var22] != var94[var22]) {
                                                    var21 = false;
                                                    break;
                                                }
                                            }
                                            if (var21 && var30 == var19.getReturnType()) {
                                                var79.methods[var25] = var19;
                                            }
                                        }
                                    }
                                }
                                var79.args[var25] = var71;
                            }
                        } else {
                            var86 = var3.readString();
                            var89 = var3.readString();
                            var10 = 0;
                            if (var31 == 1) {
                                var10 = var3.readInt();
                            }
                            var79.type[var25] = var31;
                            var79.field3947[var25] = var10;
                            if (WorldMapRectangle.loadClassFromDescriptor(var86).getClassLoader() == null) {
                                throw new SecurityException();
                            }
                            var79.fields[var25] = Reflection.findField(WorldMapRectangle.loadClassFromDescriptor(var86), var89);
                        }
                    } catch (ClassNotFoundException var47) {
                        var79.errorIdentifiers[var25] = -1;
                    } catch (SecurityException var48) {
                        var79.errorIdentifiers[var25] = -2;
                    } catch (NullPointerException var49) {
                        var79.errorIdentifiers[var25] = -3;
                    } catch (Exception var50) {
                        var79.errorIdentifiers[var25] = -4;
                    } catch (Throwable var51) {
                        var79.errorIdentifiers[var25] = -5;
                    }
                }
                class326.classInfos.addFirst(var79);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2343 == var1.serverPacket) {
                for (var23 = 0; var23 < VarPlayerType.field3445; ++var23) {
                    VarPlayerType var67 = (VarPlayerType) VarPlayerType.varplayers.get((long) var23);
                    VarPlayerType var78;
                    if (var67 != null) {
                        var78 = var67;
                    } else {
                        byte[] var64 = VarPlayerType.varplayer_ref.getConfigData(16, var23);
                        var67 = new VarPlayerType();
                        if (var64 != null) {
                            var67.decode(new Buffer(var64));
                        }
                        VarPlayerType.varplayers.put(var67, (long) var23);
                        var78 = var67;
                    }
                    if (var78 != null) {
                        class237.serverVarps[var23] = 0;
                        class237.clientVarps[var23] = 0;
                    }
                }
                WorldMapType1.method298();
                field1042 += 32;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2324 == var1.serverPacket) {
                var23 = var3.method3566();
                var77 = class3.getWidget(var23);
                var77.modelType = 3;
                var77.modelId = WorldComparator.localPlayer.composition.method4416();
                WorldMapType1.method274(var77);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2322 == var1.serverPacket) {
                ServerPacket.updateNpcs(false, var3);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2299 == var1.serverPacket) {
                BoundingBox.method58(class183.field2490);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2329 == var1.serverPacket) {
                BoundingBox.method58(class183.field2487);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2321 == var1.serverPacket) {
                var23 = var3.readInt();
                var5 = var3.readShort();
                var6 = class3.getWidget(var23);
                if (var5 != var6.field2831 || var5 == -1) {
                    var6.field2831 = var5;
                    var6.field2837 = 0;
                    var6.field2806 = 0;
                    WorldMapType1.method274(var6);
                }
                var1.serverPacket = null;
                return true;
            }
            boolean var83;
            if (ServerPacket.field2362 == var1.serverPacket) {
                var83 = var3.method3526();
                if (var83) {
                    if (field1132 == null) {
                        field1132 = new class265();
                    }
                } else {
                    field1132 = null;
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2286 == var1.serverPacket) {
                BoundingBox.method58(class183.field2482);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2353 == var1.serverPacket) {
                class251.field3296 = ScriptEvent.method1103(var3.readUnsignedByte());
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2289 == var1.serverPacket) {
                var23 = var3.method3560();
                var5 = var3.readInt();
                var25 = var3.method3626();
                var62 = class3.getWidget(var5);
                if (var25 != var62.originalX || var23 != var62.originalY || var62.dynamicX != 0 || var62.dynamicY != 0) {
                    var62.originalX = var25;
                    var62.originalY = var23;
                    var62.dynamicX = 0;
                    var62.dynamicY = 0;
                    WorldMapType1.method274(var62);
                    this.widgetMethod0(var62);
                    if (var62.type == 0) {
                        MapIcon.method578(class189.widgets[var5 >> 16], var62, false);
                    }
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2356 == var1.serverPacket) {
                ServerPacket.updateNpcs(true, var3);
                var1.serverPacket = null;
                return true;
            }
            int var37;
            if (ServerPacket.field2368 == var1.serverPacket) {
                var23 = var3.method3564();
                var5 = var3.method3513();
                var25 = var5 >> 10 & 31;
                var31 = var5 >> 5 & 31;
                var8 = var5 & 31;
                var37 = (var31 << 11) + (var25 << 19) + (var8 << 3);
                Widget var95 = class3.getWidget(var23);
                if (var37 != var95.textColor) {
                    var95.textColor = var37;
                    WorldMapType1.method274(var95);
                }
                var1.serverPacket = null;
                return true;
            }
            WidgetNode var58;
            if (ServerPacket.field2291 == var1.serverPacket) {
                var23 = var3.offset + var1.packetLength;
                var5 = var3.readUnsignedShort();
                var25 = var3.readUnsignedShort();
                if (var5 != widgetRoot) {
                    widgetRoot = var5;
                    this.method1347(false);
                    class251.method4520(widgetRoot);
                    FriendManager.runWidgetOnLoadListener(widgetRoot);
                    for (var31 = 0; var31 < 100; ++var31) {
                        field1060[var31] = true;
                    }
                }
                WidgetNode var38;
                for (; var25-- > 0; var38.field775 = true) {
                    var31 = var3.readInt();
                    var8 = var3.readUnsignedShort();
                    var37 = var3.readUnsignedByte();
                    var38 = (WidgetNode) componentTable.get((long) var31);
                    if (var38 != null && var8 != var38.id) {
                        class44.closeWidget(var38, true);
                        var38 = null;
                    }
                    if (var38 == null) {
                        WidgetNode var35 = new WidgetNode();
                        var35.id = var8;
                        var35.owner = var37;
                        componentTable.put(var35, (long) var31);
                        class251.method4520(var8);
                        Widget var70 = class3.getWidget(var31);
                        WorldMapType1.method274(var70);
                        if (field1102 != null) {
                            WorldMapType1.method274(field1102);
                            field1102 = null;
                        }
                        BoundingBox3D.method62();
                        MapIcon.method578(class189.widgets[var31 >> 16], var70, false);
                        FriendManager.runWidgetOnLoadListener(var8);
                        if (widgetRoot != -1) {
                            DState.method3500(widgetRoot, 1);
                        }
                        var38 = var35;
                    }
                }
                for (var58 = (WidgetNode) componentTable.first(); var58 != null; var58 = (WidgetNode) componentTable.next()) {
                    if (var58.field775) {
                        var58.field775 = false;
                    } else {
                        class44.closeWidget(var58, true);
                    }
                }
                widgetFlags = new HashTable(512);
                while (var3.offset < var23) {
                    var31 = var3.readInt();
                    var8 = var3.readUnsignedShort();
                    var37 = var3.readUnsignedShort();
                    var10 = var3.readInt();
                    for (int var39 = var8; var39 <= var37; ++var39) {
                        var12 = ((long) var31 << 32) + (long) var39;
                        widgetFlags.put(new IntegerNode(var10), var12);
                    }
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2304 == var1.serverPacket) {
                if (var1.packetLength == 0) {
                    class33.clanMemberManager = null;
                } else {
                    if (class33.clanMemberManager == null) {
                        class33.clanMemberManager = new ClanMemberManager(loginType, BoundingBox.clientInstance);
                    }
                    class33.clanMemberManager.method5492(var3);
                }
                field1049 = cycleCntr;
                IndexStoreActionHandler.field3392 = true;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2305 == var1.serverPacket) {
                field1099 = true;
                VarPlayerType.field3441 = var3.readUnsignedByte();
                class149.field2123 = var3.readUnsignedByte();
                class86.field1317 = var3.readUnsignedShort();
                UnitPriceComparator.field294 = var3.readUnsignedByte();
                class37.field485 = var3.readUnsignedByte();
                if (class37.field485 >= 100) {
                    var23 = VarPlayerType.field3441 * 128 + 64;
                    var5 = class149.field2123 * 128 + 64;
                    var25 = class5.getTileHeight(var23, var5, class237.plane) - class86.field1317;
                    var31 = var23 - Sequence.cameraX;
                    var8 = var25 - Area.cameraZ;
                    var37 = var5 - ChatLineBuffer.cameraY;
                    var10 = (int) Math.sqrt((double) (var31 * var31 + var37 * var37));
                    BoundingBox3D.cameraPitch = (int) (Math.atan2((double) var8, (double) var10) * 325.949D) & 2047;
                    ClientPacket.cameraYaw = (int) (Math.atan2((double) var31, (double) var37) * -325.949D) & 2047;
                    if (BoundingBox3D.cameraPitch < 128) {
                        BoundingBox3D.cameraPitch = 128;
                    }
                    if (BoundingBox3D.cameraPitch > 383) {
                        BoundingBox3D.cameraPitch = 383;
                    }
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2334 == var1.serverPacket) {
                World var56 = new World();
                var56.address = var3.readString();
                var56.id = var3.readUnsignedShort();
                var5 = var3.readInt();
                var56.mask = var5;
                MapIconReference.setGameState(45);
                var2.vmethod3325();
                var2 = null;
                class80.changeWorld(var56);
                var1.serverPacket = null;
                return false;
            }
            if (ServerPacket.field2348 == var1.serverPacket) {
                var3.offset += 28;
                if (var3.checkCrc()) {
                    var23 = var3.offset - 28;
                    class167.method3253(var3.payload, var23);
                    if (class167.randomDat != null) {
                        try {
                            class167.randomDat.seek(0L);
                            class167.randomDat.write(var3.payload, var23, 24);
                        } catch (Exception var46) {
                            ;
                        }
                    }
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2306 == var1.serverPacket) {
                var23 = var3.readUnsignedShortOb1();
                var5 = var3.method3566();
                var25 = var3.method3716();
                var62 = class3.getWidget(var5);
                var62.field2906 = var25 + (var23 << 16);
                var1.serverPacket = null;
                return true;
            }
            String var61;
            if (ServerPacket.field2315 == var1.serverPacket) {
                var54 = var3.readString();
                var24 = BaseVarType.method13(var3, 32767);
                var61 = FontTypeFace.appendTags(Item.method1925(var24));
                class189.sendGameMessage(6, var54, var61);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2360 == var1.serverPacket) {
                var23 = var3.method3564();
                var5 = var3.method3513();
                class237.serverVarps[var5] = var23;
                if (class237.clientVarps[var5] != var23) {
                    class237.clientVarps[var5] = var23;
                }
                class93.method1950(var5);
                field988[++field1042 - 1 & 31] = var5;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2330 == var1.serverPacket) {
                MouseRecorder.xteaChanged(true, var1.packetBuffer);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2323 == var1.serverPacket) {
                RunException.friendManager.method1659(var3, var1.packetLength);
                field1048 = cycleCntr;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2301 == var1.serverPacket) {
                var23 = var3.method3716();
                var5 = var3.readInt();
                var6 = class3.getWidget(var5);
                if (var6.modelType != 2 || var23 != var6.modelId) {
                    var6.modelType = 2;
                    var6.modelId = var23;
                    WorldMapType1.method274(var6);
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2318 == var1.serverPacket) {
                publicChatMode = var3.method3548();
                field1035 = var3.method3548();
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2311 == var1.serverPacket) {
                var23 = var3.method3565();
                var5 = var3.method3564();
                WidgetNode var63 = (WidgetNode) componentTable.get((long) var5);
                var58 = (WidgetNode) componentTable.get((long) var23);
                if (var58 != null) {
                    class44.closeWidget(var58, var63 == null || var58.id != var63.id);
                }
                if (var63 != null) {
                    var63.unlink();
                    componentTable.put(var63, (long) var23);
                }
                var87 = class3.getWidget(var5);
                if (var87 != null) {
                    WorldMapType1.method274(var87);
                }
                var87 = class3.getWidget(var23);
                if (var87 != null) {
                    WorldMapType1.method274(var87);
                    MapIcon.method578(class189.widgets[var87.id >>> 16], var87, true);
                }
                if (widgetRoot != -1) {
                    DState.method3500(widgetRoot, 1);
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2338 == var1.serverPacket) {
                byte var84 = var3.readByte();
                var5 = var3.method3513();
                class237.serverVarps[var5] = var84;
                if (class237.clientVarps[var5] != var84) {
                    class237.clientVarps[var5] = var84;
                }
                class93.method1950(var5);
                field988[++field1042 - 1 & 31] = var5;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2302 == var1.serverPacket) {
                MouseRecorder.xteaChanged(false, var1.packetBuffer);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2357 == var1.serverPacket) {
                var83 = var3.readUnsignedByte() == 1;
                if (var83) {
                    class265.field3431 = ScriptVarType.method28() - var3.readLong();
                    grandExchangeEvents = new GrandExchangeEvents(var3, true);
                } else {
                    grandExchangeEvents = null;
                }
                field879 = cycleCntr;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2295 == var1.serverPacket) {
                BoundingBox.method58(class183.field2483);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2347 == var1.serverPacket) {
                RunException.friendManager.method1658();
                field1048 = cycleCntr;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2340 == var1.serverPacket) {
                var23 = var3.readUnsignedByte();
                if (var3.readUnsignedByte() == 0) {
                    grandExchangeOffers[var23] = new GrandExchangeOffer();
                    var3.offset += 18;
                } else {
                    --var3.offset;
                    grandExchangeOffers[var23] = new GrandExchangeOffer(var3, false);
                }
                field1008 = cycleCntr;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2308 == var1.serverPacket) {
                var23 = var3.readUnsignedShortOb1();
                ItemContainer var76 = (ItemContainer) ItemContainer.itemContainers.get((long) var23);
                if (var76 != null) {
                    var76.unlink();
                }
                interfaceItemTriggers[++field1119 - 1 & 31] = var23 & 32767;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2365 == var1.serverPacket) {
                hintArrowTargetType = var3.readUnsignedByte();
                if (hintArrowTargetType == 1) {
                    hintArrowNpcTargetIdx = var3.readUnsignedShort();
                }
                if (hintArrowTargetType >= 2 && hintArrowTargetType <= 6) {
                    if (hintArrowTargetType == 2) {
                        hintArrowOffsetX = 64;
                        hintArrowOffsetY = 64;
                    }
                    if (hintArrowTargetType == 3) {
                        hintArrowOffsetX = 0;
                        hintArrowOffsetY = 64;
                    }
                    if (hintArrowTargetType == 4) {
                        hintArrowOffsetX = 128;
                        hintArrowOffsetY = 64;
                    }
                    if (hintArrowTargetType == 5) {
                        hintArrowOffsetX = 64;
                        hintArrowOffsetY = 0;
                    }
                    if (hintArrowTargetType == 6) {
                        hintArrowOffsetX = 64;
                        hintArrowOffsetY = 128;
                    }
                    hintArrowTargetType = 2;
                    hintArrowX = var3.readUnsignedShort();
                    hintArrowY = var3.readUnsignedShort();
                    hintArrowType = var3.readUnsignedByte();
                }
                if (hintArrowTargetType == 10) {
                    hintArrowPlayerTargetIdx = var3.readUnsignedShort();
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2351 == var1.serverPacket) {
                var23 = var3.readInt();
                if (var23 != field1009) {
                    field1009 = var23;
                    if (field930 == 1) {
                        field938 = true;
                    }
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2312 == var1.serverPacket) {
                WorldMapManager.field533 = var3.method3673();
                GameEngine.field673 = var3.readUnsignedByte();
                for (var23 = WorldMapManager.field533; var23 < WorldMapManager.field533 + 8; ++var23) {
                    for (var5 = GameEngine.field673; var5 < GameEngine.field673 + 8; ++var5) {
                        if (groundItemDeque[class237.plane][var23][var5] != null) {
                            groundItemDeque[class237.plane][var23][var5] = null;
                            WorldComparator.groundItemSpawned(var23, var5);
                        }
                    }
                }
                for (PendingSpawn var55 = (PendingSpawn) pendingSpawns.getFront(); var55 != null; var55 = (PendingSpawn) pendingSpawns.getNext()) {
                    if (var55.x >= WorldMapManager.field533 && var55.x < WorldMapManager.field533 + 8 && var55.y >= GameEngine.field673 && var55.y < GameEngine.field673 + 8 && var55.level == class237.plane) {
                        var55.hitpoints = 0;
                    }
                }
                var1.serverPacket = null;
                return true;
            }
            long var40;
            int var42;
            if (ServerPacket.field2354 == var1.serverPacket) {
                var54 = var3.readString();
                var26 = (long) var3.readUnsignedShort();
                var28 = (long) var3.read24BitInt();
                Permission var90 = (Permission) class44.forOrdinal(class3.method6(), var3.readUnsignedByte());
                var40 = var28 + (var26 << 32);
                boolean var92 = false;
                for (var42 = 0; var42 < 100; ++var42) {
                    if (var40 == field989[var42]) {
                        var92 = true;
                        break;
                    }
                }
                if (RunException.friendManager.method1695(new Name(var54, loginType))) {
                    var92 = true;
                }
                if (!var92 && myPlayerIndex == 0) {
                    field989[field1075] = var40;
                    field1075 = (field1075 + 1) % 100;
                    String var13 = BaseVarType.method13(var3, 32767);
                    String var36 = FontTypeFace.appendTags(Item.method1925(var13));
                    byte var73;
                    if (var90.field3335) {
                        var73 = 7;
                    } else {
                        var73 = 3;
                    }
                    if (var90.field3334 != -1) {
                        class189.sendGameMessage(var73, class22.method186(var90.field3334) + var54, var36);
                    } else {
                        class189.sendGameMessage(var73, var54, var36);
                    }
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2298 == var1.serverPacket) {
                var23 = var3.readUnsignedByte();
                var5 = var3.readUnsignedByte();
                var25 = var3.readUnsignedByte();
                var31 = var3.readUnsignedByte();
                field901[var23] = true;
                field1101[var23] = var5;
                field861[var23] = var25;
                field1103[var23] = var31;
                field1104[var23] = 0;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2325 == var1.serverPacket) {
                var54 = var3.readString();
                GraphicsObject.sessionToken = var54;
                try {
                    var24 = BoundingBox.clientInstance.getParameter(Parameters.field3804.key);
                    var61 = BoundingBox.clientInstance.getParameter(Parameters.field3805.key);
                    String var59 = var24 + "settings=" + var54 + "; version=1; path=/; domain=" + var61;
                    if (var54.length() == 0) {
                        var59 = var59 + "; Expires=Thu, 01-Jan-1970 00:00:00 GMT; Max-Age=0";
                    } else {
                        var86 = var59 + "; Expires=";
                        var40 = ScriptVarType.method28() + 94608000000L;
                        class204.field2609.setTime(new Date(var40));
                        var34 = class204.field2609.get(7);
                        var42 = class204.field2609.get(5);
                        var14 = class204.field2609.get(2);
                        var15 = class204.field2609.get(1);
                        int var43 = class204.field2609.get(11);
                        int var44 = class204.field2609.get(12);
                        var18 = class204.field2609.get(13);
                        var89 = class204.field2607[var34 - 1] + ", " + var42 / 10 + var42 % 10 + "-" + class204.field2608[0][var14] + "-" + var15 + " " + var43 / 10 + var43 % 10 + ":" + var44 / 10 + var44 % 10 + ":" + var18 / 10 + var18 % 10 + " GMT";
                        var59 = var86 + var89 + "; Max-Age=" + 94608000L;
                    }
                    class53.method813(BoundingBox.clientInstance, "document.cookie=\"" + var59 + "\"");
                } catch (Throwable var45) {
                    ;
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2358 == var1.serverPacket) {
                var23 = var3.method3549();
                var24 = var3.readString();
                var25 = var3.method3548();
                if (var23 >= 1 && var23 <= 8) {
                    if (var24.equalsIgnoreCase("null")) {
                        var24 = null;
                    }
                    playerOptions[var23 - 1] = var24;
                    playerOptionsPriorities[var23 - 1] = var25 == 0;
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2328 == var1.serverPacket) {
                var23 = var3.method3513();
                if (var23 == 65535) {
                    var23 = -1;
                }
                if (var23 == -1 && !field1090) {
                    class229.field2679.method4150();
                    class229.field2680 = 1;
                    class61.field714 = null;
                } else if (var23 != -1 && var23 != field1089 && field1044 != 0 && !field1090) {
                    CacheFile.method2509(2, class1.indexTrack1, var23, 0, field1044, false);
                }
                field1089 = var23;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2293 == var1.serverPacket) {
                var23 = var3.read24BitInt();
                var5 = var3.method3513();
                if (var5 == 65535) {
                    var5 = -1;
                }
                class95.method2006(var5, var23);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2297 == var1.serverPacket) {
                var23 = var3.getUSmart();
                var60 = var3.readUnsignedByte() == 1;
                var61 = "";
                boolean var88 = false;
                if (var60) {
                    var61 = var3.readString();
                    if (RunException.friendManager.method1695(new Name(var61, loginType))) {
                        var88 = true;
                    }
                }
                var86 = var3.readString();
                if (!var88) {
                    class189.sendGameMessage(var23, var61, var86);
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2363 == var1.serverPacket) {
                BoundingBox.method58(class183.field2484);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2359 == var1.serverPacket) {
                for (var23 = 0; var23 < class237.clientVarps.length; ++var23) {
                    if (class237.clientVarps[var23] != class237.serverVarps[var23]) {
                        class237.clientVarps[var23] = class237.serverVarps[var23];
                        class93.method1950(var23);
                        field988[++field1042 - 1 & 31] = var23;
                    }
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2296 == var1.serverPacket) {
                var23 = var3.readInt();
                var5 = var3.readUnsignedShort();
                if (var23 < -70000) {
                    var5 += 32768;
                }
                if (var23 >= 0) {
                    var6 = class3.getWidget(var23);
                } else {
                    var6 = null;
                }
                for (; var3.offset < var1.packetLength; GrandExchangeEvent.setItemTableSlot(var5, var31, var8 - 1, var37)) {
                    var31 = var3.getUSmart();
                    var8 = var3.readUnsignedShort();
                    var37 = 0;
                    if (var8 != 0) {
                        var37 = var3.readUnsignedByte();
                        if (var37 == 255) {
                            var37 = var3.readInt();
                        }
                    }
                    if (var6 != null && var31 >= 0 && var31 < var6.itemIds.length) {
                        var6.itemIds[var31] = var8;
                        var6.itemQuantities[var31] = var37;
                    }
                }
                if (var6 != null) {
                    WorldMapType1.method274(var6);
                }
                WorldMapType1.method298();
                interfaceItemTriggers[++field1119 - 1 & 31] = var5 & 32767;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2317 == var1.serverPacket) {
                var23 = var3.readInt();
                var5 = var3.method3716();
                var25 = var3.method3548();
                var58 = (WidgetNode) componentTable.get((long) var23);
                if (var58 != null) {
                    class44.closeWidget(var58, var5 != var58.id);
                }
                WidgetNode var32 = new WidgetNode();
                var32.id = var5;
                var32.owner = var25;
                componentTable.put(var32, (long) var23);
                class251.method4520(var5);
                Widget var33 = class3.getWidget(var23);
                WorldMapType1.method274(var33);
                if (field1102 != null) {
                    WorldMapType1.method274(field1102);
                    field1102 = null;
                }
                BoundingBox3D.method62();
                MapIcon.method578(class189.widgets[var23 >> 16], var33, false);
                FriendManager.runWidgetOnLoadListener(var5);
                if (widgetRoot != -1) {
                    DState.method3500(widgetRoot, 1);
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2336 == var1.serverPacket) {
                BoundingBox.method58(class183.field2489);
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2326 == var1.serverPacket) {
                var54 = var3.readString();
                var5 = var3.method3564();
                var6 = class3.getWidget(var5);
                if (!var54.equals(var6.text)) {
                    var6.text = var54;
                    WorldMapType1.method274(var6);
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2310 == var1.serverPacket) {
                field873 = var3.readUnsignedShort() * 30;
                field1052 = cycleCntr;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2346 == var1.serverPacket) {
                WorldMapType1.method298();
                var23 = var3.readUnsignedByte();
                var5 = var3.method3564();
                var25 = var3.method3548();
                skillExperiences[var23] = var5;
                boostedSkillLevels[var23] = var25;
                realSkillLevels[var23] = 1;
                for (var31 = 0; var31 < 98; ++var31) {
                    if (var5 >= class248.field2998[var31]) {
                        realSkillLevels[var23] = var31 + 2;
                    }
                }
                field1045[++field1046 - 1 & 31] = var23;
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2337 == var1.serverPacket) {
                method1578(var3, var1.packetLength);
                WorldMapRegion.method516();
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2287 == var1.serverPacket) {
                GameEngine.field673 = var3.readUnsignedByte();
                WorldMapManager.field533 = var3.method3549();
                while (var3.offset < var1.packetLength) {
                    var23 = var3.readUnsignedByte();
                    class183 var75 = class81.method1786()[var23];
                    BoundingBox.method58(var75);
                }
                var1.serverPacket = null;
                return true;
            }
            if (ServerPacket.field2319 == var1.serverPacket) {
                var23 = var3.readInt();
                var5 = var3.readUnsignedShort();
                if (var23 < -70000) {
                    var5 += 32768;
                }
                if (var23 >= 0) {
                    var6 = class3.getWidget(var23);
                } else {
                    var6 = null;
                }
                if (var6 != null) {
                    for (var31 = 0; var31 < var6.itemIds.length; ++var31) {
                        var6.itemIds[var31] = 0;
                        var6.itemQuantities[var31] = 0;
                    }
                }
                ItemContainer var7 = (ItemContainer) ItemContainer.itemContainers.get((long) var5);
                if (var7 != null) {
                    for (var8 = 0; var8 < var7.itemIds.length; ++var8) {
                        var7.itemIds[var8] = -1;
                        var7.stackSizes[var8] = 0;
                    }
                }
                var31 = var3.readUnsignedShort();
                for (var8 = 0; var8 < var31; ++var8) {
                    var37 = var3.method3549();
                    if (var37 == 255) {
                        var37 = var3.method3564();
                    }
                    var10 = var3.readUnsignedShortOb1();
                    if (var6 != null && var8 < var6.itemIds.length) {
                        var6.itemIds[var8] = var10;
                        var6.itemQuantities[var8] = var37;
                    }
                    GrandExchangeEvent.setItemTableSlot(var5, var8, var10 - 1, var37);
                }
                if (var6 != null) {
                    WorldMapType1.method274(var6);
                }
                WorldMapType1.method298();
                interfaceItemTriggers[++field1119 - 1 & 31] = var5 & 32767;
                var1.serverPacket = null;
                return true;
            }
            UrlRequest.processClientError("" + (var1.serverPacket != null ? var1.serverPacket.packetId : -1) + "," + (var1.field1473 != null ? var1.field1473.packetId : -1) + "," + (var1.field1471 != null ? var1.field1471.packetId : -1) + "," + var1.packetLength, (Throwable) null);
            FriendManager.method1722();
        } catch (IOException var52) {
            class150.method3132();
        } catch (Exception var53) {
            var24 = "" + (var1.serverPacket != null ? var1.serverPacket.packetId : -1) + "," + (var1.field1473 != null ? var1.field1473.packetId : -1) + "," + (var1.field1471 != null ? var1.field1471.packetId : -1) + "," + var1.packetLength + "," + (WorldComparator.localPlayer.pathX[0] + PacketNode.baseX) + "," + (WorldComparator.localPlayer.pathY[0] + BaseVarType.baseY) + ",";
            for (var25 = 0; var25 < var1.packetLength && var25 < 50; ++var25) {
                var24 = var24 + var3.payload[var25] + ",";
            }
            UrlRequest.processClientError(var24, var53);
            FriendManager.method1722();
        }
        return true;
    }
}
Also used : ObfuscatedName(net.runelite.mapping.ObfuscatedName) Method(java.lang.reflect.Method) JSObject(netscape.javascript.JSObject) Iterator(java.util.Iterator) IOException(java.io.IOException) IOException(java.io.IOException) Date(java.util.Date) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 25 with ObfuscatedSignature

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

the class GameCanvas method method824.

@ObfuscatedName("z")
@ObfuscatedSignature(signature = "(I)V", garbageValue = "231267082")
static void method824() {
    Iterator var0 = class95.messages.iterator();
    while (var0.hasNext()) {
        MessageNode var1 = (MessageNode) var0.next();
        var1.method1131();
    }
}
Also used : Iterator(java.util.Iterator) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Aggregations

ObfuscatedSignature (net.runelite.mapping.ObfuscatedSignature)72 ObfuscatedName (net.runelite.mapping.ObfuscatedName)71 Iterator (java.util.Iterator)30 Export (net.runelite.mapping.Export)22 IOException (java.io.IOException)10 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 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 File (java.io.File)2