diff --git a/runelite-api/src/main/java/net/runelite/api/IconID.java b/runelite-api/src/main/java/net/runelite/api/IconID.java
index 7512c3b5bf..1f0247b556 100644
--- a/runelite-api/src/main/java/net/runelite/api/IconID.java
+++ b/runelite-api/src/main/java/net/runelite/api/IconID.java
@@ -46,7 +46,8 @@ public enum IconID
SKULL(9),
HARDCORE_IRONMAN(10),
NO_ENTRY(11),
- CHAIN_LINK(12);
+ CHAIN_LINK(12),
+ BOUNTY_HUNTER_EMBLEM(20);
private final int index;
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 032321b37f..513c8171ac 100644
--- a/runelite-api/src/main/java/net/runelite/api/ItemID.java
+++ b/runelite-api/src/main/java/net/runelite/api/ItemID.java
@@ -11457,7 +11457,7 @@ public final class ItemID
public static final int BLIGHTED_BIND_SACK = 24609;
public static final int BLIGHTED_SNARE_SACK = 24611;
public static final int BLIGHTED_ENTANGLE_SACK = 24613;
- public static final int BLIGHTED_TELEBLOCK_SACK = 24615;
+ public static final int BLIGHTED_TELEPORT_SPELL_SACK = 24615;
public static final int VESTAS_BLIGHTED_LONGSWORD = 24617;
public static final int VESTAS_LONGSWORD_INACTIVE = 24619;
public static final int BLIGHTED_VENGEANCE_SACK = 24621;
@@ -11469,5 +11469,8 @@ public final class ItemID
public static final int DIVINE_BASTION_POTION3 = 24638;
public static final int DIVINE_BASTION_POTION2 = 24641;
public static final int DIVINE_BASTION_POTION1 = 24644;
+ public static final int LOGS_24650 = 24650;
+ public static final int RAW_SHRIMPS_24652 = 24652;
+ public static final int BONES_24655 = 24655;
/* This file is automatically generated. Do not edit. */
}
diff --git a/runelite-api/src/main/java/net/runelite/api/NpcID.java b/runelite-api/src/main/java/net/runelite/api/NpcID.java
index 6034a14c22..d2b8833f58 100644
--- a/runelite-api/src/main/java/net/runelite/api/NpcID.java
+++ b/runelite-api/src/main/java/net/runelite/api/NpcID.java
@@ -305,7 +305,7 @@ public final class NpcID
public static final int EMBLEM_TRADER = 308;
public static final int REACHER = 309;
public static final int AYESHA = 310;
- public static final int ADAM = 311;
+ public static final int IRON_MAN_TUTOR = 311;
public static final int FROG = 312;
public static final int REACHER_313 = 313;
public static final int DR_JEKYLL_314 = 314;
@@ -7174,7 +7174,7 @@ public final class NpcID
public static final int REVENANT_DARK_BEAST = 7938;
public static final int REVENANT_KNIGHT = 7939;
public static final int REVENANT_DRAGON = 7940;
- public static final int PAUL = 7941;
+ public static final int IRON_MAN_TUTOR_7941 = 7941;
public static final int EMBLEM_TRADER_7943 = 7943;
public static final int FISHING_SPOT_7946 = 7946;
public static final int FISHING_SPOT_7947 = 7947;
@@ -7481,8 +7481,6 @@ public final class NpcID
public static final int SISTER_SEVI = 8274;
public static final int SISTER_TOEN = 8275;
public static final int SISTER_YRAM = 8276;
- public static final int HAMELN_THE_JESTER = 8277;
- public static final int HANCHEN_THE_HOUND = 8278;
public static final int KROY = 8279;
public static final int DAMIEN_LEUCURTE = 8280;
public static final int LORD_CROMBWICK = 8281;
@@ -8483,6 +8481,22 @@ public final class NpcID
public static final int SISTER_SENGA = 9471;
public static final int SISTER_SENGA_9472 = 9472;
public static final int ENT_TRUNK = 9474;
+ public static final int GIELINOR_GUIDE_9476 = 9476;
+ public static final int SURVIVAL_EXPERT_9477 = 9477;
+ public static final int FISHING_SPOT_9478 = 9478;
+ public static final int MASTER_NAVIGATOR = 9479;
+ public static final int QUEST_GUIDE_9480 = 9480;
+ public static final int MINING_INSTRUCTOR_9481 = 9481;
+ public static final int COMBAT_INSTRUCTOR_9482 = 9482;
+ public static final int GIANT_RAT_9483 = 9483;
+ public static final int BANKER_9484 = 9484;
+ public static final int BROTHER_BRACE_9485 = 9485;
+ public static final int IRON_MAN_TUTOR_9486 = 9486;
+ public static final int MAGIC_INSTRUCTOR_9487 = 9487;
+ public static final int CHICKEN_9488 = 9488;
+ public static final int VELIAF_HURTZ_9489 = 9489;
+ public static final int HAMELN_THE_JESTER = 9490;
+ public static final int HANCHEN_THE_HOUND = 9491;
public static final int TANGLEROOT_9492 = 9492;
public static final int TANGLEROOT_9493 = 9493;
public static final int TANGLEROOT_9494 = 9494;
@@ -8495,5 +8509,8 @@ public final class NpcID
public static final int TANGLEROOT_9501 = 9501;
public static final int IORWERTH_WARRIOR_9502 = 9502;
public static final int IORWERTH_WARRIOR_9503 = 9503;
+ public static final int ACCOUNT_SECURITY_TUTOR = 9504;
+ public static final int HAMELN_THE_JESTER_9505 = 9505;
+ public static final int HANCHEN_THE_HOUND_9506 = 9506;
/* This file is automatically generated. Do not edit. */
}
diff --git a/runelite-api/src/main/java/net/runelite/api/NullItemID.java b/runelite-api/src/main/java/net/runelite/api/NullItemID.java
index da17d51fb3..b57c30a4ad 100644
--- a/runelite-api/src/main/java/net/runelite/api/NullItemID.java
+++ b/runelite-api/src/main/java/net/runelite/api/NullItemID.java
@@ -12969,5 +12969,11 @@ public final class NullItemID
public static final int NULL_24643 = 24643;
public static final int NULL_24645 = 24645;
public static final int NULL_24646 = 24646;
+ public static final int NULL_24647 = 24647;
+ public static final int NULL_24648 = 24648;
+ public static final int NULL_24649 = 24649;
+ public static final int NULL_24651 = 24651;
+ public static final int NULL_24653 = 24653;
+ public static final int NULL_24654 = 24654;
/* 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 54d95aa6c2..a11256b413 100644
--- a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java
+++ b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java
@@ -18333,5 +18333,7 @@ public final class NullObjectID
public static final int NULL_37935 = 37935;
public static final int NULL_37950 = 37950;
public static final int NULL_37958 = 37958;
+ public static final int NULL_37960 = 37960;
+ public static final int NULL_37962 = 37962;
/* This file is automatically generated. Do not edit. */
}
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 1f4d0d3aec..e280976757 100644
--- a/runelite-api/src/main/java/net/runelite/api/ObjectID.java
+++ b/runelite-api/src/main/java/net/runelite/api/ObjectID.java
@@ -16025,6 +16025,13 @@ public final class ObjectID
public static final int FURNACE_30157 = 30157;
public static final int FURNACE_30158 = 30158;
public static final int RETURN_ORB = 30160;
+ public static final int LARGE_DOOR_30162 = 30162;
+ public static final int LARGE_DOOR_30163 = 30163;
+ public static final int DOOR_30164 = 30164;
+ public static final int GATE_30165 = 30165;
+ public static final int GATE_30166 = 30166;
+ public static final int DOOR_30167 = 30167;
+ public static final int BOOKCASE_30168 = 30168;
public static final int CRACK_30169 = 30169;
public static final int ROOT_30170 = 30170;
public static final int PORTAL_30172 = 30172;
@@ -16901,6 +16908,7 @@ public final class ObjectID
public static final int OLD_PASSAGEWAY = 31891;
public static final int OLD_PASSAGEWAY_31892 = 31892;
public static final int VELVET_CHAIR_31898 = 31898;
+ public static final int BOOKCASE_31899 = 31899;
public static final int GOBLIN_CROWD_31900 = 31900;
public static final int GOBLIN_CROWD_31901 = 31901;
public static final int SLAYER_HELMET_DISPLAY_CASE = 31902;
@@ -18505,6 +18513,7 @@ public final class ObjectID
public static final int ATTAS_PLANT_DISPLAY = 34685;
public static final int LEATHER_SHIELDS = 34686;
public static final int BRYOPHYTA_DISPLAY = 34687;
+ public static final int BOOKCASE_34688 = 34688;
public static final int BLOOMING_HESPORI_SPROUT = 34705;
public static final int SHRIVELLED_PLANT = 34706;
public static final int TWISTED_BUSH = 34712;
@@ -19539,7 +19548,11 @@ public final class ObjectID
public static final int NIGHTMARE_DISPLAY = 37629;
public static final int NIGHTMARE_TOPIARY = 37630;
public static final int SUPPLIES_37631 = 37631;
+ public static final int BOOKCASE_37725 = 37725;
public static final int BANNER_37726 = 37726;
+ public static final int BOOKCASE_37727 = 37727;
+ public static final int RANGE_37728 = 37728;
+ public static final int TELESCOPE_37729 = 37729;
public static final int ENERGY_BARRIER_37730 = 37730;
public static final int ENERGY_BARRIER_37731 = 37731;
public static final int SPORE = 37738;
@@ -19582,8 +19595,38 @@ public final class ObjectID
public static final int CRATE_37936 = 37936;
public static final int DOOR_37937 = 37937;
public static final int DOOR_37938 = 37938;
+ public static final int NAVIGATORS_TABLE = 37939;
+ public static final int DOOR_37940 = 37940;
+ public static final int DOOR_37941 = 37941;
+ public static final int LADDER_37942 = 37942;
+ public static final int LADDER_37943 = 37943;
+ public static final int ROCKS_37944 = 37944;
+ public static final int ROCKS_37945 = 37945;
+ public static final int ROCKS_37946 = 37946;
+ public static final int FURNACE_37947 = 37947;
+ public static final int GATE_37948 = 37948;
public static final int SCOREBOARD_37949 = 37949;
public static final int COFFIN_37951 = 37951;
+ public static final int GATE_37952 = 37952;
+ public static final int GATE_37953 = 37953;
+ public static final int GATE_37954 = 37954;
+ public static final int LADDER_37955 = 37955;
+ public static final int LADDER_37956 = 37956;
public static final int HANDY_PORTAL = 37957;
+ public static final int BANK_BOOTH_37959 = 37959;
+ public static final int DOOR_37961 = 37961;
+ public static final int DOOR_37963 = 37963;
+ public static final int DOOR_37964 = 37964;
+ public static final int TREE_37965 = 37965;
+ public static final int TREE_37966 = 37966;
+ public static final int TREE_37967 = 37967;
+ public static final int TREE_37968 = 37968;
+ public static final int OAK_37969 = 37969;
+ public static final int OAK_37970 = 37970;
+ public static final int TREE_37971 = 37971;
+ public static final int TREE_37972 = 37972;
+ public static final int TREE_37973 = 37973;
+ public static final int TREE_37974 = 37974;
+ public static final int TREE_37975 = 37975;
/* This file is automatically generated. Do not edit. */
}
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 fc1e68cdac..674b94baf2 100644
--- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java
+++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java
@@ -309,7 +309,7 @@ public final class ScriptID
*
int (WidgetID) * 16, various widgets making up the bank interface
*
*/
- @ScriptArguments(integer = 16)
+ @ScriptArguments(integer = 17)
public static final int BANKMAIN_SEARCH_REFRESH = 283;
/**
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 9b1a9924ab..ead6a62dd1 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
@@ -178,7 +178,7 @@ public class WidgetID
static final int OVERVIEW_MAP = 10;
static final int SEARCH = 25;
static final int SURFACE_SELECTOR = 33;
- static final int TOOLTIP = 39;
+ static final int TOOLTIP = 41;
static final int OPTION = 46;
}
@@ -313,19 +313,19 @@ public class WidgetID
static final int BANK_CONTAINER = 1;
static final int INVENTORY_ITEM_CONTAINER = 3;
static final int BANK_TITLE_BAR = 3;
- static final int ITEM_COUNT_TOP = 4;
- static final int ITEM_COUNT_BAR = 5;
- static final int ITEM_COUNT_BOTTOM = 6;
- static final int CONTENT_CONTAINER = 8;
- static final int TAB_CONTAINER = 9;
- static final int ITEM_CONTAINER = 11;
- static final int SEARCH_BUTTON_BACKGROUND = 38;
- static final int DEPOSIT_INVENTORY = 40;
- static final int DEPOSIT_EQUIPMENT = 42;
- static final int INCINERATOR = 44;
- static final int INCINERATOR_CONFIRM = 45;
- static final int EQUIPMENT_CONTENT_CONTAINER = 66;
- static final int EQUIPMENT_BUTTON = 107;
+ static final int ITEM_COUNT_TOP = 5;
+ static final int ITEM_COUNT_BAR = 6;
+ static final int ITEM_COUNT_BOTTOM = 7;
+ static final int CONTENT_CONTAINER = 9;
+ static final int TAB_CONTAINER = 10;
+ static final int ITEM_CONTAINER = 12;
+ static final int SEARCH_BUTTON_BACKGROUND = 39;
+ static final int DEPOSIT_INVENTORY = 41;
+ static final int DEPOSIT_EQUIPMENT = 43;
+ static final int INCINERATOR = 45;
+ static final int INCINERATOR_CONFIRM = 46;
+ static final int EQUIPMENT_CONTENT_CONTAINER = 67;
+ static final int EQUIPMENT_BUTTON = 108;
}
static class GrandExchange
@@ -585,11 +585,11 @@ public class WidgetID
static final int TITLE = 44;
static final int FULL_INPUT = 45;
static final int GE_SEARCH_RESULTS = 53;
- static final int MESSAGES = 55;
- static final int TRANSPARENT_BACKGROUND_LINES = 56;
- static final int INPUT = 57;
- static final int MESSAGE_LINES = 58;
- static final int FIRST_MESSAGE = 59;
+ static final int MESSAGES = 56;
+ static final int TRANSPARENT_BACKGROUND_LINES = 57;
+ static final int INPUT = 58;
+ static final int MESSAGE_LINES = 59;
+ static final int FIRST_MESSAGE = 60;
}
static class Prayer
diff --git a/runelite-client/src/main/java/net/runelite/client/Notifier.java b/runelite-client/src/main/java/net/runelite/client/Notifier.java
index b6f99b9d9e..ef33478929 100644
--- a/runelite-client/src/main/java/net/runelite/client/Notifier.java
+++ b/runelite-client/src/main/java/net/runelite/client/Notifier.java
@@ -157,9 +157,14 @@ public class Notifier
return;
}
- if (runeLiteConfig.requestFocusOnNotification())
+ switch (runeLiteConfig.notificationRequestFocus())
{
- clientUI.requestFocus();
+ case REQUEST:
+ clientUI.requestFocus();
+ break;
+ case FORCE:
+ clientUI.forceFocus();
+ break;
}
if (runeLiteConfig.enableTrayNotifications())
diff --git a/runelite-client/src/main/java/net/runelite/client/config/RequestFocusType.java b/runelite-client/src/main/java/net/runelite/client/config/RequestFocusType.java
new file mode 100644
index 0000000000..728ce3f4b8
--- /dev/null
+++ b/runelite-client/src/main/java/net/runelite/client/config/RequestFocusType.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2020, Adam
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.runelite.client.config;
+
+public enum RequestFocusType
+{
+ OFF,
+ REQUEST,
+ FORCE;
+}
diff --git a/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java b/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java
index 2da5c9e0e8..b41814525c 100644
--- a/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java
+++ b/runelite-client/src/main/java/net/runelite/client/config/RuneLiteConfig.java
@@ -221,13 +221,13 @@ public interface RuneLiteConfig extends Config
@ConfigItem(
keyName = "notificationRequestFocus",
name = "Request focus on notification",
- description = "Toggles window focus request",
+ description = "Configures the window focus request type on notification",
position = 16,
titleSection = "notificationsTitle"
)
- default boolean requestFocusOnNotification()
+ default RequestFocusType notificationRequestFocus()
{
- return true;
+ return RequestFocusType.OFF;
}
@ConfigItem(
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 0b5e44055e..83fb860185 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
@@ -95,6 +95,7 @@ import net.runelite.client.util.ImageUtil;
import net.runelite.client.util.OSType;
import net.runelite.client.util.OSXUtil;
import net.runelite.client.util.SwingUtil;
+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;
@@ -680,41 +681,38 @@ public class ClientUI
*/
public void requestFocus()
{
- if (OSType.getOSType() == OSType.MacOS)
+ switch (OSType.getOSType())
{
- OSXUtil.requestFocus();
+ case MacOS:
+ // On OSX Component::requestFocus has no visible effect, so we use our OSX-specific
+ // requestUserAttention()
+ OSXUtil.requestUserAttention();
+ break;
+ default:
+ frame.requestFocus();
}
- // The workaround for Windows is to minimise and then un-minimise the client to bring
- // it to the front because java.awt.Window#toFront doesn't work reliably.
- // See https://stackoverflow.com/questions/309023/how-to-bring-a-window-to-the-front/7435722#7435722
- else if (OSType.getOSType() == OSType.Windows && !frame.isFocused())
+ giveClientFocus();
+ }
+
+ /**
+ * Attempt to forcibly bring the client frame to front
+ */
+ public void forceFocus()
+ {
+ switch (OSType.getOSType())
{
- SwingUtilities.invokeLater(() ->
- {
- if ((frame.getExtendedState() & JFrame.MAXIMIZED_BOTH) == JFrame.MAXIMIZED_BOTH)
- {
- frame.setExtendedState(JFrame.ICONIFIED);
- frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
- }
- else
- {
- // If the client is snapped to the top and bottom edges of the screen, setExtendedState will
- // will reset it so setSize and setLocation ensure that the client doesn't move or resize.
- // It is done this way because Windows does not support JFrame.MAXIMIZED_VERT
- int x = frame.getLocation().x;
- int y = frame.getLocation().y;
- int width = frame.getWidth();
- int height = frame.getHeight();
- frame.setExtendedState(JFrame.ICONIFIED);
- frame.setExtendedState(JFrame.NORMAL);
- frame.setLocation(x, y);
- frame.setSize(width, height);
- }
- });
+ case MacOS:
+ OSXUtil.requestForeground();
+ break;
+ case Windows:
+ WinUtil.requestForeground(frame);
+ break;
+ default:
+ frame.requestFocus();
+ break;
}
- frame.requestFocus();
giveClientFocus();
}
diff --git a/runelite-client/src/main/java/net/runelite/client/util/OSXUtil.java b/runelite-client/src/main/java/net/runelite/client/util/OSXUtil.java
index f521349b94..de099a1646 100644
--- a/runelite-client/src/main/java/net/runelite/client/util/OSXUtil.java
+++ b/runelite-client/src/main/java/net/runelite/client/util/OSXUtil.java
@@ -49,16 +49,23 @@ public class OSXUtil
}
}
+ /**
+ * Request user attention on macOS
+ */
+ public static void requestUserAttention()
+ {
+ Application app = Application.getApplication();
+ app.requestUserAttention(true);
+ log.debug("Requested user attention on macOS");
+ }
+
/**
* Requests the foreground in a macOS friendly way.
*/
- public static void requestFocus()
+ public static void requestForeground()
{
- if (OSType.getOSType() == OSType.MacOS)
- {
- Application app = Application.getApplication();
- app.requestForeground(true);
- log.debug("Requested focus on macOS");
- }
+ Application app = Application.getApplication();
+ app.requestForeground(true);
+ log.debug("Forced focus on macOS");
}
}
diff --git a/runelite-client/src/main/java/net/runelite/client/util/WinUtil.java b/runelite-client/src/main/java/net/runelite/client/util/WinUtil.java
new file mode 100644
index 0000000000..b300257690
--- /dev/null
+++ b/runelite-client/src/main/java/net/runelite/client/util/WinUtil.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2020, Adam
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.runelite.client.util;
+
+import com.sun.jna.Native;
+import com.sun.jna.platform.win32.User32;
+import com.sun.jna.platform.win32.WinDef;
+import com.sun.jna.platform.win32.WinUser;
+import java.awt.Frame;
+
+public class WinUtil
+{
+ /**
+ * Forcibly set focus to the given component
+ *
+ */
+ public static void requestForeground(Frame frame)
+ {
+ // SetForegroundWindow can't set iconified windows to foreground, so set the
+ // frame state to normal first
+ frame.setState(Frame.NORMAL);
+
+ User32 user32 = User32.INSTANCE;
+
+ // Windows does not allow any process to set the foreground window, but it will if
+ // the process received the last input event. So we send a F22 key event to the process.
+ // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setforegroundwindow
+ WinUser.INPUT input = new WinUser.INPUT();
+ input.type = new WinDef.DWORD(WinUser.INPUT.INPUT_KEYBOARD);
+ input.input.ki.wVk = new WinDef.WORD(0x85); // VK_F22
+ user32.SendInput(new WinDef.DWORD(1), (WinUser.INPUT[]) input.toArray(1), input.size());
+
+ // Now we may set the foreground window
+ WinDef.HWND hwnd = new WinDef.HWND(Native.getComponentPointer(frame));
+ user32.SetForegroundWindow(hwnd);
+ }
+}
diff --git a/runelite-client/src/main/resources/item_variations.json b/runelite-client/src/main/resources/item_variations.json
index eef8ea1fa2..f095a3cacf 100644
--- a/runelite-client/src/main/resources/item_variations.json
+++ b/runelite-client/src/main/resources/item_variations.json
@@ -252,7 +252,8 @@
],
"raw shrimps": [
317,
- 2514
+ 2514,
+ 24652
],
"burnt fish": [
323,
@@ -545,7 +546,8 @@
"bones": [
526,
2530,
- 3187
+ 3187,
+ 24655
],
"monks robe": [
542,
@@ -2163,7 +2165,8 @@
],
"logs": [
1511,
- 2511
+ 2511,
+ 24650
],
"map part": [
1535,
diff --git a/runelite-client/src/main/scripts/BankSearchLayout.hash b/runelite-client/src/main/scripts/BankSearchLayout.hash
index aeb599d127..0f68a772dc 100644
--- a/runelite-client/src/main/scripts/BankSearchLayout.hash
+++ b/runelite-client/src/main/scripts/BankSearchLayout.hash
@@ -1 +1 @@
-D3B1299112E56F2F3DABC162507F243C5BCD50C21296F5CABD23A8A6F1CB4A12
\ No newline at end of file
+9E3153DE24555E18FA425035D1C8929EECE4C44E6CFEA11CA186B7DA0AE830AF
\ No newline at end of file
diff --git a/runelite-client/src/main/scripts/BankSearchLayout.rs2asm b/runelite-client/src/main/scripts/BankSearchLayout.rs2asm
index d88372be38..fe791a94b8 100644
--- a/runelite-client/src/main/scripts/BankSearchLayout.rs2asm
+++ b/runelite-client/src/main/scripts/BankSearchLayout.rs2asm
@@ -1,7 +1,7 @@
.id 277
-.int_stack_count 16
+.int_stack_count 17
.string_stack_count 0
-.int_var_count 35
+.int_var_count 36
.string_var_count 1
; callback "beforeBankLayout"
; Fired before the bank starts its layout
@@ -14,7 +14,7 @@
; callback "isTabMenuActive"
; Used by the TabInterface to skip setting the bank title
sconst "beforeBankLayout"
- runelite_callback
+ runelite_callback
get_varbit 5102
iconst 1
if_icmpeq LABEL4
@@ -32,19 +32,19 @@ LABEL8:
invoke 41
LABEL13:
iconst 0
- istore 16
+ istore 17
get_varbit 5364
iconst 1
if_icmpeq LABEL19
jump LABEL21
LABEL19:
iconst 1
- istore 16
+ istore 17
LABEL21:
- iload 16
+ iload 17
iload 14
if_sethide
- iload 16
+ iload 17
iload 15
if_sethide
get_varbit 8352
@@ -53,16 +53,16 @@ LABEL21:
jump LABEL34
LABEL31:
iconst 1
- istore 16
+ istore 17
jump LABEL36
LABEL34:
iconst 0
- istore 16
+ istore 17
LABEL36:
- iload 16
+ iload 17
iload 12
if_sethide
- iload 16
+ iload 17
iload 13
if_sethide
iconst 441
@@ -160,7 +160,7 @@ LABEL121:
iload 10
cc_deleteall
iconst 0
- istore 17
+ istore 18
get_varbit 4170
iconst 3
if_icmpeq LABEL132
@@ -196,15 +196,15 @@ LABEL132:
jump LABEL163
LABEL160:
iconst 0
- istore 17
+ istore 18
jump LABEL165
LABEL163:
iconst 1
- istore 17
+ istore 18
LABEL165:
iconst 0
- istore 18
- iload 17
+ istore 19
+ iload 18
iconst 1
if_icmpeq LABEL171
jump LABEL195
@@ -213,7 +213,7 @@ LABEL171:
iload 8
if_sethide
iconst 2
- istore 18
+ istore 19
iconst 460
iconst 39
iconst 0
@@ -260,21 +260,21 @@ LABEL216:
iload 2
invoke 231
iconst 816
- istore 19
+ istore 20
iconst 816
iconst 9
iconst 3
multiply
add
- istore 20
+ istore 21
LABEL227:
- iload 19
iload 20
+ iload 21
if_icmple LABEL231
jump LABEL244
LABEL231:
iload 2
- iload 19
+ iload 20
cc_find
iconst 1
if_icmpeq LABEL237
@@ -283,36 +283,34 @@ LABEL237:
iconst 1
cc_sethide
LABEL239:
- iload 19
+ iload 20
iconst 1
add
- istore 19
+ istore 20
jump LABEL227
LABEL244:
iconst 0
- istore 19
+ istore 20
iconst 8
iconst 1
sub
- istore 21
+ istore 22
iload 2
if_getwidth
iconst 51
sub
iconst 35
sub
- istore 22
- iload 22
+ istore 23
+ iload 23
iconst 8
iconst 36
multiply
sub
- iload 21
+ iload 22
div
- istore 23
- iconst -1
istore 24
- iconst 0
+ iconst -1
istore 25
iconst 0
istore 26
@@ -320,10 +318,12 @@ LABEL244:
istore 27
iconst 0
istore 28
- iconst -1
- istore 29
iconst 0
+ istore 29
+ iconst -1
istore 30
+ iconst 0
+ istore 31
sconst ""
sstore 0
get_varbit 4150
@@ -332,15 +332,15 @@ LABEL244:
get_varbit 4150
iconst 9
if_icmpgt LABEL288
- jump LABEL740
+ jump LABEL741
LABEL288:
- iload 19
+ iload 20
iconst 816
if_icmplt LABEL292
jump LABEL317
LABEL292:
iload 2
- iload 19
+ iload 20
cc_find
iconst 1
if_icmpeq LABEL298
@@ -350,23 +350,23 @@ LABEL298:
cc_sethide
LABEL300:
iconst 95
- iload 19
+ iload 20
inv_getobj
iconst -1
if_icmpne LABEL306
jump LABEL312
LABEL306:
- iload 28
+ iload 29
iconst 1
add
- iload 19
+ iload 20
+ istore 30
istore 29
- istore 28
LABEL312:
- iload 19
+ iload 20
iconst 1
add
- istore 19
+ istore 20
jump LABEL288
LABEL317:
get_varbit 4171
@@ -386,8 +386,8 @@ LABEL317:
add
get_varbit 4179
add
- istore 30
- iload 30
+ istore 31
+ iload 31
iconst 0
if_icmple LABEL339
jump LABEL343
@@ -395,19 +395,19 @@ LABEL339:
iconst 816
iconst 1
sub
- istore 29
+ istore 30
LABEL343:
iconst 0 ; Scroll height variable
iconst 0 ; Compare variable
iconst 0 ;
sconst "setBankScroll" ; Show fake bank items for tag tabs
- runelite_callback ; If tag tab menu search isn't active
+ runelite_callback ; If tag tab menu search isn't active
if_icmpeq CONTINUE_SEARCH ; continue to normal bank search
- istore 27 ; Load scroll height into variable
+ istore 27 ; Load scroll height into variable
jump GetTabRange ; Skip normal bank layout
CONTINUE_SEARCH:
+ iload 31
iload 30
- iload 29
iconst 1
add
iconst 0
@@ -416,19 +416,19 @@ CONTINUE_SEARCH:
iload 9
iload 10
iload 11
+ iload 19
+ iload 24
+ iload 22
iload 18
- iload 23
- iload 21
- iload 17
invoke 509
- istore 25
- istore 27
- iload 26
- iload 25
- add
istore 26
+ istore 28
+ iload 27
+ iload 26
+ add
+ istore 27
iconst 0
- istore 19
+ istore 20
get_varbit 4171
iconst 0
if_icmpgt LABEL370
@@ -436,11 +436,11 @@ CONTINUE_SEARCH:
LABEL370:
iconst 1
iload 2
- iload 27
+ iload 28
invoke 510
- istore 18
- iload 19
- iload 19
+ istore 19
+ iload 20
+ iload 20
get_varbit 4171
add
iconst 1
@@ -449,21 +449,21 @@ LABEL370:
iload 9
iload 10
iload 11
- iload 18
- iload 23
- iload 21
- iload 17
- invoke 509
- istore 25
- istore 27
- iload 26
- iload 25
- add
- istore 26
iload 19
+ iload 24
+ iload 22
+ iload 18
+ invoke 509
+ istore 26
+ istore 28
+ iload 27
+ iload 26
+ add
+ istore 27
+ iload 20
get_varbit 4171
add
- istore 19
+ istore 20
LABEL400:
get_varbit 4172
iconst 0
@@ -472,11 +472,11 @@ LABEL400:
LABEL404:
iconst 2
iload 2
- iload 27
+ iload 28
invoke 510
- istore 18
- iload 19
- iload 19
+ istore 19
+ iload 20
+ iload 20
get_varbit 4172
add
iconst 2
@@ -485,21 +485,21 @@ LABEL404:
iload 9
iload 10
iload 11
- iload 18
- iload 23
- iload 21
- iload 17
- invoke 509
- istore 25
- istore 27
- iload 26
- iload 25
- add
- istore 26
iload 19
+ iload 24
+ iload 22
+ iload 18
+ invoke 509
+ istore 26
+ istore 28
+ iload 27
+ iload 26
+ add
+ istore 27
+ iload 20
get_varbit 4172
add
- istore 19
+ istore 20
LABEL434:
get_varbit 4173
iconst 0
@@ -508,11 +508,11 @@ LABEL434:
LABEL438:
iconst 3
iload 2
- iload 27
+ iload 28
invoke 510
- istore 18
- iload 19
- iload 19
+ istore 19
+ iload 20
+ iload 20
get_varbit 4173
add
iconst 3
@@ -521,21 +521,21 @@ LABEL438:
iload 9
iload 10
iload 11
- iload 18
- iload 23
- iload 21
- iload 17
- invoke 509
- istore 25
- istore 27
- iload 26
- iload 25
- add
- istore 26
iload 19
+ iload 24
+ iload 22
+ iload 18
+ invoke 509
+ istore 26
+ istore 28
+ iload 27
+ iload 26
+ add
+ istore 27
+ iload 20
get_varbit 4173
add
- istore 19
+ istore 20
LABEL468:
get_varbit 4174
iconst 0
@@ -544,11 +544,11 @@ LABEL468:
LABEL472:
iconst 4
iload 2
- iload 27
+ iload 28
invoke 510
- istore 18
- iload 19
- iload 19
+ istore 19
+ iload 20
+ iload 20
get_varbit 4174
add
iconst 4
@@ -557,21 +557,21 @@ LABEL472:
iload 9
iload 10
iload 11
- iload 18
- iload 23
- iload 21
- iload 17
- invoke 509
- istore 25
- istore 27
- iload 26
- iload 25
- add
- istore 26
iload 19
+ iload 24
+ iload 22
+ iload 18
+ invoke 509
+ istore 26
+ istore 28
+ iload 27
+ iload 26
+ add
+ istore 27
+ iload 20
get_varbit 4174
add
- istore 19
+ istore 20
LABEL502:
get_varbit 4175
iconst 0
@@ -580,11 +580,11 @@ LABEL502:
LABEL506:
iconst 5
iload 2
- iload 27
+ iload 28
invoke 510
- istore 18
- iload 19
- iload 19
+ istore 19
+ iload 20
+ iload 20
get_varbit 4175
add
iconst 5
@@ -593,21 +593,21 @@ LABEL506:
iload 9
iload 10
iload 11
- iload 18
- iload 23
- iload 21
- iload 17
- invoke 509
- istore 25
- istore 27
- iload 26
- iload 25
- add
- istore 26
iload 19
+ iload 24
+ iload 22
+ iload 18
+ invoke 509
+ istore 26
+ istore 28
+ iload 27
+ iload 26
+ add
+ istore 27
+ iload 20
get_varbit 4175
add
- istore 19
+ istore 20
LABEL536:
get_varbit 4176
iconst 0
@@ -616,11 +616,11 @@ LABEL536:
LABEL540:
iconst 6
iload 2
- iload 27
+ iload 28
invoke 510
- istore 18
- iload 19
- iload 19
+ istore 19
+ iload 20
+ iload 20
get_varbit 4176
add
iconst 6
@@ -629,21 +629,21 @@ LABEL540:
iload 9
iload 10
iload 11
- iload 18
- iload 23
- iload 21
- iload 17
- invoke 509
- istore 25
- istore 27
- iload 26
- iload 25
- add
- istore 26
iload 19
+ iload 24
+ iload 22
+ iload 18
+ invoke 509
+ istore 26
+ istore 28
+ iload 27
+ iload 26
+ add
+ istore 27
+ iload 20
get_varbit 4176
add
- istore 19
+ istore 20
LABEL570:
get_varbit 4177
iconst 0
@@ -652,11 +652,11 @@ LABEL570:
LABEL574:
iconst 7
iload 2
- iload 27
+ iload 28
invoke 510
- istore 18
- iload 19
- iload 19
+ istore 19
+ iload 20
+ iload 20
get_varbit 4177
add
iconst 7
@@ -665,21 +665,21 @@ LABEL574:
iload 9
iload 10
iload 11
- iload 18
- iload 23
- iload 21
- iload 17
- invoke 509
- istore 25
- istore 27
- iload 26
- iload 25
- add
- istore 26
iload 19
+ iload 24
+ iload 22
+ iload 18
+ invoke 509
+ istore 26
+ istore 28
+ iload 27
+ iload 26
+ add
+ istore 27
+ iload 20
get_varbit 4177
add
- istore 19
+ istore 20
LABEL604:
get_varbit 4178
iconst 0
@@ -688,11 +688,11 @@ LABEL604:
LABEL608:
iconst 8
iload 2
- iload 27
+ iload 28
invoke 510
- istore 18
- iload 19
- iload 19
+ istore 19
+ iload 20
+ iload 20
get_varbit 4178
add
iconst 8
@@ -701,21 +701,21 @@ LABEL608:
iload 9
iload 10
iload 11
- iload 18
- iload 23
- iload 21
- iload 17
- invoke 509
- istore 25
- istore 27
- iload 26
- iload 25
- add
- istore 26
iload 19
+ iload 24
+ iload 22
+ iload 18
+ invoke 509
+ istore 26
+ istore 28
+ iload 27
+ iload 26
+ add
+ istore 27
+ iload 20
get_varbit 4178
add
- istore 19
+ istore 20
LABEL638:
get_varbit 4179
iconst 0
@@ -724,11 +724,11 @@ LABEL638:
LABEL642:
iconst 9
iload 2
- iload 27
+ iload 28
invoke 510
- istore 18
- iload 19
- iload 19
+ istore 19
+ iload 20
+ iload 20
get_varbit 4179
add
iconst 9
@@ -737,21 +737,21 @@ LABEL642:
iload 9
iload 10
iload 11
- iload 18
- iload 23
- iload 21
- iload 17
- invoke 509
- istore 25
- istore 27
- iload 26
- iload 25
- add
- istore 26
iload 19
+ iload 24
+ iload 22
+ iload 18
+ invoke 509
+ istore 26
+ istore 28
+ iload 27
+ iload 26
+ add
+ istore 27
+ iload 20
get_varbit 4179
add
- istore 19
+ istore 20
LABEL672:
invoke 514
iconst 1
@@ -780,11 +780,11 @@ LABEL683:
jump LABEL701
LABEL694:
sconst "Show items whose names contain the following text: ("
- iload 26
+ iload 27
tostring
sconst " found)"
join_string 3
- iload 26 ; load number of matches
+ iload 27 ; load number of matches
sconst "setSearchBankInputTextFound" ; load event name
runelite_callback ; invoke callback
pop_int ; pop number of matches
@@ -831,80 +831,82 @@ LABEL720:
iload 9
iload 10
iload 11
- iload 27
iload 28
sconst "addLastRow"
runelite_callback
+ iload 29
iload 12
iload 13
iload 14
iload 15
+ iload 16
invoke 505
return
-LABEL740:
+LABEL741:
invoke 514
iconst 1
- if_icmpeq LABEL744
- jump GetTabRange
-LABEL744:
+ if_icmpeq LABEL745
+ jump LABEL748
+LABEL745:
iconst 1
iconst 1
invoke 299
GetTabRange:
- iconst -1
- istore 31
+LABEL748:
iconst -1
istore 32
+ iconst -1
+ istore 33
get_varbit 4150
invoke 513
- istore 32
- istore 31
- iconst 0
istore 33
+ istore 32
iconst 0
istore 34
-LABEL759:
- iload 19
+ iconst 0
+ istore 35
+LABEL760:
+ iload 20
iconst 816
- if_icmplt LABEL763
- jump SetTitle
-LABEL763:
+ if_icmplt LABEL764
+ jump LABEL844
+LABEL764:
iload 2
- iload 19
+ iload 20
cc_find
iconst 1
- if_icmpeq LABEL769
- jump LABEL838
-LABEL769:
+ if_icmpeq LABEL770
+ jump LABEL839
+LABEL770:
iconst 95
- iload 19
+ iload 20
inv_getobj
- istore 24
- iload 24
+ istore 25
+ iload 25
iconst -1
- if_icmpne LABEL777
- jump LABEL781
-LABEL777:
- iload 28
+ if_icmpne LABEL778
+ jump LABEL782
+LABEL778:
+ iload 29
iconst 1
add
- istore 28
-LABEL781:
- iload 19
- iload 31
- if_icmpge LABEL785
- jump LABEL836
-LABEL785:
- iload 19
+ istore 29
+LABEL782:
+ iload 20
iload 32
- if_icmplt LABEL789
- jump LABEL836
-LABEL789:
+ if_icmpge LABEL786
+ jump LABEL837
+LABEL786:
+ iload 20
+ iload 33
+ if_icmplt LABEL790
+ jump LABEL837
+LABEL790:
iconst 0
cc_sethide
- iload 24
+ iload 25
iconst 95
- iload 19
+ iload 20
inv_getnum
iload 2
iload 3
@@ -912,64 +914,65 @@ LABEL789:
iload 10
iload 11
invoke 278
+ iload 35
+ iconst 36
+ multiply
+ istore 28
+ iconst 51
iload 34
iconst 36
- multiply
- istore 27
- iconst 51
- iload 33
- iconst 36
- iload 23
+ iload 24
add
multiply
add
- iload 27
+ iload 28
iconst 0
iconst 0
cc_setposition
- iload 27
+ iload 28
iconst 32
add
- istore 27
- iload 33
- iload 21
- if_icmplt LABEL824
- jump LABEL829
-LABEL824:
- iload 33
- iconst 1
- add
- istore 33
- jump LABEL835
-LABEL829:
- iconst 0
+ istore 28
+ iload 34
+ iload 22
+ if_icmplt LABEL825
+ jump LABEL830
+LABEL825:
iload 34
iconst 1
add
istore 34
- istore 33
-LABEL835:
- jump LABEL838
-LABEL836:
- iconst 1
- cc_sethide
-LABEL838:
- iload 19
+ jump LABEL836
+LABEL830:
+ iconst 0
+ iload 35
iconst 1
add
- istore 19
- jump LABEL759
+ istore 35
+ istore 34
+LABEL836:
+ jump LABEL839
+LABEL837:
+ iconst 1
+ cc_sethide
+LABEL839:
+ iload 20
+ iconst 1
+ add
+ istore 20
+ jump LABEL760
SetTitle:
- iconst 0 ; Compare variable
- iconst 0 ;
- sconst "isTabMenuActive" ; Check if tag tab menu
- runelite_callback ; is active and skip setting
- if_icmpne FinishBuilding ; the bank title if it is
+ 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
+LABEL844:
get_varbit 4170
iconst 2
- if_icmpeq SetTitleRomanNumeral
- jump SetTitleNumber
-SetTitleRomanNumeral:
+ if_icmpeq LABEL848
+ jump LABEL858
+LABEL848:
sconst "Tab "
iconst 105
iconst 115
@@ -981,8 +984,8 @@ SetTitleRomanNumeral:
runelite_callback ;
iload 5
if_settext
- jump FinishBuilding
-SetTitleNumber:
+ jump LABEL864
+LABEL858:
sconst "Tab "
get_varbit 4150
tostring
@@ -990,8 +993,9 @@ SetTitleNumber:
sconst "setBankTitle" ;
runelite_callback ;
iload 5
- if_settext
+ if_settext
FinishBuilding:
+LABEL864:
iload 0
iload 1
iload 2
@@ -1004,11 +1008,12 @@ FinishBuilding:
iload 9
iload 10
iload 11
- iload 27
iload 28
+ iload 29
iload 12
iload 13
iload 14
iload 15
+ iload 16
invoke 505
return
diff --git a/runelite-client/src/main/scripts/ChatBuilder.hash b/runelite-client/src/main/scripts/ChatBuilder.hash
index b13d3671c5..48f78f5865 100644
--- a/runelite-client/src/main/scripts/ChatBuilder.hash
+++ b/runelite-client/src/main/scripts/ChatBuilder.hash
@@ -1 +1 @@
-FAA689813E3E4C1BA5A0B7DF492C6AE48DBD466C50968E97FADF4BBD42A9A166
\ No newline at end of file
+0622D1B98983E9C4CB40422AF9C1C7E5C37978B5748B73F8E2A317D100B95E9B
\ No newline at end of file
diff --git a/runelite-client/src/main/scripts/ChatBuilder.rs2asm b/runelite-client/src/main/scripts/ChatBuilder.rs2asm
index 8173576eae..c37a4f3c4f 100644
--- a/runelite-client/src/main/scripts/ChatBuilder.rs2asm
+++ b/runelite-client/src/main/scripts/ChatBuilder.rs2asm
@@ -3,7 +3,7 @@
.string_stack_count 0
.int_var_count 17
.string_var_count 13
- iconst 10616890
+ iconst 10616891
if_getwidth
istore 1
chat_playername
@@ -103,7 +103,7 @@ LABEL82:
join_string 7
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -247,7 +247,7 @@ LABEL190:
join_string 3
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -274,7 +274,7 @@ LABEL211:
join_string 3
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -304,7 +304,7 @@ LABEL232:
join_string 3
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -328,7 +328,7 @@ LABEL254:
join_string 4 ; + 1 for timestamp
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -352,7 +352,7 @@ LABEL272:
join_string 4 ; + 1 for timestamp
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -399,7 +399,7 @@ LABEL305:
join_string 3
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -423,7 +423,7 @@ LABEL327:
join_string 4 ; + 1 for time stamp
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -455,7 +455,7 @@ LABEL345:
join_string 3
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -480,7 +480,7 @@ LABEL371:
sload 11
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -503,7 +503,7 @@ LABEL401:
sconst "jk :P"
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -519,7 +519,7 @@ LABEL416:
sload 11
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -536,7 +536,7 @@ LABEL431:
sload 11
iload 7
iload 8
- iconst 10616890
+ iconst 10616891
iload 1
iconst 3
iconst 14
@@ -889,7 +889,7 @@ LABEL720:
iconst 0
iload 8
if_setsize
- iconst 10616890
+ iconst 10616891
iload 7
iconst 2
multiply
@@ -903,7 +903,7 @@ LABEL748:
iconst 1
cc_sethide
LABEL752:
- iconst 10616890
+ iconst 10616891
iload 7
iconst 2
multiply
@@ -939,7 +939,7 @@ LABEL777:
iload 5
sub
istore 5
- iconst 10616890
+ iconst 10616891
if_getheight
istore 16
iload 5
@@ -982,7 +982,7 @@ LABEL800:
iconst 0
iload 8
if_setposition
- iconst 10616890
+ iconst 10616891
iload 7
iconst 2
multiply
@@ -997,7 +997,7 @@ LABEL832:
iconst 0
cc_setposition
LABEL837:
- iconst 10616890
+ iconst 10616891
iload 7
iconst 2
multiply
@@ -1018,17 +1018,17 @@ LABEL852:
LABEL853:
iconst 0
iload 16
- iconst 10616890
+ iconst 10616891
if_setscrollsize
- iconst 10617391
- iconst 10616890
+ iconst 10617392
+ iconst 10616891
get_varc_int 7
iload 16
get_varc_int 8
sub
add
invoke 72
- iconst 10616890
+ iconst 10616891
if_getscrolly
iload 16
set_varc_int 8
diff --git a/runelite-client/src/main/scripts/ChatboxInputWidgetBuilder.hash b/runelite-client/src/main/scripts/ChatboxInputWidgetBuilder.hash
index bc5bde9840..9bc0c02495 100644
--- a/runelite-client/src/main/scripts/ChatboxInputWidgetBuilder.hash
+++ b/runelite-client/src/main/scripts/ChatboxInputWidgetBuilder.hash
@@ -1 +1 @@
-A9BA4723E7D91AD151C1AB3ABEAF84971BFFD71AA8C23E763ECCC8981A8A1429
\ No newline at end of file
+B840A83E8560C8EB17205E2B98F1D9CD25FBC390562E8A5A437B692EEA6D8F15
\ No newline at end of file
diff --git a/runelite-client/src/main/scripts/ChatboxInputWidgetBuilder.rs2asm b/runelite-client/src/main/scripts/ChatboxInputWidgetBuilder.rs2asm
index 3b063e35df..e1ab66d206 100644
--- a/runelite-client/src/main/scripts/ChatboxInputWidgetBuilder.rs2asm
+++ b/runelite-client/src/main/scripts/ChatboxInputWidgetBuilder.rs2asm
@@ -21,16 +21,16 @@ LABEL10:
istore 0
sstore 0
iconst 1
- iconst 10616889
+ iconst 10616890
if_settextshadow
jump LABEL23
LABEL20:
iconst 0
- iconst 10616889
+ iconst 10616890
if_settextshadow
LABEL23:
iload 0
- iconst 10616889
+ iconst 10616890
if_setcolour
get_varc_string 335
string_length
@@ -130,7 +130,7 @@ LABEL103:
if_setposition
LABEL115:
iload 3
- iconst 10616889
+ iconst 10616890
if_getwidth
if_icmpgt LABEL120
jump LABEL126
@@ -138,29 +138,29 @@ LABEL120:
iconst 2
iconst 2
iconst 0
- iconst 10616889
+ iconst 10616890
if_settextalign
jump LABEL131
LABEL126:
iconst 0
iconst 2
iconst 0
- iconst 10616889
+ iconst 10616890
if_settextalign
LABEL131:
- iconst 10616889
+ iconst 10616890
if_clearops
iconst -1
sconst ""
- iconst 10616889
+ iconst 10616890
if_setonmouserepeat
iconst -1
sconst ""
- iconst 10616889
+ iconst 10616890
if_setonmouseleave
iconst -1
sconst ""
- iconst 10616889
+ iconst 10616890
if_setonop
jump LABEL187
LABEL146:
@@ -175,39 +175,39 @@ LABEL146:
iconst 1
iconst 2
iconst 0
- iconst 10616889
+ iconst 10616890
if_settextalign
iconst 10
sconst "Configure"
- iconst 10616889
+ iconst 10616890
if_setop
sconst ""
sconst "Display name"
sconst ""
join_string 3
- iconst 10616889
+ iconst 10616890
if_setopbase
iconst 45
iconst -2147483645
iload 1
sconst "Ii"
- iconst 10616889
+ iconst 10616890
if_setonmouserepeat
iconst 45
iconst -2147483645
iload 0
sconst "Ii"
- iconst 10616889
+ iconst 10616890
if_setonmouseleave
iconst 489
iconst -2147483644
iconst 1024
sconst "ii"
- iconst 10616889
+ iconst 10616890
if_setonop
LABEL187:
sload 2
- iconst 10616889
+ iconst 10616890
if_settext
sconst "setChatboxInput"
runelite_callback
@@ -215,6 +215,6 @@ LABEL187:
iconst 16
iconst 1
iconst 0
- iconst 10616889
+ iconst 10616890
if_setsize
return
diff --git a/runelite-client/src/main/scripts/CommandScript.hash b/runelite-client/src/main/scripts/CommandScript.hash
index 77827000bf..30e32c0402 100644
--- a/runelite-client/src/main/scripts/CommandScript.hash
+++ b/runelite-client/src/main/scripts/CommandScript.hash
@@ -1 +1 @@
-E8860FBA051B1F98771592610F056C95C509C403A16522D4D7C31AF8EA21E6D3
\ No newline at end of file
+9D8074ED6B6D8171CFC3A5C8F710FC94483DB601AF739E462AB20A6E5C97ACE7
\ No newline at end of file
diff --git a/runelite-client/src/main/scripts/CommandScript.rs2asm b/runelite-client/src/main/scripts/CommandScript.rs2asm
index 3da08bae74..f38a52259f 100644
--- a/runelite-client/src/main/scripts/CommandScript.rs2asm
+++ b/runelite-client/src/main/scripts/CommandScript.rs2asm
@@ -3,11 +3,11 @@
.string_stack_count 0
.int_var_count 5
.string_var_count 0
- iconst 10616887
+ iconst 10616888
if_gethide
iconst 1
if_icmpeq LABEL9
- iconst 10616888
+ iconst 10616889
if_gethide
iconst 1
if_icmpeq LABEL9
diff --git a/runelite-client/src/main/scripts/ResetChatboxInput.hash b/runelite-client/src/main/scripts/ResetChatboxInput.hash
index 2c90f09832..c06fb60970 100644
--- a/runelite-client/src/main/scripts/ResetChatboxInput.hash
+++ b/runelite-client/src/main/scripts/ResetChatboxInput.hash
@@ -1 +1 @@
-9985AC752BF689CA5353232CF302B41E83EC1901D8615B507EA10DFAA9F5AF9A
\ No newline at end of file
+38654CC2E80C30E1558EFE4A5C64D75F3A28122236A933F9F067084E856FFE58
\ No newline at end of file
diff --git a/runelite-client/src/main/scripts/ResetChatboxInput.rs2asm b/runelite-client/src/main/scripts/ResetChatboxInput.rs2asm
index 17070abc16..9a2a3308f4 100644
--- a/runelite-client/src/main/scripts/ResetChatboxInput.rs2asm
+++ b/runelite-client/src/main/scripts/ResetChatboxInput.rs2asm
@@ -9,7 +9,7 @@
iconst 10616872
if_sethide
iconst 0
- iconst 10616887
+ iconst 10616888
if_sethide
invoke 923
iconst 0
@@ -85,6 +85,9 @@ LABEL40:
iconst 1
iconst 10616881
if_sethide
+ iconst 1
+ iconst 10616887
+ if_sethide
iconst 10616885
cc_deleteall
iconst 10616886
@@ -164,19 +167,19 @@ LABEL40:
if_setonclick
get_varc_int 41
iconst 1337
- if_icmpeq LABEL154
- jump LABEL158
-LABEL154:
+ if_icmpeq LABEL157
+ jump LABEL161
+LABEL157:
invoke 2526
pop_int
clientclock
set_varc_int 384
-LABEL158:
+LABEL161:
invoke 1972
iconst 1
- if_icmpeq LABEL162
- jump LABEL163
-LABEL162:
+ if_icmpeq LABEL165
+ jump LABEL166
+LABEL165:
invoke 2581
-LABEL163:
+LABEL166:
return
diff --git a/runelite-client/src/main/scripts/ToplevelChatboxBackground.hash b/runelite-client/src/main/scripts/ToplevelChatboxBackground.hash
index 96871403a0..53e30c765c 100644
--- a/runelite-client/src/main/scripts/ToplevelChatboxBackground.hash
+++ b/runelite-client/src/main/scripts/ToplevelChatboxBackground.hash
@@ -1 +1 @@
-975C2E20F49CD83A72B6A7BA4CF34F9B476F26DCD2649B0CE79B3F93CBB892DD
\ No newline at end of file
+0CEA896F74B3F885C26633865A18FDAE02AD6C78C114646FCA710018F6271C55
\ No newline at end of file
diff --git a/runelite-client/src/main/scripts/ToplevelChatboxBackground.rs2asm b/runelite-client/src/main/scripts/ToplevelChatboxBackground.rs2asm
index 3504991537..e713ab777c 100644
--- a/runelite-client/src/main/scripts/ToplevelChatboxBackground.rs2asm
+++ b/runelite-client/src/main/scripts/ToplevelChatboxBackground.rs2asm
@@ -53,13 +53,13 @@ LABEL35:
iconst 0
iconst 2
iconst 0
- iconst 10616890
+ iconst 10616891
if_setposition
iconst -1
iconst 0
iconst 0
iconst 0
- iconst 10617391
+ iconst 10617392
if_setposition
jump LABEL60
LABEL48:
@@ -67,18 +67,18 @@ LABEL48:
iconst 0
iconst 0
iconst 0
- iconst 10616890
+ iconst 10616891
if_setposition
iconst 0
iconst 0
iconst 2
iconst 0
- iconst 10617391
+ iconst 10617392
if_setposition
LABEL60:
iconst 10616870
cc_deleteall
- iconst 10616888
+ iconst 10616889
cc_deleteall
iconst 0
istore 1
@@ -139,7 +139,7 @@ LABEL97:
cc_settiling
iconst 0
cc_settrans
- iconst 10616888
+ iconst 10616889
iconst 3
iconst 0
cc_create
@@ -158,7 +158,7 @@ LABEL97:
iconst 1
cc_setfill
LABEL135:
- iconst 10617391
+ iconst 10617392
iconst 792
iconst 789
iconst 790
@@ -243,13 +243,13 @@ LABEL190:
cc_setfill
iconst 254
cc_settrans
- iconst 10616888
+ iconst 10616889
iconst 3
iload 4
iconst 2
multiply
cc_create
- iconst 10616888
+ iconst 10616889
iconst 3
iload 4
iconst 2
@@ -300,7 +300,7 @@ LABEL190:
jump LABEL186
LABEL265:
sconst "chatboxBackgroundBuilt"
- runelite_callback
+ runelite_callback
jump LABEL332
LABEL266:
iconst 10616870
@@ -323,13 +323,13 @@ LABEL266:
cc_setfill
iconst 225
cc_settrans
- iconst 10616888
+ iconst 10616889
iconst 3
iload 4
iconst 2
multiply
cc_create
- iconst 10616888
+ iconst 10616889
iconst 3
iload 4
iconst 2
@@ -370,7 +370,7 @@ LABEL266:
iconst 130
cc_settrans 1
LABEL332:
- iconst 10617391
+ iconst 10617392
iconst 1190
iconst 1187
iconst 1188
diff --git a/runelite-client/src/main/scripts/TriggerBankLayout.hash b/runelite-client/src/main/scripts/TriggerBankLayout.hash
index 51b1384d82..e4d5241bf6 100644
--- a/runelite-client/src/main/scripts/TriggerBankLayout.hash
+++ b/runelite-client/src/main/scripts/TriggerBankLayout.hash
@@ -1 +1 @@
-BAA6532BC7BE7C6B39DA194976DA1223646557F982A52DC7E28EFF80F59FD6E3
\ No newline at end of file
+DC2D875DFF91D7D0184670EC9CD4E5980C051D8D4BD0F591935FD603409A7369
\ No newline at end of file
diff --git a/runelite-client/src/main/scripts/TriggerBankLayout.rs2asm b/runelite-client/src/main/scripts/TriggerBankLayout.rs2asm
index 92aaf5181c..8fa0ed58a8 100644
--- a/runelite-client/src/main/scripts/TriggerBankLayout.rs2asm
+++ b/runelite-client/src/main/scripts/TriggerBankLayout.rs2asm
@@ -1,7 +1,7 @@
.id 276
-.int_stack_count 16
+.int_stack_count 17
.string_stack_count 0
-.int_var_count 16
+.int_var_count 17
.string_var_count 0
; Check if we should allow server to relayout bank
@@ -41,5 +41,6 @@ LABEL2:
iload 13
iload 14
iload 15
+ iload 16
invoke 277
return
diff --git a/runelite-client/src/test/java/net/runelite/client/menus/MenuManagerTest.java b/runelite-client/src/test/java/net/runelite/client/menus/MenuManagerTest.java
new file mode 100644
index 0000000000..f90cf99118
--- /dev/null
+++ b/runelite-client/src/test/java/net/runelite/client/menus/MenuManagerTest.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2020, bfmoatbio
+ * Copyright (c) 2020, Jordan Atwood
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this
+ * list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+package net.runelite.client.menus;
+
+import com.google.inject.Guice;
+import com.google.inject.Inject;
+import com.google.inject.testing.fieldbinder.Bind;
+import com.google.inject.testing.fieldbinder.BoundFieldModule;
+import net.runelite.api.Client;
+import net.runelite.api.MenuAction;
+import net.runelite.api.events.MenuOptionClicked;
+import net.runelite.api.events.PlayerMenuOptionClicked;
+import net.runelite.client.eventbus.EventBus;
+import org.junit.Before;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.mockito.ArgumentCaptor;
+import org.mockito.Mock;
+import static org.mockito.Mockito.verify;
+import org.mockito.junit.MockitoJUnitRunner;
+import static org.junit.Assert.assertEquals;
+
+@RunWith(MockitoJUnitRunner.class)
+public class MenuManagerTest
+{
+ @Inject
+ private MenuManager menuManager;
+
+ @Mock
+ @Bind
+ private Client client;
+
+ @Mock
+ @Bind
+ private EventBus eventBus;
+
+ @Before
+ public void before()
+ {
+ Guice.createInjector(BoundFieldModule.of(this)).injectMembers(this);
+ }
+
+ @Test
+ public void testPlayerMenuOptionClicked()
+ {
+ MenuOptionClicked event = new MenuOptionClicked();
+ event.setMenuAction(MenuAction.RUNELITE);
+ event.setMenuTarget("username (level-42)");
+
+ menuManager.onMenuOptionClicked(event);
+
+ ArgumentCaptor captor = ArgumentCaptor.forClass(PlayerMenuOptionClicked.class);
+ verify(eventBus).post(captor.capture());
+ PlayerMenuOptionClicked clicked = captor.getValue();
+ assertEquals("username", clicked.getMenuTarget());
+ }
+
+ @Test
+ public void testPlayerMenuOptionWithBountyHunterEmblemClicked()
+ {
+ MenuOptionClicked event = new MenuOptionClicked();
+ event.setMenuAction(MenuAction.RUNELITE);
+ event.setMenuTarget("username
5 (level-42)");
+
+ menuManager.onMenuOptionClicked(event);
+
+ ArgumentCaptor captor = ArgumentCaptor.forClass(PlayerMenuOptionClicked.class);
+ verify(eventBus).post(captor.capture());
+ PlayerMenuOptionClicked clicked = captor.getValue();
+ assertEquals("username", clicked.getMenuTarget());
+ }
+}