Search in sources :

Example 31 with ObfuscatedName

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

the class Fonts method encodeClassVerifier.

@ObfuscatedName("c")
@ObfuscatedSignature(signature = "(Lgf;I)V", garbageValue = "-604031072")
@Export("encodeClassVerifier")
public static void encodeClassVerifier(PacketBuffer var0) {
    ClassInfo var1 = (ClassInfo) class326.classInfos.last();
    if (var1 != null) {
        int var2 = var0.offset;
        var0.putInt(var1.field3948);
        for (int var3 = 0; var3 < var1.count; ++var3) {
            if (var1.errorIdentifiers[var3] != 0) {
                var0.putByte(var1.errorIdentifiers[var3]);
            } else {
                try {
                    int var4 = var1.type[var3];
                    Field var5;
                    int var6;
                    if (var4 == 0) {
                        var5 = var1.fields[var3];
                        var6 = Reflection.getInt(var5, (Object) null);
                        var0.putByte(0);
                        var0.putInt(var6);
                    } else if (var4 == 1) {
                        var5 = var1.fields[var3];
                        Reflection.setInt(var5, (Object) null, var1.field3947[var3]);
                        var0.putByte(0);
                    } else if (var4 == 2) {
                        var5 = var1.fields[var3];
                        var6 = var5.getModifiers();
                        var0.putByte(0);
                        var0.putInt(var6);
                    }
                    Method var25;
                    if (var4 != 3) {
                        if (var4 == 4) {
                            var25 = var1.methods[var3];
                            var6 = var25.getModifiers();
                            var0.putByte(0);
                            var0.putInt(var6);
                        }
                    } else {
                        var25 = var1.methods[var3];
                        byte[][] var10 = var1.args[var3];
                        Object[] var7 = new Object[var10.length];
                        for (int var8 = 0; var8 < var10.length; ++var8) {
                            ObjectInputStream var9 = new ObjectInputStream(new ByteArrayInputStream(var10[var8]));
                            var7[var8] = var9.readObject();
                        }
                        Object var11 = Reflection.invoke(var25, (Object) null, var7);
                        if (var11 == null) {
                            var0.putByte(0);
                        } else if (var11 instanceof Number) {
                            var0.putByte(1);
                            var0.putLong(((Number) var11).longValue());
                        } else if (var11 instanceof String) {
                            var0.putByte(2);
                            var0.putString((String) var11);
                        } else {
                            var0.putByte(4);
                        }
                    }
                } catch (ClassNotFoundException var13) {
                    var0.putByte(-10);
                } catch (InvalidClassException var14) {
                    var0.putByte(-11);
                } catch (StreamCorruptedException var15) {
                    var0.putByte(-12);
                } catch (OptionalDataException var16) {
                    var0.putByte(-13);
                } catch (IllegalAccessException var17) {
                    var0.putByte(-14);
                } catch (IllegalArgumentException var18) {
                    var0.putByte(-15);
                } catch (InvocationTargetException var19) {
                    var0.putByte(-16);
                } catch (SecurityException var20) {
                    var0.putByte(-17);
                } catch (IOException var21) {
                    var0.putByte(-18);
                } catch (NullPointerException var22) {
                    var0.putByte(-19);
                } catch (Exception var23) {
                    var0.putByte(-20);
                } catch (Throwable var24) {
                    var0.putByte(-21);
                }
            }
        }
        var0.putCrc(var2);
        var1.unlink();
    }
}
Also used : InvalidClassException(java.io.InvalidClassException) Method(java.lang.reflect.Method) IOException(java.io.IOException) OptionalDataException(java.io.OptionalDataException) InvocationTargetException(java.lang.reflect.InvocationTargetException) StreamCorruptedException(java.io.StreamCorruptedException) OptionalDataException(java.io.OptionalDataException) IOException(java.io.IOException) InvocationTargetException(java.lang.reflect.InvocationTargetException) InvalidClassException(java.io.InvalidClassException) Field(java.lang.reflect.Field) ByteArrayInputStream(java.io.ByteArrayInputStream) StreamCorruptedException(java.io.StreamCorruptedException) ObjectInputStream(java.io.ObjectInputStream) Export(net.runelite.mapping.Export) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 32 with ObfuscatedName

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

the class Client method vmethod1200.

@ObfuscatedName("ae")
@ObfuscatedSignature(signature = "(I)V", garbageValue = "-1577184348")
protected final void vmethod1200() {
    if (class158.varcs.changed()) {
        class158.varcs.serialize();
    }
    if (class38.mouseRecorder != null) {
        class38.mouseRecorder.isRunning = false;
    }
    class38.mouseRecorder = null;
    field902.close();
    class7.method31();
    if (MouseInput.mouse != null) {
        MouseInput var1 = MouseInput.mouse;
        synchronized (MouseInput.mouse) {
            MouseInput.mouse = null;
        }
    }
    class49.mouseWheel = null;
    if (OwnWorldComparator.soundSystem0 != null) {
        OwnWorldComparator.soundSystem0.shutdown();
    }
    if (Tile.soundSystem1 != null) {
        Tile.soundSystem1.shutdown();
    }
    if (class264.NetCache_socket != null) {
        class264.NetCache_socket.vmethod3325();
    }
    Object var9 = IndexStoreActionHandler.IndexStoreActionHandler_lock;
    synchronized (IndexStoreActionHandler.IndexStoreActionHandler_lock) {
        if (IndexStoreActionHandler.field3389 != 0) {
            IndexStoreActionHandler.field3389 = 1;
            try {
                IndexStoreActionHandler.IndexStoreActionHandler_lock.wait();
            } catch (InterruptedException var5) {
                ;
            }
        }
    }
    if (MapIconReference.urlRequester != null) {
        MapIconReference.urlRequester.close();
        MapIconReference.urlRequester = null;
    }
    try {
        class167.dat2File.close();
        for (int var4 = 0; var4 < class316.idxCount; ++var4) {
            class167.idxFiles[var4].close();
        }
        class167.idx255File.close();
        class167.randomDat.close();
    } catch (Exception var7) {
        ;
    }
}
Also used : JSObject(netscape.javascript.JSObject) IOException(java.io.IOException) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 33 with ObfuscatedName

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

the class Client method method1342.

@ObfuscatedName("fe")
@ObfuscatedSignature(signature = "(I)V", garbageValue = "-1590266613")
final void method1342() {
    if (field873 > 1) {
        --field873;
    }
    if (field903 > 0) {
        --field903;
    }
    if (socketError) {
        socketError = false;
        class150.method3132();
    } else {
        if (!isMenuOpen) {
            GrandExchangeOffer.method124();
        }
        int var1;
        for (var1 = 0; var1 < 100 && this.method1209(field902); ++var1) {
            ;
        }
        if (gameState == 30) {
            while (true) {
                ClassInfo var2 = (ClassInfo) class326.classInfos.last();
                boolean var30;
                if (var2 == null) {
                    var30 = false;
                } else {
                    var30 = true;
                }
                int var3;
                PacketNode var31;
                if (!var30) {
                    PacketNode var14;
                    int var15;
                    if (field1050.field3816) {
                        var14 = FaceNormal.method3078(ClientPacket.field2427, field902.field1475);
                        var14.packetBuffer.putByte(0);
                        var15 = var14.packetBuffer.offset;
                        field1050.method5216(var14.packetBuffer);
                        var14.packetBuffer.method3516(var14.packetBuffer.offset - var15);
                        field902.method2036(var14);
                        field1050.method5214();
                    }
                    Object var36 = class38.mouseRecorder.lock;
                    int var4;
                    int var5;
                    int var6;
                    int var7;
                    int var8;
                    int var9;
                    int var10;
                    synchronized (class38.mouseRecorder.lock) {
                        if (!field856) {
                            class38.mouseRecorder.index = 0;
                        } else if (MouseInput.mouseLastButton != 0 || class38.mouseRecorder.index >= 40) {
                            var31 = FaceNormal.method3078(ClientPacket.field2454, field902.field1475);
                            var31.packetBuffer.putByte(0);
                            var3 = var31.packetBuffer.offset;
                            var4 = 0;
                            for (var5 = 0; var5 < class38.mouseRecorder.index && var31.packetBuffer.offset - var3 < 240; ++var5) {
                                ++var4;
                                var6 = class38.mouseRecorder.ys[var5];
                                if (var6 < 0) {
                                    var6 = 0;
                                } else if (var6 > 502) {
                                    var6 = 502;
                                }
                                var7 = class38.mouseRecorder.xs[var5];
                                if (var7 < 0) {
                                    var7 = 0;
                                } else if (var7 > 764) {
                                    var7 = 764;
                                }
                                var8 = var7 + var6 * 765;
                                if (class38.mouseRecorder.ys[var5] == -1 && class38.mouseRecorder.xs[var5] == -1) {
                                    var7 = -1;
                                    var6 = -1;
                                    var8 = 524287;
                                }
                                if (var7 == field990 && var6 == field948) {
                                    if (field870 < 2047) {
                                        ++field870;
                                    }
                                } else {
                                    var9 = var7 - field990;
                                    field990 = var7;
                                    var10 = var6 - field948;
                                    field948 = var6;
                                    if (field870 < 8 && var9 >= -32 && var9 <= 31 && var10 >= -32 && var10 <= 31) {
                                        var9 += 32;
                                        var10 += 32;
                                        var31.packetBuffer.putShort(var10 + (field870 << 12) + (var9 << 6));
                                        field870 = 0;
                                    } else if (field870 < 8) {
                                        var31.packetBuffer.put24bitInt((field870 << 19) + var8 + 8388608);
                                        field870 = 0;
                                    } else {
                                        var31.packetBuffer.putInt((field870 << 19) + var8 + -1073741824);
                                        field870 = 0;
                                    }
                                }
                            }
                            var31.packetBuffer.method3516(var31.packetBuffer.offset - var3);
                            field902.method2036(var31);
                            if (var4 >= class38.mouseRecorder.index) {
                                class38.mouseRecorder.index = 0;
                            } else {
                                class38.mouseRecorder.index -= var4;
                                for (var5 = 0; var5 < class38.mouseRecorder.index; ++var5) {
                                    class38.mouseRecorder.xs[var5] = class38.mouseRecorder.xs[var5 + var4];
                                    class38.mouseRecorder.ys[var5] = class38.mouseRecorder.ys[var5 + var4];
                                }
                            }
                        }
                    }
                    if (MouseInput.mouseLastButton == 1 || !WorldMapData.middleMouseMovesCamera && MouseInput.mouseLastButton == 4 || MouseInput.mouseLastButton == 2) {
                        long var16 = (MouseInput.mouseLastPressedTimeMillis - mouseLastLastPressedTimeMillis) / 50L;
                        if (var16 > 4095L) {
                            var16 = 4095L;
                        }
                        mouseLastLastPressedTimeMillis = MouseInput.mouseLastPressedTimeMillis;
                        var3 = MouseInput.mouseLastPressedY;
                        if (var3 < 0) {
                            var3 = 0;
                        } else if (var3 > class45.canvasHeight) {
                            var3 = class45.canvasHeight;
                        }
                        var4 = MouseInput.mouseLastPressedX;
                        if (var4 < 0) {
                            var4 = 0;
                        } else if (var4 > Sequence.canvasWidth) {
                            var4 = Sequence.canvasWidth;
                        }
                        var5 = (int) var16;
                        PacketNode var18 = FaceNormal.method3078(ClientPacket.field2396, field902.field1475);
                        var18.packetBuffer.putShort((var5 << 1) + (MouseInput.mouseLastButton == 2 ? 1 : 0));
                        var18.packetBuffer.putShort(var4);
                        var18.packetBuffer.putShort(var3);
                        field902.method2036(var18);
                    }
                    if (KeyFocusListener.field593 > 0) {
                        var14 = FaceNormal.method3078(ClientPacket.field2390, field902.field1475);
                        var14.packetBuffer.putShort(0);
                        var15 = var14.packetBuffer.offset;
                        long var19 = ScriptVarType.method28();
                        for (var5 = 0; var5 < KeyFocusListener.field593; ++var5) {
                            long var21 = var19 - field1079;
                            if (var21 > 16777215L) {
                                var21 = 16777215L;
                            }
                            field1079 = var19;
                            var14.packetBuffer.putByte(KeyFocusListener.field613[var5]);
                            var14.packetBuffer.put24bitInt((int) var21);
                        }
                        var14.packetBuffer.method3515(var14.packetBuffer.offset - var15);
                        field902.method2036(var14);
                    }
                    if (field939 > 0) {
                        --field939;
                    }
                    if (KeyFocusListener.keyPressed[96] || KeyFocusListener.keyPressed[97] || KeyFocusListener.keyPressed[98] || KeyFocusListener.keyPressed[99]) {
                        field940 = true;
                    }
                    if (field940 && field939 <= 0) {
                        field939 = 20;
                        field940 = false;
                        var14 = FaceNormal.method3078(ClientPacket.field2459, field902.field1475);
                        var14.packetBuffer.putShort(cameraPitchTarget);
                        var14.packetBuffer.method3554(mapAngle);
                        field902.method2036(var14);
                    }
                    if (MapIcon.field508 && !field1117) {
                        field1117 = true;
                        var14 = FaceNormal.method3078(ClientPacket.field2445, field902.field1475);
                        var14.packetBuffer.putByte(1);
                        field902.method2036(var14);
                    }
                    if (!MapIcon.field508 && field1117) {
                        field1117 = false;
                        var14 = FaceNormal.method3078(ClientPacket.field2445, field902.field1475);
                        var14.packetBuffer.putByte(0);
                        field902.method2036(var14);
                    }
                    if (ScriptState.renderOverview != null) {
                        ScriptState.renderOverview.method6011();
                    }
                    if (IndexStoreActionHandler.field3392) {
                        if (class33.clanMemberManager != null) {
                            class33.clanMemberManager.method5333();
                        }
                        WorldMapDecoration.method303();
                        IndexStoreActionHandler.field3392 = false;
                    }
                    if (class237.plane != field1100) {
                        field1100 = class237.plane;
                        var1 = class237.plane;
                        int[] var32 = ServerPacket.minimapSprite.pixels;
                        var3 = var32.length;
                        for (var4 = 0; var4 < var3; ++var4) {
                            var32[var4] = 0;
                        }
                        for (var4 = 1; var4 < 103; ++var4) {
                            var5 = (103 - var4) * 2048 + 24628;
                            for (var6 = 1; var6 < 103; ++var6) {
                                if ((class62.tileSettings[var1][var6][var4] & 24) == 0) {
                                    class308.region.drawTile(var32, var5, 512, var1, var6, var4);
                                }
                                if (var1 < 3 && (class62.tileSettings[var1 + 1][var6][var4] & 8) != 0) {
                                    class308.region.drawTile(var32, var5, 512, var1 + 1, var6, var4);
                                }
                                var5 += 4;
                            }
                        }
                        var4 = (238 + (int) (Math.random() * 20.0D) - 10 << 16) + (238 + (int) (Math.random() * 20.0D) - 10 << 8) + (238 + (int) (Math.random() * 20.0D) - 10);
                        var5 = 238 + (int) (Math.random() * 20.0D) - 10 << 16;
                        ServerPacket.minimapSprite.setRaster();
                        for (var6 = 1; var6 < 103; ++var6) {
                            for (var7 = 1; var7 < 103; ++var7) {
                                if ((class62.tileSettings[var1][var7][var6] & 24) == 0) {
                                    Preferences.drawObject(var1, var7, var6, var4, var5);
                                }
                                if (var1 < 3 && (class62.tileSettings[var1 + 1][var7][var6] & 8) != 0) {
                                    Preferences.drawObject(var1 + 1, var7, var6, var4, var5);
                                }
                            }
                        }
                        field1081 = 0;
                        for (var6 = 0; var6 < 104; ++var6) {
                            for (var7 = 0; var7 < 104; ++var7) {
                                var8 = class308.region.getGroundObjectHash(class237.plane, var6, var7);
                                if (var8 != 0) {
                                    var8 = var8 >> 14 & 32767;
                                    var9 = FileRequest.getObjectDefinition(var8).mapIconId;
                                    if (var9 >= 0) {
                                        mapIcons[field1081] = Area.mapAreaType[var9].getMapIcon(false);
                                        field1082[field1081] = var6;
                                        field1083[field1081] = var7;
                                        ++field1081;
                                    }
                                }
                            }
                        }
                        class324.rasterProvider.setRaster();
                    }
                    if (gameState != 30) {
                        return;
                    }
                    for (PendingSpawn var38 = (PendingSpawn) pendingSpawns.getFront(); var38 != null; var38 = (PendingSpawn) pendingSpawns.getNext()) {
                        if (var38.hitpoints > 0) {
                            --var38.hitpoints;
                        }
                        ObjectComposition var23;
                        boolean var37;
                        if (var38.hitpoints == 0) {
                            if (var38.field1137 >= 0) {
                                var3 = var38.field1137;
                                var4 = var38.field1134;
                                var23 = FileRequest.getObjectDefinition(var3);
                                if (var4 == 11) {
                                    var4 = 10;
                                }
                                if (var4 >= 5 && var4 <= 8) {
                                    var4 = 4;
                                }
                                var37 = var23.method5002(var4);
                                if (!var37) {
                                    continue;
                                }
                            }
                            GameCanvas.method826(var38.level, var38.type, var38.x, var38.y, var38.field1137, var38.field1138, var38.field1134);
                            var38.unlink();
                        } else {
                            if (var38.delay > 0) {
                                --var38.delay;
                            }
                            if (var38.delay == 0 && var38.x >= 1 && var38.y >= 1 && var38.x <= 102 && var38.y <= 102) {
                                if (var38.id >= 0) {
                                    var3 = var38.id;
                                    var4 = var38.field1142;
                                    var23 = FileRequest.getObjectDefinition(var3);
                                    if (var4 == 11) {
                                        var4 = 10;
                                    }
                                    if (var4 >= 5 && var4 <= 8) {
                                        var4 = 4;
                                    }
                                    var37 = var23.method5002(var4);
                                    if (!var37) {
                                        continue;
                                    }
                                }
                                GameCanvas.method826(var38.level, var38.type, var38.x, var38.y, var38.id, var38.orientation, var38.field1142);
                                var38.delay = -1;
                                if (var38.id == var38.field1137 && var38.field1137 == -1) {
                                    var38.unlink();
                                } else if (var38.id == var38.field1137 && var38.orientation == var38.field1138 && var38.field1142 == var38.field1134) {
                                    var38.unlink();
                                }
                            }
                        }
                    }
                    GZipDecompressor.method3458();
                    ++field902.field1480;
                    if (field902.field1480 > 750) {
                        class150.method3132();
                        return;
                    }
                    class62.method1086();
                    World.method1643();
                    int[] var39 = class93.playerIndices;
                    for (var15 = 0; var15 < class93.playerIndexesCount; ++var15) {
                        Player var24 = cachedPlayers[var39[var15]];
                        if (var24 != null && var24.overheadTextCyclesRemaining > 0) {
                            --var24.overheadTextCyclesRemaining;
                            if (var24.overheadTextCyclesRemaining == 0) {
                                var24.overhead = null;
                            }
                        }
                    }
                    for (var15 = 0; var15 < npcIndexesCount; ++var15) {
                        var3 = npcIndices[var15];
                        NPC var25 = cachedNPCs[var3];
                        if (var25 != null && var25.overheadTextCyclesRemaining > 0) {
                            --var25.overheadTextCyclesRemaining;
                            if (var25.overheadTextCyclesRemaining == 0) {
                                var25.overhead = null;
                            }
                        }
                    }
                    ++field893;
                    if (cursorState != 0) {
                        field958 += 20;
                        if (field958 >= 400) {
                            cursorState = 0;
                        }
                    }
                    if (class64.field750 != null) {
                        ++mouseCrosshair;
                        if (mouseCrosshair >= 15) {
                            WorldMapType1.method274(class64.field750);
                            class64.field750 = null;
                        }
                    }
                    Widget var40 = Coordinates.field2775;
                    Widget var33 = class23.field331;
                    Coordinates.field2775 = null;
                    class23.field331 = null;
                    draggedOnWidget = null;
                    field877 = false;
                    field1032 = false;
                    field1076 = 0;
                    while (WorldMapRegion.method519() && field1076 < 128) {
                        if (rights >= 2 && KeyFocusListener.keyPressed[82] && Tile.currentPressedKey == 66) {
                            String var46 = "";
                            MessageNode var41;
                            for (Iterator var42 = class95.messages.iterator(); var42.hasNext(); var46 = var46 + var41.name + ':' + var41.value + '\n') {
                                var41 = (MessageNode) var42.next();
                            }
                            BoundingBox.clientInstance.method902(var46);
                        } else if (field930 != 1 || BuildType.currentTypedKey <= 0) {
                            field949[field1076] = Tile.currentPressedKey;
                            field1077[field1076] = BuildType.currentTypedKey;
                            ++field1076;
                        }
                    }
                    if (class237.method4377() && KeyFocusListener.keyPressed[82] && KeyFocusListener.keyPressed[81] && mouseWheelRotation != 0) {
                        var3 = WorldComparator.localPlayer.field842 - mouseWheelRotation;
                        if (var3 < 0) {
                            var3 = 0;
                        } else if (var3 > 3) {
                            var3 = 3;
                        }
                        if (var3 != WorldComparator.localPlayer.field842) {
                            GrandExchangeOffer.method125(WorldComparator.localPlayer.pathX[0] + PacketNode.baseX, WorldComparator.localPlayer.pathY[0] + BaseVarType.baseY, var3, false);
                        }
                        mouseWheelRotation = 0;
                    }
                    if (widgetRoot != -1) {
                        WorldMapType2.method548(widgetRoot, 0, 0, Sequence.canvasWidth, class45.canvasHeight, 0, 0);
                    }
                    ++cycleCntr;
                    while (true) {
                        Widget var43;
                        ScriptEvent var44;
                        Widget var49;
                        do {
                            var44 = (ScriptEvent) field970.popFront();
                            if (var44 == null) {
                                while (true) {
                                    do {
                                        var44 = (ScriptEvent) field1129.popFront();
                                        if (var44 == null) {
                                            while (true) {
                                                do {
                                                    var44 = (ScriptEvent) field1054.popFront();
                                                    if (var44 == null) {
                                                        this.method1399();
                                                        class7.method39();
                                                        if (draggedWidget != null) {
                                                            this.method1354();
                                                        }
                                                        PacketNode var26;
                                                        if (class157.field2149 != null) {
                                                            WorldMapType1.method274(class157.field2149);
                                                            ++itemPressedDuration;
                                                            if (MouseInput.mouseCurrentButton == 0) {
                                                                if (field1109) {
                                                                    if (TextureProvider.field1701 == class157.field2149 && field1080 != field1086) {
                                                                        Widget var48 = class157.field2149;
                                                                        byte var35 = 0;
                                                                        if (field1019 == 1 && var48.contentType == 206) {
                                                                            var35 = 1;
                                                                        }
                                                                        if (var48.itemIds[field1086] <= 0) {
                                                                            var35 = 0;
                                                                        }
                                                                        var6 = class45.getWidgetClickMask(var48);
                                                                        boolean var34 = (var6 >> 29 & 1) != 0;
                                                                        if (var34) {
                                                                            var7 = field1080;
                                                                            var8 = field1086;
                                                                            var48.itemIds[var8] = var48.itemIds[var7];
                                                                            var48.itemQuantities[var8] = var48.itemQuantities[var7];
                                                                            var48.itemIds[var7] = -1;
                                                                            var48.itemQuantities[var7] = 0;
                                                                        } else if (var35 == 1) {
                                                                            var7 = field1080;
                                                                            var8 = field1086;
                                                                            while (var8 != var7) {
                                                                                if (var7 > var8) {
                                                                                    var48.method4451(var7 - 1, var7);
                                                                                    --var7;
                                                                                } else if (var7 < var8) {
                                                                                    var48.method4451(var7 + 1, var7);
                                                                                    ++var7;
                                                                                }
                                                                            }
                                                                        } else {
                                                                            var48.method4451(field1086, field1080);
                                                                        }
                                                                        var26 = FaceNormal.method3078(ClientPacket.field2425, field902.field1475);
                                                                        var26.packetBuffer.method3648(field1086);
                                                                        var26.packetBuffer.method3619(field1080);
                                                                        var26.packetBuffer.method3677(class157.field2149.id);
                                                                        var26.packetBuffer.putByte(var35);
                                                                        field902.method2036(var26);
                                                                    }
                                                                } else if (this.method1211()) {
                                                                    this.openMenu(field964, field1056);
                                                                } else if (menuOptionCount > 0) {
                                                                    var3 = field964;
                                                                    var4 = field1056;
                                                                    ContextMenuRow var45 = ChatLineBuffer.topContextMenuRow;
                                                                    class177.menuAction(var45.param0, var45.param1, var45.type, var45.identifier, var45.option, var45.option, var3, var4);
                                                                    ChatLineBuffer.topContextMenuRow = null;
                                                                }
                                                                mouseCrosshair = 10;
                                                                MouseInput.mouseLastButton = 0;
                                                                class157.field2149 = null;
                                                            } else if (itemPressedDuration >= 5 && (MouseInput.mouseLastX > field964 + 5 || MouseInput.mouseLastX < field964 - 5 || MouseInput.mouseLastY > field1056 + 5 || MouseInput.mouseLastY < field1056 - 5)) {
                                                                field1109 = true;
                                                            }
                                                        }
                                                        if (Region.method2915()) {
                                                            var3 = Region.selectedRegionTileX;
                                                            var4 = Region.selectedRegionTileY;
                                                            PacketNode var47 = FaceNormal.method3078(ClientPacket.field2397, field902.field1475);
                                                            var47.packetBuffer.putByte(5);
                                                            var47.packetBuffer.method3690(KeyFocusListener.keyPressed[82] ? (KeyFocusListener.keyPressed[81] ? 2 : 1) : 0);
                                                            var47.packetBuffer.putShort(var4 + BaseVarType.baseY);
                                                            var47.packetBuffer.method3648(var3 + PacketNode.baseX);
                                                            field902.method2036(var47);
                                                            Region.method3048();
                                                            lastLeftClickX = MouseInput.mouseLastPressedX;
                                                            lastLeftClickY = MouseInput.mouseLastPressedY;
                                                            cursorState = 1;
                                                            field958 = 0;
                                                            destinationX = var3;
                                                            destinationY = var4;
                                                        }
                                                        if (var40 != Coordinates.field2775) {
                                                            if (var40 != null) {
                                                                WorldMapType1.method274(var40);
                                                            }
                                                            if (Coordinates.field2775 != null) {
                                                                WorldMapType1.method274(Coordinates.field2775);
                                                            }
                                                        }
                                                        if (var33 != class23.field331 && field1007 == field1006) {
                                                            if (var33 != null) {
                                                                WorldMapType1.method274(var33);
                                                            }
                                                            if (class23.field331 != null) {
                                                                WorldMapType1.method274(class23.field331);
                                                            }
                                                        }
                                                        if (class23.field331 != null) {
                                                            if (field1006 < field1007) {
                                                                ++field1006;
                                                                if (field1006 == field1007) {
                                                                    WorldMapType1.method274(class23.field331);
                                                                }
                                                            }
                                                        } else if (field1006 > 0) {
                                                            --field1006;
                                                        }
                                                        class203.method3842();
                                                        if (field1099) {
                                                            var3 = MapLabel.field451 * 128 + 64;
                                                            var4 = WorldComparator.field261 * 128 + 64;
                                                            var5 = class5.getTileHeight(var3, var4, class237.plane) - CombatInfo2.field3523;
                                                            if (Sequence.cameraX < var3) {
                                                                Sequence.cameraX = (var3 - Sequence.cameraX) * class49.field578 / 1000 + Sequence.cameraX + class110.field1590;
                                                                if (Sequence.cameraX > var3) {
                                                                    Sequence.cameraX = var3;
                                                                }
                                                            }
                                                            if (Sequence.cameraX > var3) {
                                                                Sequence.cameraX -= class49.field578 * (Sequence.cameraX - var3) / 1000 + class110.field1590;
                                                                if (Sequence.cameraX < var3) {
                                                                    Sequence.cameraX = var3;
                                                                }
                                                            }
                                                            if (Area.cameraZ < var5) {
                                                                Area.cameraZ = (var5 - Area.cameraZ) * class49.field578 / 1000 + Area.cameraZ + class110.field1590;
                                                                if (Area.cameraZ > var5) {
                                                                    Area.cameraZ = var5;
                                                                }
                                                            }
                                                            if (Area.cameraZ > var5) {
                                                                Area.cameraZ -= class49.field578 * (Area.cameraZ - var5) / 1000 + class110.field1590;
                                                                if (Area.cameraZ < var5) {
                                                                    Area.cameraZ = var5;
                                                                }
                                                            }
                                                            if (ChatLineBuffer.cameraY < var4) {
                                                                ChatLineBuffer.cameraY = (var4 - ChatLineBuffer.cameraY) * class49.field578 / 1000 + ChatLineBuffer.cameraY + class110.field1590;
                                                                if (ChatLineBuffer.cameraY > var4) {
                                                                    ChatLineBuffer.cameraY = var4;
                                                                }
                                                            }
                                                            if (ChatLineBuffer.cameraY > var4) {
                                                                ChatLineBuffer.cameraY -= class49.field578 * (ChatLineBuffer.cameraY - var4) / 1000 + class110.field1590;
                                                                if (ChatLineBuffer.cameraY < var4) {
                                                                    ChatLineBuffer.cameraY = var4;
                                                                }
                                                            }
                                                            var3 = VarPlayerType.field3441 * 128 + 64;
                                                            var4 = class149.field2123 * 128 + 64;
                                                            var5 = class5.getTileHeight(var3, var4, class237.plane) - class86.field1317;
                                                            var6 = var3 - Sequence.cameraX;
                                                            var7 = var5 - Area.cameraZ;
                                                            var8 = var4 - ChatLineBuffer.cameraY;
                                                            var9 = (int) Math.sqrt((double) (var6 * var6 + var8 * var8));
                                                            var10 = (int) (Math.atan2((double) var7, (double) var9) * 325.949D) & 2047;
                                                            int var27 = (int) (Math.atan2((double) var6, (double) var8) * -325.949D) & 2047;
                                                            if (var10 < 128) {
                                                                var10 = 128;
                                                            }
                                                            if (var10 > 383) {
                                                                var10 = 383;
                                                            }
                                                            if (BoundingBox3D.cameraPitch < var10) {
                                                                BoundingBox3D.cameraPitch = (var10 - BoundingBox3D.cameraPitch) * class37.field485 / 1000 + BoundingBox3D.cameraPitch + UnitPriceComparator.field294;
                                                                if (BoundingBox3D.cameraPitch > var10) {
                                                                    BoundingBox3D.cameraPitch = var10;
                                                                }
                                                            }
                                                            if (BoundingBox3D.cameraPitch > var10) {
                                                                BoundingBox3D.cameraPitch -= class37.field485 * (BoundingBox3D.cameraPitch - var10) / 1000 + UnitPriceComparator.field294;
                                                                if (BoundingBox3D.cameraPitch < var10) {
                                                                    BoundingBox3D.cameraPitch = var10;
                                                                }
                                                            }
                                                            int var12 = var27 - ClientPacket.cameraYaw;
                                                            if (var12 > 1024) {
                                                                var12 -= 2048;
                                                            }
                                                            if (var12 < -1024) {
                                                                var12 += 2048;
                                                            }
                                                            if (var12 > 0) {
                                                                ClientPacket.cameraYaw = var12 * class37.field485 / 1000 + ClientPacket.cameraYaw + UnitPriceComparator.field294;
                                                                ClientPacket.cameraYaw &= 2047;
                                                            }
                                                            if (var12 < 0) {
                                                                ClientPacket.cameraYaw -= -var12 * class37.field485 / 1000 + UnitPriceComparator.field294;
                                                                ClientPacket.cameraYaw &= 2047;
                                                            }
                                                            int var13 = var27 - ClientPacket.cameraYaw;
                                                            if (var13 > 1024) {
                                                                var13 -= 2048;
                                                            }
                                                            if (var13 < -1024) {
                                                                var13 += 2048;
                                                            }
                                                            if (var13 < 0 && var12 > 0 || var13 > 0 && var12 < 0) {
                                                                ClientPacket.cameraYaw = var27;
                                                            }
                                                        }
                                                        for (var3 = 0; var3 < 5; ++var3) {
                                                            ++field1104[var3];
                                                        }
                                                        class158.varcs.process();
                                                        var3 = ++MouseInput.mouseIdleTicks - 1;
                                                        var5 = KeyFocusListener.keyboardIdleTicks;
                                                        if (var3 > 15000 && var5 > 15000) {
                                                            field903 = 250;
                                                            MouseInput.mouseIdleTicks = 14500;
                                                            var26 = FaceNormal.method3078(ClientPacket.field2441, field902.field1475);
                                                            field902.method2036(var26);
                                                        }
                                                        RunException.friendManager.method1660();
                                                        ++field902.field1481;
                                                        if (field902.field1481 > 50) {
                                                            var26 = FaceNormal.method3078(ClientPacket.field2412, field902.field1475);
                                                            field902.method2036(var26);
                                                        }
                                                        try {
                                                            field902.method2035();
                                                        } catch (IOException var28) {
                                                            class150.method3132();
                                                        }
                                                        return;
                                                    }
                                                    var49 = var44.widget;
                                                    if (var49.index < 0) {
                                                        break;
                                                    }
                                                    var43 = class3.getWidget(var49.parentId);
                                                } while (var43 == null || var43.children == null || var49.index >= var43.children.length || var49 != var43.children[var49.index]);
                                                AbstractByteBuffer.method3757(var44);
                                            }
                                        }
                                        var49 = var44.widget;
                                        if (var49.index < 0) {
                                            break;
                                        }
                                        var43 = class3.getWidget(var49.parentId);
                                    } while (var43 == null || var43.children == null || var49.index >= var43.children.length || var49 != var43.children[var49.index]);
                                    AbstractByteBuffer.method3757(var44);
                                }
                            }
                            var49 = var44.widget;
                            if (var49.index < 0) {
                                break;
                            }
                            var43 = class3.getWidget(var49.parentId);
                        } while (var43 == null || var43.children == null || var49.index >= var43.children.length || var49 != var43.children[var49.index]);
                        AbstractByteBuffer.method3757(var44);
                    }
                }
                var31 = FaceNormal.method3078(ClientPacket.field2465, field902.field1475);
                var31.packetBuffer.putByte(0);
                var3 = var31.packetBuffer.offset;
                Fonts.encodeClassVerifier(var31.packetBuffer);
                var31.packetBuffer.method3516(var31.packetBuffer.offset - var3);
                field902.method2036(var31);
            }
        }
    }
}
Also used : IOException(java.io.IOException) Iterator(java.util.Iterator) JSObject(netscape.javascript.JSObject) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 34 with ObfuscatedName

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

the class Client method method1208.

@ObfuscatedName("gi")
@ObfuscatedSignature(signature = "(I)V", garbageValue = "-2144478746")
final void method1208() {
    if (widgetRoot != -1) {
        ClientPacket.method3422(widgetRoot);
    }
    int var1;
    for (var1 = 0; var1 < widgetCount; ++var1) {
        if (field1060[var1]) {
            field1061[var1] = true;
        }
        field1062[var1] = field1060[var1];
        field1060[var1] = false;
    }
    field1059 = gameCycle;
    field1004 = -1;
    field1088 = -1;
    TextureProvider.field1701 = null;
    if (widgetRoot != -1) {
        widgetCount = 0;
        UnitPriceComparator.method138(widgetRoot, 0, 0, Sequence.canvasWidth, class45.canvasHeight, 0, 0, -1);
    }
    Rasterizer2D.noClip();
    int var2;
    int var3;
    int var4;
    int var6;
    int var7;
    int var8;
    if (!isMenuOpen) {
        if (field1004 != -1) {
            var1 = field1004;
            var2 = field1088;
            if ((menuOptionCount >= 2 || itemSelectionState != 0 || spellSelected) && field912) {
                var3 = class36.method520();
                String var12;
                if (itemSelectionState == 1 && menuOptionCount < 2) {
                    var12 = "Use" + " " + lastSelectedItemName + " " + "->";
                } else if (spellSelected && menuOptionCount < 2) {
                    var12 = field956 + " " + field1015 + " " + "->";
                } else {
                    var12 = PacketNode.method3438(var3);
                }
                if (menuOptionCount > 2) {
                    var12 = var12 + class173.getColTags(16777215) + " " + '/' + " " + (menuOptionCount - 2) + " more options";
                }
                class228.fontBold12.drawRandomizedMouseoverText(var12, var1 + 4, var2 + 15, 16777215, 0, gameCycle / 1000);
            }
        }
    } else {
        var1 = menuX;
        var2 = Frames.menuY;
        var3 = GrandExchangeEvents.field266;
        var4 = ItemContainer.field754;
        int var13 = 6116423;
        Rasterizer2D.Rasterizer2D_fillRectangle(var1, var2, var3, var4, var13);
        Rasterizer2D.Rasterizer2D_fillRectangle(var1 + 1, var2 + 1, var3 - 2, 16, 0);
        Rasterizer2D.drawRectangle(var1 + 1, var2 + 18, var3 - 2, var4 - 19, 0);
        class228.fontBold12.method5521("Choose Option", var1 + 3, var2 + 14, var13, -1);
        var6 = MouseInput.mouseLastX;
        var7 = MouseInput.mouseLastY;
        for (var8 = 0; var8 < menuOptionCount; ++var8) {
            int var9 = var2 + (menuOptionCount - 1 - var8) * 15 + 31;
            int var10 = 16777215;
            if (var6 > var1 && var6 < var1 + var3 && var7 > var9 - 13 && var7 < var9 + 3) {
                var10 = 16776960;
            }
            class228.fontBold12.method5521(PacketNode.method3438(var8), var1 + 3, var9, var10, 0);
        }
        FileSystem.method4541(menuX, Frames.menuY, GrandExchangeEvents.field266, ItemContainer.field754);
    }
    if (gameDrawingMode == 3) {
        for (var1 = 0; var1 < widgetCount; ++var1) {
            if (field1062[var1]) {
                Rasterizer2D.fillRectangle(widgetPositionX[var1], widgetPositionY[var1], widgetBoundsWidth[var1], widgetBoundsHeight[var1], 16711935, 128);
            } else if (field1061[var1]) {
                Rasterizer2D.fillRectangle(widgetPositionX[var1], widgetPositionY[var1], widgetBoundsWidth[var1], widgetBoundsHeight[var1], 16711680, 128);
            }
        }
    }
    var1 = class237.plane;
    var2 = WorldComparator.localPlayer.x;
    var3 = WorldComparator.localPlayer.y;
    var4 = field893;
    for (class80 var5 = (class80) class80.field1261.getFront(); var5 != null; var5 = (class80) class80.field1261.getNext()) {
        if (var5.field1259 != -1 || var5.field1263 != null) {
            var6 = 0;
            if (var2 > var5.field1256) {
                var6 += var2 - var5.field1256;
            } else if (var2 < var5.field1264) {
                var6 += var5.field1264 - var2;
            }
            if (var3 > var5.field1257) {
                var6 += var3 - var5.field1257;
            } else if (var3 < var5.field1255) {
                var6 += var5.field1255 - var3;
            }
            if (var6 - 64 <= var5.field1258 && field1034 != 0 && var1 == var5.field1265) {
                var6 -= 64;
                if (var6 < 0) {
                    var6 = 0;
                }
                var7 = (var5.field1258 - var6) * field1034 / var5.field1258;
                Object var10000;
                if (var5.field1260 == null) {
                    if (var5.field1259 >= 0) {
                        var10000 = null;
                        SoundEffect var14 = SoundEffect.getTrack(class44.indexCache4, var5.field1259, 0);
                        if (var14 != null) {
                            RawAudioNode var15 = var14.method2115().applyResampler(Buffer.field2571);
                            class115 var16 = class115.method2300(var15, 100, var7);
                            var16.method2303(-1);
                            GameCanvas.field632.method2085(var16);
                            var5.field1260 = var16;
                        }
                    }
                } else {
                    var5.field1260.method2304(var7);
                }
                if (var5.field1254 == null) {
                    if (var5.field1263 != null && (var5.field1253 -= var4) <= 0) {
                        var8 = (int) (Math.random() * (double) var5.field1263.length);
                        var10000 = null;
                        SoundEffect var17 = SoundEffect.getTrack(class44.indexCache4, var5.field1263[var8], 0);
                        if (var17 != null) {
                            RawAudioNode var18 = var17.method2115().applyResampler(Buffer.field2571);
                            class115 var11 = class115.method2300(var18, 100, var7);
                            var11.method2303(0);
                            GameCanvas.field632.method2085(var11);
                            var5.field1254 = var11;
                            var5.field1253 = var5.field1266 + (int) (Math.random() * (double) (var5.field1262 - var5.field1266));
                        }
                    }
                } else {
                    var5.field1254.method2304(var7);
                    if (!var5.field1254.linked()) {
                        var5.field1254 = null;
                    }
                }
            } else {
                if (var5.field1260 != null) {
                    GameCanvas.field632.method2062(var5.field1260);
                    var5.field1260 = null;
                }
                if (var5.field1254 != null) {
                    GameCanvas.field632.method2062(var5.field1254);
                    var5.field1254 = null;
                }
            }
        }
    }
    field893 = 0;
}
Also used : JSObject(netscape.javascript.JSObject) ObfuscatedSignature(net.runelite.mapping.ObfuscatedSignature) ObfuscatedName(net.runelite.mapping.ObfuscatedName)

Example 35 with ObfuscatedName

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

the class GZipDecompressor method decompress.

@ObfuscatedName("c")
@ObfuscatedSignature(signature = "(Lgp;[BI)V", garbageValue = "271625445")
@Export("decompress")
public void decompress(Buffer var1, byte[] var2) {
    if (var1.payload[var1.offset] == 31 && var1.payload[var1.offset + 1] == -117) {
        if (this.inflator == null) {
            this.inflator = new Inflater(true);
        }
        try {
            this.inflator.setInput(var1.payload, var1.offset + 10, var1.payload.length - (var1.offset + 8 + 10));
            this.inflator.inflate(var2);
        } catch (Exception var4) {
            this.inflator.reset();
            throw new RuntimeException("");
        }
        this.inflator.reset();
    } else {
        throw new RuntimeException("");
    }
}
Also used : Inflater(java.util.zip.Inflater) Export(net.runelite.mapping.Export) 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