diff --git a/buildSrc/src/main/kotlin/Dependencies.kt b/buildSrc/src/main/kotlin/Dependencies.kt index cc6fc35fc8..c6f46b6c4e 100644 --- a/buildSrc/src/main/kotlin/Dependencies.kt +++ b/buildSrc/src/main/kotlin/Dependencies.kt @@ -25,9 +25,9 @@ object ProjectVersions { const val launcherVersion = "2.2.0" - const val rlVersion = "1.6.23" + const val rlVersion = "1.6.24" - const val openosrsVersion = "3.4.1" + const val openosrsVersion = "3.4.2" const val rsversion = 190 const val cacheversion = 165 diff --git a/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java b/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java index 993959ee88..18f41fc0f0 100644 --- a/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java +++ b/http-api/src/main/java/net/runelite/http/api/loottracker/LootRecord.java @@ -41,6 +41,7 @@ public class LootRecord @Getter private String username; private LootRecordType type; + private Object metadata; private Collection drops; private Instant time; diff --git a/runelite-api/src/main/java/net/runelite/api/ItemID.java b/runelite-api/src/main/java/net/runelite/api/ItemID.java index 70ad10dbeb..e558348953 100644 --- a/runelite-api/src/main/java/net/runelite/api/ItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/ItemID.java @@ -8159,7 +8159,7 @@ public final class ItemID public static final int HUMAN_EYE = 12843; public static final int VOICE_POTION = 12844; public static final int GRIM_REAPER_HOOD = 12845; - public static final int BOUNTY_TELEPORT_SCROLL = 12846; + public static final int TARGET_TELEPORT_SCROLL = 12846; public static final int GRANITE_MAUL_12848 = 12848; public static final int GRANITE_CLAMP = 12849; public static final int AMULET_OF_THE_DAMNED_FULL = 12851; @@ -11321,7 +11321,7 @@ public final class ItemID public static final int BIRTHDAY_CAKE_24331 = 24331; public static final int BIRTHDAY_CAKE_24332 = 24332; public static final int DAGONHAI_ROBES_SET = 24333; - public static final int BOUNTY_TARGET_TELEPORT = 24336; + public static final int TARGET_TELEPORT = 24336; public static final int BOUNTY_HUNTER_HAT_TIER_1 = 24338; public static final int BOUNTY_HUNTER_HAT_TIER_2 = 24340; public static final int BOUNTY_HUNTER_HAT_TIER_3 = 24342; @@ -11589,5 +11589,9 @@ public final class ItemID public static final int SKELETON_MONKEY = 24865; public static final int KRUK_JR = 24866; public static final int PRINCELY_MONKEY = 24867; + public static final int GOLDEN_ARMADYL_SPECIAL_ATTACK = 24868; + public static final int GOLDEN_BANDOS_SPECIAL_ATTACK = 24869; + public static final int GOLDEN_SARADOMIN_SPECIAL_ATTACK = 24870; + public static final int GOLDEN_ZAMORAK_SPECIAL_ATTACK = 24871; /* This file is automatically generated. Do not edit. */ } diff --git a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java index 62d5fa9147..33b1125075 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java @@ -18031,22 +18031,8 @@ public final class NullObjectID public static final int NULL_37430 = 37430; public static final int NULL_37432 = 37432; public static final int NULL_37433 = 37433; - public static final int NULL_37436 = 37436; - public static final int NULL_37437 = 37437; - public static final int NULL_37438 = 37438; public static final int NULL_37439 = 37439; public static final int NULL_37440 = 37440; - public static final int NULL_37446 = 37446; - public static final int NULL_37447 = 37447; - public static final int NULL_37448 = 37448; - public static final int NULL_37449 = 37449; - public static final int NULL_37451 = 37451; - public static final int NULL_37452 = 37452; - public static final int NULL_37453 = 37453; - public static final int NULL_37454 = 37454; - public static final int NULL_37455 = 37455; - public static final int NULL_37456 = 37456; - public static final int NULL_37457 = 37457; public static final int NULL_37467 = 37467; public static final int NULL_37468 = 37468; public static final int NULL_37469 = 37469; diff --git a/runelite-api/src/main/java/net/runelite/api/ObjectID.java b/runelite-api/src/main/java/net/runelite/api/ObjectID.java index 8900b0cc44..5f7d2f6fa3 100644 --- a/runelite-api/src/main/java/net/runelite/api/ObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/ObjectID.java @@ -19396,7 +19396,6 @@ public final class ObjectID public static final int DECORATIVE_WINDOW_37442 = 37442; public static final int STAINEDGLASS_WINDOW_37443 = 37443; public static final int LOG_PILE_37444 = 37444; - public static final int HOTSPOT_MARKER = 37445; public static final int DECORATIVE_WINDOW_37450 = 37450; public static final int STAINEDGLASS_WINDOW_37458 = 37458; public static final int DECORATIVE_WINDOW_37459 = 37459; diff --git a/runelite-api/src/main/java/net/runelite/api/ScriptID.java b/runelite-api/src/main/java/net/runelite/api/ScriptID.java index 882b52b084..9e684a6fe5 100644 --- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java +++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java @@ -341,4 +341,10 @@ public final class ScriptID */ @ScriptArguments(integer = 17) public static final int BANKMAIN_BUILD = 277; + + @ScriptArguments(integer = 19) + public static final int BANKMAIN_FINISHBUILDING = 505; + + @ScriptArguments() + public static final int BANKMAIN_SEARCHING = 514; } diff --git a/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java b/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java index 05081da7a2..4ad46dc060 100644 --- a/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java +++ b/runelite-api/src/main/java/net/runelite/api/vars/SlayerUnlock.java @@ -79,7 +79,13 @@ public enum SlayerUnlock RUNE_DRAGON_EXTEND(41), VORKATH_SLAYER_HELM(42), FOSSIL_ISLAND_WYVERN_DISABLE(43, Varbits.FOSSIL_ISLAND_WYVERN_DISABLE), - GROTESQUE_GUARDIAN_DOUBLE_COUNT(44); + GROTESQUE_GUARDIAN_DOUBLE_COUNT(44), + HYDRA_SLAYER_HELM(45), + BASILISK_EXTEND(46), + BASILISK_UNLOCK(47), + OLM_SLAYER_HELM(48), + VAMPYRE_EXTEND(49), + VAMPYRE_UNLOCK(50); private Varbits toggleVarbit; diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java index 1fb9dcaf66..813a86a15b 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java @@ -1154,10 +1154,10 @@ public class WidgetID static final int SKULL = 56; // OUTDATED? static final int ATTACK_RANGE = 59; // OUTDATED? static final int BOUNTY_HUNTER_INFO = 6; - static final int KILLDEATH_RATIO = 34; - static final int SKULL_CONTAINER = 54; - static final int SAFE_ZONE = 56; - static final int WILDERNESS_LEVEL = 59; // this can also be the Deadman Mode "Protection" text + static final int KILLDEATH_RATIO = 28; + static final int SKULL_CONTAINER = 48; + static final int SAFE_ZONE = 50; + static final int WILDERNESS_LEVEL = 53; // this can also be the Deadman Mode "Protection" text } static class KourendFavour diff --git a/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java b/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java index 84e0371ba3..3696b65e08 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java +++ b/runelite-client/src/main/java/net/runelite/client/game/AgilityShortcut.java @@ -159,6 +159,7 @@ public enum AgilityShortcut MOS_LEHARMLESS_STEPPING_STONE(60, "Stepping Stone", new WorldPoint(3710, 2970, 0), STEPPING_STONE_19042), WINTERTODT_GAP(60, "Gap", new WorldPoint(1629, 4023, 0), GAP_29326), UNGAEL_ICE(60, "Ice Chunks", null, NULL_25337, NULL_29868, NULL_29869, NULL_29870, ICE_CHUNKS_31822, NULL_31823, ICE_CHUNKS_31990), + GWD_LITTLE_CRACK(60, "Little Crack", new WorldPoint(2900, 3712, 0), LITTLE_CRACK), SLAYER_TOWER_MEDIUM_CHAIN_FIRST(61, "Spiked Chain (Floor 1)", new WorldPoint(3421, 3550, 0), SPIKEY_CHAIN), SLAYER_TOWER_MEDIUM_CHAIN_SECOND(61, "Spiked Chain (Floor 2)", new WorldPoint(3420, 3551, 0), SPIKEY_CHAIN_16538), SLAYER_DUNGEON_CREVICE(62, "Narrow Crevice", new WorldPoint(2729, 10008, 0), CREVICE_16539), @@ -184,9 +185,9 @@ public enum AgilityShortcut FOSSIL_ISLAND_HARDWOOD_NORTH(70, "Hole", new WorldPoint(3712, 3828, 0), HOLE_31481, HOLE_31482), FOSSIL_ISLAND_HARDWOOD_SOUTH(70, "Hole", new WorldPoint(3714, 3816, 0), HOLE_31481, HOLE_31482), AL_KHARID_WINDOW(70, "Window", new WorldPoint(3293, 3158, 0), BROKEN_WALL_33344, BIG_WINDOW), - GWD_SARADOMIN_ROPE_NORTH(70, "Rope Descent", new WorldPoint(2912, 5300, 0), NULL_26371), - GWD_SARADOMIN_ROPE_SOUTH(70, "Rope Descent", new WorldPoint(2951, 5267, 0), NULL_26375), - SLAYER_TOWER_ADVANCED_CHAIN_FIRST(71, "Spiked Chain (Floor 2)", new WorldPoint(3447, 3578, 0), SPIKEY_CHAIN), + GWD_SARADOMIN_ROPE_NORTH(70, "Rope Descent", new WorldPoint(2912, 5300, 0), NULL_26371, NULL_26561), + GWD_SARADOMIN_ROPE_SOUTH(70, "Rope Descent", new WorldPoint(2951, 5267, 0), NULL_26375, NULL_26562), + SLAYER_TOWER_ADVANCED_CHAIN_FIRST(71, "Spiked Chain (Floor 2)", new WorldPoint(3447, 3578, 0), SPIKEY_CHAIN ), SLAYER_TOWER_ADVANCED_CHAIN_SECOND(71, "Spiked Chain (Floor 3)", new WorldPoint(3446, 3576, 0), SPIKEY_CHAIN_16538), STRONGHOLD_SLAYER_CAVE_TUNNEL(72, "Tunnel", new WorldPoint(2431, 9806, 0), TUNNEL_30174, TUNNEL_30175), TROLL_STRONGHOLD_WALL_CLIMB(73, "Rocks", new WorldPoint(2841, 3694, 0), ROCKS_16464), diff --git a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java index 4c111184ab..8105c1ce3c 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java +++ b/runelite-client/src/main/java/net/runelite/client/game/ItemMapping.java @@ -188,6 +188,8 @@ public enum ItemMapping ITEM_CRAWS_BOW(CRAWS_BOW_U, CRAWS_BOW), ITEM_VIGGORAS_CHAINMACE(VIGGORAS_CHAINMACE_U, VIGGORAS_CHAINMACE), ITEM_THAMMARONS_SCEPTRE(THAMMARONS_SCEPTRE_U, THAMMARONS_SCEPTRE), + ITEM_BRYOPHYTAS_STAFF(BRYOPHYTAS_STAFF_UNCHARGED, BRYOPHYTAS_STAFF), + ITEM_RING_OF_ENDURANCE(RING_OF_ENDURANCE_UNCHARGED, RING_OF_ENDURANCE), // Infinity colour kits ITEM_INFINITY_TOP(INFINITY_TOP, INFINITY_TOP_10605, INFINITY_TOP_20574, DARK_INFINITY_TOP, LIGHT_INFINITY_TOP), diff --git a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java index 0ef7e373ba..a38f30308f 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/ClientUI.java @@ -36,6 +36,7 @@ import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.GraphicsConfiguration; import java.awt.GraphicsDevice; +import static java.awt.GraphicsDevice.WindowTranslucency.TRANSLUCENT; import java.awt.GraphicsEnvironment; import java.awt.LayoutManager; import java.awt.Rectangle; @@ -54,6 +55,7 @@ import java.util.concurrent.ExecutorService; import java.util.concurrent.TimeUnit; import javax.annotation.Nullable; import javax.inject.Inject; +import javax.inject.Named; import javax.inject.Provider; import javax.inject.Singleton; import javax.swing.BoxLayout; @@ -62,6 +64,7 @@ import javax.swing.JButton; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JOptionPane; +import static javax.swing.JOptionPane.INFORMATION_MESSAGE; import javax.swing.JPanel; import javax.swing.JRootPane; import javax.swing.SwingUtilities; @@ -99,8 +102,6 @@ import net.runelite.client.util.WinUtil; import org.pushingpixels.substance.internal.SubstanceSynapse; import org.pushingpixels.substance.internal.utils.SubstanceCoreUtilities; import org.pushingpixels.substance.internal.utils.SubstanceTitlePaneUtilities; -import static java.awt.GraphicsDevice.WindowTranslucency.TRANSLUCENT; -import static javax.swing.JOptionPane.INFORMATION_MESSAGE; /** * Client UI. @@ -139,7 +140,9 @@ public class ClientUI private final ConfigManager configManager; private final ExecutorService executorService; private final Provider clientThreadProvider; - private final EventBus eventBus; + private final EventBus eventbus; + private final boolean safeMode; + private final CardLayout cardLayout = new CardLayout(); private final Rectangle sidebarButtonPosition = new Rectangle(); private boolean withTitleBar; @@ -167,7 +170,8 @@ public class ClientUI ConfigManager configManager, ExecutorService executorService, Provider clientThreadProvider, - EventBus eventbus) + EventBus eventbus, + @Named("safeMode") boolean safeMode) { this.config = config; this.keyManager = keyManager; @@ -176,7 +180,8 @@ public class ClientUI this.configManager = configManager; this.executorService = executorService; this.clientThreadProvider = clientThreadProvider; - this.eventBus = eventbus; + this.eventbus = eventbus; + this.safeMode = safeMode; eventbus.subscribe(ConfigChanged.class, this, this::onConfigChanged); eventbus.subscribe(NavigationButtonAdded.class, this, this::onNavigationButtonAdded); @@ -532,7 +537,7 @@ public class ClientUI trayIcon = SwingUtil.createTrayIcon(ICON, RuneLiteProperties.getTitle(), frame); // Move frame around (needs to be done after frame is packed) - if (config.rememberScreenBounds()) + if (config.rememberScreenBounds() && !safeMode) { try { @@ -543,8 +548,8 @@ public class ClientUI frame.setBounds(clientBounds); // frame.getGraphicsConfiguration().getBounds() returns the bounds for the primary display. - // We have to find the correct graphics configuration by using the intersection of the client boundaries. - GraphicsConfiguration gc = getIntersectingDisplay(clientBounds); + // We have to find the correct graphics configuration by using the client boundaries. + GraphicsConfiguration gc = findDisplayFromBounds(clientBounds); if (gc != null) { double scale = gc.getDefaultTransform().getScaleX(); @@ -608,7 +613,7 @@ public class ClientUI } } - private GraphicsConfiguration getIntersectingDisplay(final Rectangle bounds) + private GraphicsConfiguration findDisplayFromBounds(final Rectangle bounds) { GraphicsDevice[] gds = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices(); @@ -617,7 +622,7 @@ public class ClientUI GraphicsConfiguration gc = gd.getDefaultConfiguration(); final Rectangle displayBounds = gc.getBounds(); - if (displayBounds.intersects(bounds)) + if (displayBounds.contains(bounds)) { return gc; } @@ -645,7 +650,7 @@ public class ClientUI { saveClientBoundsConfig(); ClientShutdown csev = new ClientShutdown(); - eventBus.post(ClientShutdown.class, csev); + eventbus.post(ClientShutdown.class, csev); executorService.shutdown(); new Thread(() -> diff --git a/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java b/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java index f7d9aa21d7..2b1efb53f0 100644 --- a/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java +++ b/runelite-client/src/main/java/net/runelite/client/ui/overlay/OverlayRenderer.java @@ -481,53 +481,83 @@ public class OverlayRenderer extends MouseAdapter implements KeyListener if (inOverlayResizingMode) { - final Rectangle r = currentManagedBounds; + final int left = p.x - currentManagedBounds.x; // Distance (in pixels) from the left edge of the bounds + final int top = p.y - currentManagedBounds.y; // Distance (in pixels) from the top edge of the bounds + final int originalX = currentManagedBounds.x; + final int originalY = currentManagedBounds.y; + int x = originalX; + int y = originalY; + int width = currentManagedBounds.width; + int height = currentManagedBounds.height; - final int dx = p.x - r.x; - final int dy = p.y - r.y; switch (clientUI.getCurrentCursor().getType()) { case Cursor.N_RESIZE_CURSOR: - int height = r.height - dy; - r.setRect(r.x, r.y + dy, r.width, height); + y += top; + height -= top; break; case Cursor.NW_RESIZE_CURSOR: - int width = r.width - dx; - height = r.height - dy; - r.setRect(r.x + dx, r.y + dy, width, height); + x += left; + y += top; + width -= left; + height -= top; break; case Cursor.W_RESIZE_CURSOR: - width = r.width - dx; - r.setRect(r.x + dx, r.y, width, r.height); + x += left; + width -= left; break; case Cursor.SW_RESIZE_CURSOR: - width = r.width - dx; - height = dy; - r.setRect(r.x + dx, r.y, width, height); + x += left; + width -= left; + height = top; break; case Cursor.S_RESIZE_CURSOR: - height = dy; - r.setRect(r.x, r.y, r.width, height); + height = top; break; case Cursor.SE_RESIZE_CURSOR: - width = dx; - height = dy; - r.setRect(r.x, r.y, width, height); + width = left; + height = top; break; case Cursor.E_RESIZE_CURSOR: - width = dx; - r.setRect(r.x, r.y, width, r.height); + width = left; break; case Cursor.NE_RESIZE_CURSOR: - width = dx; - height = r.height - dy; - r.setRect(r.x, r.y + dy, width, height); + y += top; + width = left; + height -= top; break; default: // center } - currentManagedOverlay.setPreferredSize(new Dimension(Math.max(MIN_OVERLAY_SIZE, currentManagedBounds.width), Math.max(MIN_OVERLAY_SIZE, currentManagedBounds.height))); + final int widthOverflow = Math.max(0, MIN_OVERLAY_SIZE - width); + final int heightOverflow = Math.max(0, MIN_OVERLAY_SIZE - height); + final int dx = x - originalX; + final int dy = y - originalY; + + // If this resize operation would cause the dimensions to go below the minimum width/height, reset the + // dimensions and adjust the x/y position accordingly as needed + if (widthOverflow > 0) + { + width = MIN_OVERLAY_SIZE; + + if (dx > 0) + { + x -= widthOverflow; + } + } + if (heightOverflow > 0) + { + height = MIN_OVERLAY_SIZE; + + if (dy > 0) + { + y -= heightOverflow; + } + } + + currentManagedBounds.setRect(x, y, width, height); + currentManagedOverlay.setPreferredSize(new Dimension(currentManagedBounds.width, currentManagedBounds.height)); if (currentManagedOverlay.getPreferredLocation() != null) { diff --git a/runelite-client/src/main/scripts/BankSearchFilter.rs2asm b/runelite-client/src/main/scripts/BankSearchFilter.rs2asm index 5f9db325af..0555737bdb 100644 --- a/runelite-client/src/main/scripts/BankSearchFilter.rs2asm +++ b/runelite-client/src/main/scripts/BankSearchFilter.rs2asm @@ -19,6 +19,15 @@ LABEL8: string_length iconst 0 if_icmpgt LABEL15 + ; this is a bank search with no input string. the bank tag plugin uses it to perform its tab searches. + iconst 1 ; return value - default to true to match anything + iload 0 ; load item id + sconst "" ; we are not searching, so there is no search string + sconst "bankSearchFilter" ; push event name + runelite_callback ; invoke callback + pop_int ; pop item id + pop_string ; pop search string + return ; return rv jump LABEL34 LABEL15: iload 0 @@ -32,13 +41,11 @@ LABEL19: sstore 0 iconst -1 ; load return value iload 0 ; load item id - sload 0 ; load item name sload 1 ; load search string sconst "bankSearchFilter" ; push event name runelite_callback ; invoke callback pop_int ; pop item id pop_string ; pop search string - pop_string ; pop item name istore 1 ; store return value for the below comparisons iload 1 iconst 0 diff --git a/runelite-client/src/main/scripts/BankSearchLayout.rs2asm b/runelite-client/src/main/scripts/BankSearchLayout.rs2asm index b21acb7f77..8a926db3d3 100644 --- a/runelite-client/src/main/scripts/BankSearchLayout.rs2asm +++ b/runelite-client/src/main/scripts/BankSearchLayout.rs2asm @@ -10,9 +10,6 @@ ; callback "setBankScroll" ; Fired before bank is calculated ; Used by the TabInterface to show fake bank items for tag tabs -; -; callback "isTabMenuActive" -; Used by the TabInterface to skip setting the bank title sconst "beforeBankLayout" runelite_callback get_varbit 5102 @@ -968,12 +965,6 @@ LABEL848: add istore 20 jump LABEL769 -SetTitle: - iconst 0 ; Compare variable - iconst 0 ; - sconst "isTabMenuActive" - runelite_callback ; skip setting the bank title if the tag tab menu is active - if_icmpne FinishBuilding LABEL853: get_varbit 4170 iconst 2