From 8ce30d9700dd43848eb0db91d33d631b2c530b28 Mon Sep 17 00:00:00 2001 From: melkypie <5113962+melkypie@users.noreply.github.com> Date: Mon, 11 May 2020 18:21:13 +0300 Subject: [PATCH 01/13] itemcharges: show potion doses --- .../plugins/itemcharges/ItemChargeConfig.java | 11 + .../itemcharges/ItemChargeOverlay.java | 5 +- .../plugins/itemcharges/ItemChargeType.java | 1 + .../plugins/itemcharges/ItemWithCharge.java | 214 +++++++++++++++++- 4 files changed, 225 insertions(+), 6 deletions(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java index 66c14ea22d..554df738c7 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeConfig.java @@ -404,4 +404,15 @@ public interface ItemChargeConfig extends Config { return false; } + + @ConfigItem( + keyName = "showPotionDoseCount", + name = "Show Potion Doses", + description = "Configures if potion doses are shown", + position = 25 + ) + default boolean showPotionDoseCount() + { + return false; + } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeOverlay.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeOverlay.java index d23db92cc7..d6f99539d3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeOverlay.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeOverlay.java @@ -134,7 +134,8 @@ class ItemChargeOverlay extends WidgetItemOverlay || (type == SACK && !config.showSackCharges()) || (type == ABYSSAL_BRACELET && !config.showAbyssalBraceletCharges()) || (type == AMULET_OF_CHEMISTRY && !config.showAmuletOfChemistryCharges()) - || (type == AMULET_OF_BOUNTY && !config.showAmuletOfBountyCharges())) + || (type == AMULET_OF_BOUNTY && !config.showAmuletOfBountyCharges()) + || (type == POTION && !config.showPotionDoseCount())) { return; } @@ -156,7 +157,7 @@ class ItemChargeOverlay extends WidgetItemOverlay || config.showImpCharges() || config.showWateringCanCharges() || config.showWaterskinCharges() || config.showBellowCharges() || config.showBasketCharges() || config.showSackCharges() || config.showAbyssalBraceletCharges() || config.showExplorerRingCharges() || config.showRingOfForgingCount() - || config.showAmuletOfChemistryCharges() || config.showAmuletOfBountyCharges(); + || config.showAmuletOfChemistryCharges() || config.showAmuletOfBountyCharges() || config.showPotionDoseCount(); } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeType.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeType.java index 475a6d03b9..b0bb7da687 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeType.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemChargeType.java @@ -42,4 +42,5 @@ enum ItemChargeType SACK, RING_OF_FORGING, GUTHIX_REST, + POTION, } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemWithCharge.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemWithCharge.java index cfcf5635ae..b4892ef7a3 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemWithCharge.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemcharges/ItemWithCharge.java @@ -30,6 +30,7 @@ import javax.annotation.Nullable; import lombok.AllArgsConstructor; import lombok.Getter; import static net.runelite.api.ItemID.*; +import static net.runelite.client.plugins.itemcharges.ItemChargeType.POTION; import static net.runelite.client.plugins.itemcharges.ItemChargeType.*; @AllArgsConstructor @@ -41,6 +42,42 @@ enum ItemWithCharge ABRACE3(ABYSSAL_BRACELET, ABYSSAL_BRACELET3, 3), ABRACE4(ABYSSAL_BRACELET, ABYSSAL_BRACELET4, 4), ABRACE5(ABYSSAL_BRACELET, ABYSSAL_BRACELET5, 5), + ABSORPTION1(POTION, ABSORPTION_1, 1), + ABSORPTION2(POTION, ABSORPTION_2, 2), + ABSORPTION3(POTION, ABSORPTION_3, 3), + ABSORPTION4(POTION, ABSORPTION_4, 4), + AGILITY1(POTION, AGILITY_POTION1, 1), + AGILITY2(POTION, AGILITY_POTION2, 2), + AGILITY3(POTION, AGILITY_POTION3, 3), + AGILITY4(POTION, AGILITY_POTION4, 4), + ANTI1(POTION, ANTIPOISON1, 1), + ANTI2(POTION, ANTIPOISON2, 2), + ANTI3(POTION, ANTIPOISON3, 3), + ANTI4(POTION, ANTIPOISON4, 4), + ANTIDOTE_P1(POTION, ANTIDOTE1, 1), + ANTIDOTE_P2(POTION, ANTIDOTE2, 2), + ANTIDOTE_P3(POTION, ANTIDOTE3, 3), + ANTIDOTE_P4(POTION, ANTIDOTE4, 4), + ANTIDOTE_PP1(POTION, ANTIDOTE1_5958, 1), + ANTIDOTE_PP2(POTION, ANTIDOTE2_5956, 2), + ANTIDOTE_PP3(POTION, ANTIDOTE3_5954, 3), + ANTIDOTE_PP4(POTION, ANTIDOTE4_5952, 4), + ANTIFIRE1(POTION, ANTIFIRE_POTION1, 1), + ANTIFIRE2(POTION, ANTIFIRE_POTION2, 2), + ANTIFIRE3(POTION, ANTIFIRE_POTION3, 3), + ANTIFIRE4(POTION, ANTIFIRE_POTION4, 4), + ANTIVEN1(POTION, ANTIVENOM1, 1), + ANTIVEN2(POTION, ANTIVENOM2, 2), + ANTIVEN3(POTION, ANTIVENOM3, 3), + ANTIVEN4(POTION, ANTIVENOM4, 4), + ANTIVENOM_P1(POTION, ANTIVENOM1_12919, 1), + ANTIVENOM_P2(POTION, ANTIVENOM2_12917, 2), + ANTIVENOM_P3(POTION, ANTIVENOM3_12915, 3), + ANTIVENOM_P4(POTION, ANTIVENOM4_12913, 4), + ATTACK1(POTION, ATTACK_POTION1, 1), + ATTACK2(POTION, ATTACK_POTION2, 2), + ATTACK3(POTION, ATTACK_POTION3, 3), + ATTACK4(POTION, ATTACK_POTION4, 4), BASKET_APPLES1(FRUIT_BASKET, APPLES1, 1), BASKET_APPLES2(FRUIT_BASKET, APPLES2, 2), BASKET_APPLES3(FRUIT_BASKET, APPLES3, 3), @@ -66,10 +103,22 @@ enum ItemWithCharge BASKET_TOMATOES3(FRUIT_BASKET, TOMATOES3, 3), BASKET_TOMATOES4(FRUIT_BASKET, TOMATOES4, 4), BASKET_TOMATOES5(FRUIT_BASKET, TOMATOES5, 5), + BASTION1(POTION, BASTION_POTION1, 1), + BASTION2(POTION, BASTION_POTION2, 2), + BASTION3(POTION, BASTION_POTION3, 3), + BASTION4(POTION, BASTION_POTION4, 4), + BATTLEMAGE1(POTION, BATTLEMAGE_POTION1, 1), + BATTLEMAGE2(POTION, BATTLEMAGE_POTION2, 2), + BATTLEMAGE3(POTION, BATTLEMAGE_POTION3, 3), + BATTLEMAGE4(POTION, BATTLEMAGE_POTION4, 4), BELLOWS0(BELLOWS, OGRE_BELLOWS, 0), BELLOWS1(BELLOWS, OGRE_BELLOWS_1, 1), BELLOWS2(BELLOWS, OGRE_BELLOWS_2, 2), BELLOWS3(BELLOWS, OGRE_BELLOWS_3, 3), + BLIGHTED_SUPER_REST1(POTION, BLIGHTED_SUPER_RESTORE1, 1), + BLIGHTED_SUPER_REST2(POTION, BLIGHTED_SUPER_RESTORE2, 2), + BLIGHTED_SUPER_REST3(POTION, BLIGHTED_SUPER_RESTORE3, 3), + BLIGHTED_SUPER_REST4(POTION, BLIGHTED_SUPER_RESTORE4, 4), BURNING1(TELEPORT, BURNING_AMULET1, 1), BURNING2(TELEPORT, BURNING_AMULET2, 2), BURNING3(TELEPORT, BURNING_AMULET3, 3), @@ -81,16 +130,76 @@ enum ItemWithCharge CBRACE4(TELEPORT, COMBAT_BRACELET4, 4), CBRACE5(TELEPORT, COMBAT_BRACELET5, 5), CBRACE6(TELEPORT, COMBAT_BRACELET6, 6), + COMBAT1(POTION, COMBAT_POTION1, 1), + COMBAT2(POTION, COMBAT_POTION2, 2), + COMBAT3(POTION, COMBAT_POTION3, 3), + COMBAT4(POTION, COMBAT_POTION4, 4), + COMPOST1(POTION, COMPOST_POTION1, 1), + COMPOST2(POTION, COMPOST_POTION2, 2), + COMPOST3(POTION, COMPOST_POTION3, 3), + COMPOST4(POTION, COMPOST_POTION4, 4), + DEFENCE1(POTION, DEFENCE_POTION1, 1), + DEFENCE2(POTION, DEFENCE_POTION2, 2), + DEFENCE3(POTION, DEFENCE_POTION3, 3), + DEFENCE4(POTION, DEFENCE_POTION4, 4), DIGSITE1(TELEPORT, DIGSITE_PENDANT_1, 1), DIGSITE2(TELEPORT, DIGSITE_PENDANT_2, 2), DIGSITE3(TELEPORT, DIGSITE_PENDANT_3, 3), DIGSITE4(TELEPORT, DIGSITE_PENDANT_4, 4), DIGSITE5(TELEPORT, DIGSITE_PENDANT_5, 5), + DIVINE_BASTION1(POTION, DIVINE_BASTION_POTION1, 1), + DIVINE_BASTION2(POTION, DIVINE_BASTION_POTION2, 2), + DIVINE_BASTION3(POTION, DIVINE_BASTION_POTION3, 3), + DIVINE_BASTION4(POTION, DIVINE_BASTION_POTION4, 4), + DIVINE_BATTLEMAGE1(POTION, DIVINE_BATTLEMAGE_POTION1, 1), + DIVINE_BATTLEMAGE2(POTION, DIVINE_BATTLEMAGE_POTION2, 2), + DIVINE_BATTLEMAGE3(POTION, DIVINE_BATTLEMAGE_POTION3, 3), + DIVINE_BATTLEMAGE4(POTION, DIVINE_BATTLEMAGE_POTION4, 4), + DIVINE_MAGIC1(POTION, DIVINE_MAGIC_POTION1, 1), + DIVINE_MAGIC2(POTION, DIVINE_MAGIC_POTION2, 2), + DIVINE_MAGIC3(POTION, DIVINE_MAGIC_POTION3, 3), + DIVINE_MAGIC4(POTION, DIVINE_MAGIC_POTION4, 4), + DIVINE_RANGING1(POTION, DIVINE_RANGING_POTION1, 1), + DIVINE_RANGING2(POTION, DIVINE_RANGING_POTION2, 2), + DIVINE_RANGING3(POTION, DIVINE_RANGING_POTION3, 3), + DIVINE_RANGING4(POTION, DIVINE_RANGING_POTION4, 4), + DIVINE_SUPER_ATTACK1(POTION, DIVINE_SUPER_ATTACK_POTION1, 1), + DIVINE_SUPER_ATTACK2(POTION, DIVINE_SUPER_ATTACK_POTION2, 2), + DIVINE_SUPER_ATTACK3(POTION, DIVINE_SUPER_ATTACK_POTION3, 3), + DIVINE_SUPER_ATTACK4(POTION, DIVINE_SUPER_ATTACK_POTION4, 4), + DIVINE_SUPER_COMBAT1(POTION, DIVINE_SUPER_COMBAT_POTION1, 1), + DIVINE_SUPER_COMBAT2(POTION, DIVINE_SUPER_COMBAT_POTION2, 2), + DIVINE_SUPER_COMBAT3(POTION, DIVINE_SUPER_COMBAT_POTION3, 3), + DIVINE_SUPER_COMBAT4(POTION, DIVINE_SUPER_COMBAT_POTION4, 4), + DIVINE_SUPER_DEFENCE1(POTION, DIVINE_SUPER_DEFENCE_POTION1, 1), + DIVINE_SUPER_DEFENCE2(POTION, DIVINE_SUPER_DEFENCE_POTION2, 2), + DIVINE_SUPER_DEFENCE3(POTION, DIVINE_SUPER_DEFENCE_POTION3, 3), + DIVINE_SUPER_DEFENCE4(POTION, DIVINE_SUPER_DEFENCE_POTION4, 4), + DIVINE_SUPER_STRENGTH1(POTION, DIVINE_SUPER_STRENGTH_POTION1, 1), + DIVINE_SUPER_STRENGTH2(POTION, DIVINE_SUPER_STRENGTH_POTION2, 2), + DIVINE_SUPER_STRENGTH3(POTION, DIVINE_SUPER_STRENGTH_POTION3, 3), + DIVINE_SUPER_STRENGTH4(POTION, DIVINE_SUPER_STRENGTH_POTION4, 4), ELYRE1(TELEPORT, ENCHANTED_LYRE1, 1), ELYRE2(TELEPORT, ENCHANTED_LYRE2, 2), ELYRE3(TELEPORT, ENCHANTED_LYRE3, 3), ELYRE4(TELEPORT, ENCHANTED_LYRE4, 4), ELYRE5(TELEPORT, ENCHANTED_LYRE5, 5), + ENERGY1(POTION, ENERGY_POTION1, 1), + ENERGY2(POTION, ENERGY_POTION2, 2), + ENERGY3(POTION, ENERGY_POTION3, 3), + ENERGY4(POTION, ENERGY_POTION4, 4), + EXTENDED_ANTIFI1(POTION, EXTENDED_ANTIFIRE1, 1), + EXTENDED_ANTIFI2(POTION, EXTENDED_ANTIFIRE2, 2), + EXTENDED_ANTIFI3(POTION, EXTENDED_ANTIFIRE3, 3), + EXTENDED_ANTIFI4(POTION, EXTENDED_ANTIFIRE4, 4), + EXTENDED_SUPER_ANTI1(POTION, EXTENDED_SUPER_ANTIFIRE1, 1), + EXTENDED_SUPER_ANTI2(POTION, EXTENDED_SUPER_ANTIFIRE2, 2), + EXTENDED_SUPER_ANTI3(POTION, EXTENDED_SUPER_ANTIFIRE3, 3), + EXTENDED_SUPER_ANTI4(POTION, EXTENDED_SUPER_ANTIFIRE4, 4), + FISHING1(POTION, FISHING_POTION1, 1), + FISHING2(POTION, FISHING_POTION2, 2), + FISHING3(POTION, FISHING_POTION3, 3), + FISHING4(POTION, FISHING_POTION4, 4), FUNGICIDE0(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_0, 0), FUNGICIDE1(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_1, 1), FUNGICIDE2(FUNGICIDE_SPRAY, FUNGICIDE_SPRAY_2, 2), @@ -122,8 +231,28 @@ enum ItemWithCharge GLORYT4(TELEPORT, AMULET_OF_GLORY_T4, 4), GLORYT5(TELEPORT, AMULET_OF_GLORY_T5, 5), GLORYT6(TELEPORT, AMULET_OF_GLORY_T6, 6), + GREST1(GUTHIX_REST, GUTHIX_REST1, 1), + GREST2(GUTHIX_REST, GUTHIX_REST2, 2), + GREST3(GUTHIX_REST, GUTHIX_REST3, 3), + GREST4(GUTHIX_REST, GUTHIX_REST4, 4), + GUTHIX_BAL1(POTION, GUTHIX_BALANCE1, 1), + GUTHIX_BAL2(POTION, GUTHIX_BALANCE2, 2), + GUTHIX_BAL3(POTION, GUTHIX_BALANCE3, 3), + GUTHIX_BAL4(POTION, GUTHIX_BALANCE4, 4), + HUNTER1(POTION, HUNTER_POTION1, 1), + HUNTER2(POTION, HUNTER_POTION2, 2), + HUNTER3(POTION, HUNTER_POTION3, 3), + HUNTER4(POTION, HUNTER_POTION4, 4), IMP_IN_A_BOX1(IMPBOX, IMPINABOX1, 1), IMP_IN_A_BOX2(IMPBOX, IMPINABOX2, 2), + MAGIC1(POTION, MAGIC_POTION1, 1), + MAGIC2(POTION, MAGIC_POTION2, 2), + MAGIC3(POTION, MAGIC_POTION3, 3), + MAGIC4(POTION, MAGIC_POTION4, 4), + OVERLOAD1(POTION, OVERLOAD_1, 1), + OVERLOAD2(POTION, OVERLOAD_2, 2), + OVERLOAD3(POTION, OVERLOAD_3, 3), + OVERLOAD4(POTION, OVERLOAD_4, 4), PASSAGE1(TELEPORT, NECKLACE_OF_PASSAGE1, 1), PASSAGE2(TELEPORT, NECKLACE_OF_PASSAGE2, 2), PASSAGE3(TELEPORT, NECKLACE_OF_PASSAGE3, 3), @@ -137,6 +266,22 @@ enum ItemWithCharge PHARAO6(TELEPORT, PHARAOHS_SCEPTRE_6, 6), PHARAO7(TELEPORT, PHARAOHS_SCEPTRE_7, 7), PHARAO8(TELEPORT, PHARAOHS_SCEPTRE_8, 8), + PRAYER1(POTION, PRAYER_POTION1, 1), + PRAYER2(POTION, PRAYER_POTION2, 2), + PRAYER3(POTION, PRAYER_POTION3, 3), + PRAYER4(POTION, PRAYER_POTION4, 4), + RANGING1(POTION, RANGING_POTION1, 1), + RANGING2(POTION, RANGING_POTION2, 2), + RANGING3(POTION, RANGING_POTION3, 3), + RANGING4(POTION, RANGING_POTION4, 4), + RELICYMS1(POTION, RELICYMS_BALM1, 1), + RELICYMS2(POTION, RELICYMS_BALM2, 2), + RELICYMS3(POTION, RELICYMS_BALM3, 3), + RELICYMS4(POTION, RELICYMS_BALM4, 4), + RESTORE1(POTION, RESTORE_POTION1, 1), + RESTORE2(POTION, RESTORE_POTION2, 2), + RESTORE3(POTION, RESTORE_POTION3, 3), + RESTORE4(POTION, RESTORE_POTION4, 4), RETURNING1(TELEPORT, RING_OF_RETURNING1, 1), RETURNING2(TELEPORT, RING_OF_RETURNING2, 2), RETURNING3(TELEPORT, RING_OF_RETURNING3, 3), @@ -193,12 +338,72 @@ enum ItemWithCharge SACK_POTATOES8(SACK, POTATOES8, 8), SACK_POTATOES9(SACK, POTATOES9, 9), SACK_POTATOES10(SACK, POTATOES10, 10), + SANFEW1(POTION, SANFEW_SERUM1, 1), + SANFEW2(POTION, SANFEW_SERUM2, 2), + SANFEW3(POTION, SANFEW_SERUM3, 3), + SANFEW4(POTION, SANFEW_SERUM4, 4), + SARADOMIN_BR1(POTION, SARADOMIN_BREW1, 1), + SARADOMIN_BR2(POTION, SARADOMIN_BREW2, 2), + SARADOMIN_BR3(POTION, SARADOMIN_BREW3, 3), + SARADOMIN_BR4(POTION, SARADOMIN_BREW4, 4), + SERUM_2071(POTION, SERUM_207_1, 1), + SERUM_2072(POTION, SERUM_207_2, 2), + SERUM_2073(POTION, SERUM_207_3, 3), + SERUM_2074(POTION, SERUM_207_4, 4), + SERUM_2081(POTION, SERUM_208_1, 1), + SERUM_2082(POTION, SERUM_208_2, 2), + SERUM_2083(POTION, SERUM_208_3, 3), + SERUM_2084(POTION, SERUM_208_4, 4), SKILLS1(TELEPORT, SKILLS_NECKLACE1, 1), SKILLS2(TELEPORT, SKILLS_NECKLACE2, 2), SKILLS3(TELEPORT, SKILLS_NECKLACE3, 3), SKILLS4(TELEPORT, SKILLS_NECKLACE4, 4), SKILLS5(TELEPORT, SKILLS_NECKLACE5, 5), SKILLS6(TELEPORT, SKILLS_NECKLACE6, 6), + STAMINA1(POTION, STAMINA_POTION1, 1), + STAMINA2(POTION, STAMINA_POTION2, 2), + STAMINA3(POTION, STAMINA_POTION3, 3), + STAMINA4(POTION, STAMINA_POTION4, 4), + STRENGTH1(POTION, STRENGTH_POTION1, 1), + STRENGTH2(POTION, STRENGTH_POTION2, 2), + STRENGTH3(POTION, STRENGTH_POTION3, 3), + STRENGTH4(POTION, STRENGTH_POTION4, 4), + SUPERANTI1(POTION, SUPERANTIPOISON1, 1), + SUPERANTI2(POTION, SUPERANTIPOISON2, 2), + SUPERANTI3(POTION, SUPERANTIPOISON3, 3), + SUPERANTI4(POTION, SUPERANTIPOISON4, 4), + SUPER_ANTIFIRE1(POTION, SUPER_ANTIFIRE_POTION1, 1), + SUPER_ANTIFIRE2(POTION, SUPER_ANTIFIRE_POTION2, 2), + SUPER_ANTIFIRE3(POTION, SUPER_ANTIFIRE_POTION3, 3), + SUPER_ANTIFIRE4(POTION, SUPER_ANTIFIRE_POTION4, 4), + SUPER_ATT1(POTION, SUPER_ATTACK1, 1), + SUPER_ATT2(POTION, SUPER_ATTACK2, 2), + SUPER_ATT3(POTION, SUPER_ATTACK3, 3), + SUPER_ATT4(POTION, SUPER_ATTACK4, 4), + SUPER_COMB1(POTION, SUPER_COMBAT_POTION1, 1), + SUPER_COMB2(POTION, SUPER_COMBAT_POTION2, 2), + SUPER_COMB3(POTION, SUPER_COMBAT_POTION3, 3), + SUPER_COMB4(POTION, SUPER_COMBAT_POTION4, 4), + SUPER_DEF1(POTION, SUPER_DEFENCE1, 1), + SUPER_DEF2(POTION, SUPER_DEFENCE2, 2), + SUPER_DEF3(POTION, SUPER_DEFENCE3, 3), + SUPER_DEF4(POTION, SUPER_DEFENCE4, 4), + SUPER_ENERG1(POTION, SUPER_ENERGY1, 1), + SUPER_ENERG2(POTION, SUPER_ENERGY2, 2), + SUPER_ENERG3(POTION, SUPER_ENERGY3, 3), + SUPER_ENERG4(POTION, SUPER_ENERGY4, 4), + SUPER_MAG1(POTION, SUPER_MAGIC_POTION_1, 1), + SUPER_MAG2(POTION, SUPER_MAGIC_POTION_2, 2), + SUPER_MAG3(POTION, SUPER_MAGIC_POTION_3, 3), + SUPER_MAG4(POTION, SUPER_MAGIC_POTION_4, 4), + SUPER_RANG1(POTION, SUPER_RANGING_1, 1), + SUPER_RANG2(POTION, SUPER_RANGING_2, 2), + SUPER_RANG3(POTION, SUPER_RANGING_3, 3), + SUPER_RANG4(POTION, SUPER_RANGING_4, 4), + SUPER_REST1(POTION, SUPER_RESTORE1, 1), + SUPER_REST2(POTION, SUPER_RESTORE2, 2), + SUPER_REST3(POTION, SUPER_RESTORE3, 3), + SUPER_REST4(POTION, SUPER_RESTORE4, 4), TCRYSTAL1(TELEPORT, TELEPORT_CRYSTAL_1, 1), TCRYSTAL2(TELEPORT, TELEPORT_CRYSTAL_2, 2), TCRYSTAL3(TELEPORT, TELEPORT_CRYSTAL_3, 3), @@ -218,10 +423,11 @@ enum ItemWithCharge WSKIN2(WATERSKIN, WATERSKIN2, 2), WSKIN3(WATERSKIN, WATERSKIN3, 3), WSKIN4(WATERSKIN, WATERSKIN4, 4), - GREST1(GUTHIX_REST, GUTHIX_REST1, 1), - GREST2(GUTHIX_REST, GUTHIX_REST2, 2), - GREST3(GUTHIX_REST, GUTHIX_REST3, 3), - GREST4(GUTHIX_REST, GUTHIX_REST4, 4); + ZAMORAK_BR1(POTION, ZAMORAK_BREW1, 1), + ZAMORAK_BR2(POTION, ZAMORAK_BREW2, 2), + ZAMORAK_BR3(POTION, ZAMORAK_BREW3, 3), + ZAMORAK_BR4(POTION, ZAMORAK_BREW4, 4), + ; private final ItemChargeType type; private final int id; From 7c9e193f80cfca491909ec71bd9796198b807b5e Mon Sep 17 00:00:00 2001 From: Adam Date: Tue, 12 May 2020 20:43:15 -0400 Subject: [PATCH 02/13] client: add option to force client to front on notification --- .../java/net/runelite/client/Notifier.java | 9 ++- .../client/config/RequestFocusType.java | 32 ++++++++++ .../client/config/RuneLiteConfig.java | 6 +- .../plugins/devtools/DevToolsPanel.java | 9 ++- .../java/net/runelite/client/ui/ClientUI.java | 39 ++++++++++-- .../net/runelite/client/util/OSXUtil.java | 21 ++++--- .../net/runelite/client/util/WinUtil.java | 59 +++++++++++++++++++ 7 files changed, 155 insertions(+), 20 deletions(-) create mode 100644 runelite-client/src/main/java/net/runelite/client/config/RequestFocusType.java create mode 100644 runelite-client/src/main/java/net/runelite/client/util/WinUtil.java 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 cdb1d63cfe..ce5db852c1 100644 --- a/runelite-client/src/main/java/net/runelite/client/Notifier.java +++ b/runelite-client/src/main/java/net/runelite/client/Notifier.java @@ -160,9 +160,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 b9fa210bb9..b29a46a5df 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 @@ -150,12 +150,12 @@ 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 = 21 ) - default boolean requestFocusOnNotification() + default RequestFocusType notificationRequestFocus() { - return true; + return RequestFocusType.OFF; } @ConfigItem( diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/devtools/DevToolsPanel.java b/runelite-client/src/main/java/net/runelite/client/plugins/devtools/DevToolsPanel.java index 57a9906fc1..257c231077 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/devtools/DevToolsPanel.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/devtools/DevToolsPanel.java @@ -27,6 +27,8 @@ package net.runelite.client.plugins.devtools; import java.awt.GridLayout; import java.awt.TrayIcon; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; import javax.inject.Inject; import javax.swing.JButton; import javax.swing.JPanel; @@ -48,6 +50,7 @@ class DevToolsPanel extends PluginPanel private final VarInspector varInspector; private final ScriptInspector scriptInspector; private final InfoBoxManager infoBoxManager; + private final ScheduledExecutorService scheduledExecutorService; @Inject private DevToolsPanel( @@ -57,7 +60,8 @@ class DevToolsPanel extends PluginPanel VarInspector varInspector, ScriptInspector scriptInspector, Notifier notifier, - InfoBoxManager infoBoxManager) + InfoBoxManager infoBoxManager, + ScheduledExecutorService scheduledExecutorService) { super(); this.client = client; @@ -67,6 +71,7 @@ class DevToolsPanel extends PluginPanel this.scriptInspector = scriptInspector; this.notifier = notifier; this.infoBoxManager = infoBoxManager; + this.scheduledExecutorService = scheduledExecutorService; setBackground(ColorScheme.DARK_GRAY_COLOR); @@ -143,7 +148,7 @@ class DevToolsPanel extends PluginPanel final JButton notificationBtn = new JButton("Notification"); notificationBtn.addActionListener(e -> { - notifier.notify("Wow!", TrayIcon.MessageType.ERROR); + scheduledExecutorService.schedule(() -> notifier.notify("Wow!", TrayIcon.MessageType.ERROR), 3, TimeUnit.SECONDS); }); container.add(notificationBtn); 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 cb4257b79e..5c6f2b8fe5 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 @@ -65,9 +65,6 @@ import net.runelite.api.Constants; import net.runelite.api.GameState; import net.runelite.api.Player; import net.runelite.api.Point; -import net.runelite.client.eventbus.EventBus; -import net.runelite.client.events.ClientShutdown; -import net.runelite.client.events.ConfigChanged; import net.runelite.api.events.GameStateChanged; import net.runelite.api.widgets.Widget; import net.runelite.api.widgets.WidgetInfo; @@ -77,7 +74,10 @@ import net.runelite.client.config.ConfigManager; import net.runelite.client.config.ExpandResizeType; import net.runelite.client.config.RuneLiteConfig; import net.runelite.client.config.WarningOnExit; +import net.runelite.client.eventbus.EventBus; import net.runelite.client.eventbus.Subscribe; +import net.runelite.client.events.ClientShutdown; +import net.runelite.client.events.ConfigChanged; import net.runelite.client.events.NavigationButtonAdded; import net.runelite.client.events.NavigationButtonRemoved; import net.runelite.client.input.KeyManager; @@ -90,6 +90,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; @@ -663,12 +664,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(); + } + + giveClientFocus(); + } + + /** + * Attempt to forcibly bring the client frame to front + */ + public void forceFocus() + { + switch (OSType.getOSType()) + { + 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); + } +} From 4817d8bdcdccb84d814d399cbf30b04c0bc57289 Mon Sep 17 00:00:00 2001 From: Damen Date: Wed, 13 May 2020 16:34:46 -0400 Subject: [PATCH 03/13] screenshot plugin: block untradeable drops within the Gauntlet Co-authored-by: Jordan Atwood --- .../client/plugins/screenshot/ScreenshotPlugin.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java index 7d402bcafc..26a612456a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotPlugin.java @@ -94,6 +94,8 @@ public class ScreenshotPlugin extends Plugin { private static final String CHEST_LOOTED_MESSAGE = "You find some treasure in the chest!"; private static final Map CHEST_LOOT_EVENTS = ImmutableMap.of(12127, "The Gauntlet"); + private static final int GAUNTLET_REGION = 7512; + private static final int CORRUPTED_GAUNTLET_REGION = 7768; private static final Pattern NUMBER_PATTERN = Pattern.compile("([0-9]+)"); private static final Pattern LEVEL_UP_PATTERN = Pattern.compile(".*Your ([a-zA-Z]+) (?:level is|are)? now (\\d+)\\."); private static final Pattern BOSSKILL_MESSAGE_PATTERN = Pattern.compile("Your (.+) kill count is: (\\d+)."); @@ -401,7 +403,7 @@ public class ScreenshotPlugin extends Plugin } } - if (config.screenshotUntradeableDrop()) + if (config.screenshotUntradeableDrop() && !isInsideGauntlet()) { Matcher m = UNTRADEABLE_DROP_PATTERN.matcher(chatMessage); if (m.matches()) @@ -638,6 +640,14 @@ public class ScreenshotPlugin extends Plugin imageCapture.takeScreenshot(screenshot, fileName, subDir, config.notifyWhenTaken(), config.uploadScreenshot()); } + private boolean isInsideGauntlet() + { + return this.client.isInInstancedRegion() + && this.client.getMapRegions().length > 0 + && (this.client.getMapRegions()[0] == GAUNTLET_REGION + || this.client.getMapRegions()[0] == CORRUPTED_GAUNTLET_REGION); + } + @VisibleForTesting int getClueNumber() { From 9f8e967f91337993a676b9ed5ceb604073e58f1b Mon Sep 17 00:00:00 2001 From: Ron Young Date: Mon, 4 May 2020 14:58:42 -0500 Subject: [PATCH 04/13] object indicators: fix NPE thrown on logging in on a marked object --- .../plugins/objectindicators/ObjectIndicatorsPlugin.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java index 1d826d7641..8c9e326310 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/objectindicators/ObjectIndicatorsPlugin.java @@ -39,6 +39,7 @@ import java.util.List; import java.util.Map; import java.util.Set; import java.util.stream.Collectors; +import javax.annotation.Nullable; import javax.inject.Inject; import lombok.AccessLevel; import lombok.Getter; @@ -335,7 +336,8 @@ public class ObjectIndicatorsPlugin extends Plugin implements KeyListener && worldPoint.getPlane() == objectPoint.getZ()) { // Transform object to get the name which matches against what we've stored - if (objectPoint.getName().equals(getObjectComposition(object.getId()).getName())) + ObjectComposition composition = getObjectComposition(object.getId()); + if (composition != null && objectPoint.getName().equals(composition.getName())) { log.debug("Marking object {} due to matching {}", object, objectPoint); objects.add(new ColorTileObject(object, objectPoint.getColor())); @@ -494,6 +496,7 @@ public class ObjectIndicatorsPlugin extends Plugin implements KeyListener .collect(Collectors.toSet()); } + @Nullable private ObjectComposition getObjectComposition(int id) { ObjectComposition objectComposition = client.getObjectDefinition(id); From 473d7f45c39e875956d58a7143bd2e7b4e196606 Mon Sep 17 00:00:00 2001 From: Kyle Shepherd Date: Wed, 13 May 2020 22:06:50 +0100 Subject: [PATCH 05/13] itemidentification: Change Combat Potion short name from 'D' to 'C' (#11566) --- .../client/plugins/itemidentification/ItemIdentification.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java index 98f38605eb..47b852277b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/itemidentification/ItemIdentification.java @@ -126,7 +126,7 @@ enum ItemIdentification ATTACK(Type.POTION, "Att", "A", ItemID.ATTACK_POTION4, ItemID.ATTACK_POTION3, ItemID.ATTACK_POTION2, ItemID.ATTACK_POTION1), STRENGTH(Type.POTION, "Str", "S", ItemID.STRENGTH_POTION4, ItemID.STRENGTH_POTION3, ItemID.STRENGTH_POTION2, ItemID.STRENGTH_POTION1), DEFENCE(Type.POTION, "Def", "D", ItemID.DEFENCE_POTION4, ItemID.DEFENCE_POTION3, ItemID.DEFENCE_POTION2, ItemID.DEFENCE_POTION1), - COMBAT(Type.POTION, "Com", "D", ItemID.COMBAT_POTION4, ItemID.COMBAT_POTION3, ItemID.COMBAT_POTION2, ItemID.COMBAT_POTION1), + COMBAT(Type.POTION, "Com", "C", ItemID.COMBAT_POTION4, ItemID.COMBAT_POTION3, ItemID.COMBAT_POTION2, ItemID.COMBAT_POTION1), MAGIC(Type.POTION, "Magic", "M", ItemID.MAGIC_POTION4, ItemID.MAGIC_POTION3, ItemID.MAGIC_POTION2, ItemID.MAGIC_POTION1), RANGING(Type.POTION, "Range", "R", ItemID.RANGING_POTION4, ItemID.RANGING_POTION3, ItemID.RANGING_POTION2, ItemID.RANGING_POTION1), BASTION(Type.POTION, "Bastion", "B", ItemID.BASTION_POTION4, ItemID.BASTION_POTION3, ItemID.BASTION_POTION2, ItemID.BASTION_POTION1), From 7dba7b58e6f5f732b2a9291112b17f7565e6833b Mon Sep 17 00:00:00 2001 From: bfmoatbio <64886905+bfmoatbio@users.noreply.github.com> Date: Wed, 13 May 2020 23:47:31 -0700 Subject: [PATCH 06/13] menu manager: Remove bounty hunter emblem text from player name (#11541) --- .../main/java/net/runelite/api/IconID.java | 3 +- .../runelite/client/menus/MenuManager.java | 12 ++- .../client/menus/MenuManagerTest.java | 95 +++++++++++++++++++ 3 files changed, 107 insertions(+), 3 deletions(-) create mode 100644 runelite-client/src/test/java/net/runelite/client/menus/MenuManagerTest.java 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 7874179a3f..cbc896ca4b 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-client/src/main/java/net/runelite/client/menus/MenuManager.java b/runelite-client/src/main/java/net/runelite/client/menus/MenuManager.java index 863e58ea10..5566e31247 100644 --- a/runelite-client/src/main/java/net/runelite/client/menus/MenuManager.java +++ b/runelite-client/src/main/java/net/runelite/client/menus/MenuManager.java @@ -24,6 +24,7 @@ */ package net.runelite.client.menus; +import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Preconditions; import com.google.common.collect.HashMultimap; import com.google.common.collect.Multimap; @@ -33,10 +34,12 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; +import java.util.regex.Pattern; import javax.inject.Inject; import javax.inject.Singleton; import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; +import net.runelite.api.IconID; import net.runelite.api.MenuAction; import net.runelite.api.MenuEntry; import net.runelite.api.NPCComposition; @@ -61,6 +64,8 @@ public class MenuManager private static final int IDX_LOWER = 4; private static final int IDX_UPPER = 8; + private static final Pattern BOUNTY_EMBLEM_TAG_AND_TIER_REGEXP = Pattern.compile(String.format("%s[1-9]0?", IconID.BOUNTY_HUNTER_EMBLEM.toString())); + private final Client client; private final EventBus eventBus; @@ -71,7 +76,8 @@ public class MenuManager private final Set npcMenuOptions = new HashSet<>(); @Inject - private MenuManager(Client client, EventBus eventBus) + @VisibleForTesting + MenuManager(Client client, EventBus eventBus) { this.client = client; this.eventBus = eventBus; @@ -269,7 +275,9 @@ public class MenuManager } } - String target = event.getMenuTarget(); + // removes bounty hunter emblem tag and tier from player name, e.g: + // "username5 (level-42)" -> "username (level-42)" + String target = BOUNTY_EMBLEM_TAG_AND_TIER_REGEXP.matcher(event.getMenuTarget()).replaceAll(""); // removes tags and level from player names for example: // username (level-42) or username 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("username5 (level-42)"); + + menuManager.onMenuOptionClicked(event); + + ArgumentCaptor captor = ArgumentCaptor.forClass(PlayerMenuOptionClicked.class); + verify(eventBus).post(captor.capture()); + PlayerMenuOptionClicked clicked = captor.getValue(); + assertEquals("username", clicked.getMenuTarget()); + } +} From 9b71421535b27bb50be275874c8d56eac7541cbb Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 14 May 2020 10:32:23 +0000 Subject: [PATCH 07/13] Update Item IDs to 2020-05-14-rev182 --- runelite-api/src/main/java/net/runelite/api/ItemID.java | 5 ++++- runelite-api/src/main/java/net/runelite/api/NullItemID.java | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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 2d24ccac23..f5eb3c41d1 100644 --- a/runelite-api/src/main/java/net/runelite/api/ItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/ItemID.java @@ -11455,7 +11455,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; @@ -11467,5 +11467,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/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. */ } From 24c87178fd28610b413c86f2257335d79b55424f Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 14 May 2020 10:32:24 +0000 Subject: [PATCH 08/13] Update Item variations to 2020-05-14-rev182 --- runelite-client/src/main/resources/item_variations.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/runelite-client/src/main/resources/item_variations.json b/runelite-client/src/main/resources/item_variations.json index d347c95b77..6985b3678d 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, From 3cf31b121b2f3e918a50c99b5eadc6debac0447d Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 14 May 2020 10:32:24 +0000 Subject: [PATCH 09/13] Update Object IDs to 2020-05-14-rev182 --- .../java/net/runelite/api/NullObjectID.java | 2 + .../main/java/net/runelite/api/ObjectID.java | 43 +++++++++++++++++++ 2 files changed, 45 insertions(+) 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. */ } From 0f6255e8271e1c7934950aaf5d4288abe72eb36f Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 14 May 2020 10:32:24 +0000 Subject: [PATCH 10/13] Update Script arguments to 2020-05-14-rev182 --- runelite-api/src/main/java/net/runelite/api/ScriptID.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 c5f167343d..7eecb413b4 100644 --- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java +++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java @@ -272,7 +272,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; /** From 9ec2e9d8c2c40661161751aa79c4a88614187b02 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 14 May 2020 10:32:24 +0000 Subject: [PATCH 11/13] Update NPC IDs to 2020-05-14-rev182 --- .../src/main/java/net/runelite/api/NpcID.java | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) 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. */ } From 37e721f92069ac6e95606024453e53ea82cd09b7 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 14 May 2020 10:32:29 +0000 Subject: [PATCH 12/13] Update Widget IDs to 2020-05-14-rev182 --- .../net/runelite/api/widgets/WidgetID.java | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) 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 8b93e7a4dc..479251c5f6 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 @@ -161,7 +161,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; } @@ -251,19 +251,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 @@ -472,11 +472,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 From e6947be044aff1d8f7f8c82895c220f1e55f1d66 Mon Sep 17 00:00:00 2001 From: RuneLite Cache-Code Autoupdater Date: Thu, 14 May 2020 10:32:34 +0000 Subject: [PATCH 13/13] Update Scripts to 2020-05-14-rev182 Updated script does not assemble BankSearchLayout.rs2asm --- .../src/main/scripts/BankSearchLayout.hash | 2 +- .../src/main/scripts/BankSearchLayout.rs2asm | 575 +++++++++--------- .../src/main/scripts/ChatBuilder.hash | 2 +- .../src/main/scripts/ChatBuilder.rs2asm | 46 +- .../scripts/ChatboxInputWidgetBuilder.hash | 2 +- .../scripts/ChatboxInputWidgetBuilder.rs2asm | 36 +- .../src/main/scripts/CommandScript.hash | 2 +- .../src/main/scripts/CommandScript.rs2asm | 4 +- .../src/main/scripts/ResetChatboxInput.hash | 2 +- .../src/main/scripts/ResetChatboxInput.rs2asm | 21 +- .../scripts/ToplevelChatboxBackground.hash | 2 +- .../scripts/ToplevelChatboxBackground.rs2asm | 26 +- .../src/main/scripts/TriggerBankLayout.hash | 2 +- .../src/main/scripts/TriggerBankLayout.rs2asm | 5 +- 14 files changed, 368 insertions(+), 359 deletions(-) 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 067e8fcbe1..fa6303763f 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,78 +831,80 @@ LABEL720: 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 -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 @@ -910,64 +912,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 @@ -979,8 +982,8 @@ SetTitleRomanNumeral: runelite_callback ; iload 5 if_settext - jump FinishBuilding -SetTitleNumber: + jump LABEL864 +LABEL858: sconst "Tab " get_varbit 4150 tostring @@ -988,8 +991,9 @@ SetTitleNumber: sconst "setBankTitle" ; runelite_callback ; iload 5 - if_settext + if_settext FinishBuilding: +LABEL864: iload 0 iload 1 iload 2 @@ -1002,11 +1006,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 87efb971c6..891283dc61 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