diff --git a/cache/pom.xml b/cache/pom.xml index ad8f7224bc..43ff28de20 100644 --- a/cache/pom.xml +++ b/cache/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.22 + 1.10.23.1 cache diff --git a/pom.xml b/pom.xml index bf3f42c96c..cdbee2251b 100644 --- a/pom.xml +++ b/pom.xml @@ -28,7 +28,7 @@ net.runelite runelite-parent - 1.10.22 + 1.10.23.1 pom RuneLite @@ -65,7 +65,7 @@ https://github.com/runelite/runelite scm:git:git://github.com/runelite/runelite scm:git:git@github.com:runelite/runelite - runelite-parent-1.10.22 + runelite-parent-1.10.23.1 diff --git a/runelite-api/pom.xml b/runelite-api/pom.xml index 7a3005d7ea..ab398f0575 100644 --- a/runelite-api/pom.xml +++ b/runelite-api/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.22 + 1.10.23.1 runelite-api diff --git a/runelite-api/src/main/interfaces/interfaces.toml b/runelite-api/src/main/interfaces/interfaces.toml index b4e53cf219..96cf46059c 100644 --- a/runelite-api/src/main/interfaces/interfaces.toml +++ b/runelite-api/src/main/interfaces/interfaces.toml @@ -71,6 +71,12 @@ settings_button=113 equipment_button=114 popup=116 +[bank_equipment] +id=12 +parent=69 +set_bonus=109 +stat_bonus=121 + [bank_inventory] id=15 item_container=3 @@ -290,6 +296,12 @@ emote_scrollbar=4 id=387 inventory_item_container=0 +[equipment_bonuses] +id=84 +parent=1 +set_bonus=43 +stat_bonus=48 + [equipment_inventory] id=85 diff --git a/runelite-api/src/main/java/net/runelite/api/Client.java b/runelite-api/src/main/java/net/runelite/api/Client.java index a3b2eb4d56..d94aa3382f 100644 --- a/runelite-api/src/main/java/net/runelite/api/Client.java +++ b/runelite-api/src/main/java/net/runelite/api/Client.java @@ -558,7 +558,7 @@ public interface Client extends OAuthApi, GameEngine /** * Gets the widget that is being dragged on. *

- * The widget being dragged has the {@link net.runelite.api.widgets.WidgetConfig#DRAG_ON} + * The widget being dragged has the {@link net.runelite.api.widgets.WidgetConfig#DRAG} * flag set, and is the widget currently under the dragged widget. * * @return the dragged on widget, null if not dragging any widget @@ -1501,6 +1501,19 @@ Projectile createProjectile(int id, int plane, int startX, int startY, int start */ void setCameraPitchTarget(int cameraPitchTarget); + /** + * Sets the camera speed + * @param speed + */ + void setCameraSpeed(float speed); + + /** + * Sets the mask for which mouse buttons control the camera. + * Use 0 for the default behavior of mouse button 4 if "middle mouse moves camera" is on. + * @param mask + */ + void setCameraMouseButtonMask(int mask); + /** * Sets whether the camera pitch can exceed the normal limits set * by the RuneScape client. 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 0c31fc1f49..5c1f7c5b69 100644 --- a/runelite-api/src/main/java/net/runelite/api/ItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/ItemID.java @@ -6885,7 +6885,6 @@ public final class ItemID public static final int DREAMY_LAMP = 11157; public static final int CYRISUSS_CHEST = 11158; public static final int HUNTER_KIT = 11159; - public static final int RESTORED_SHIELD = 11164; public static final int PHOENIX_CROSSBOW_11165 = 11165; public static final int PHOENIX_CROSSBOW_11167 = 11167; public static final int NEWSPAPER = 11169; @@ -13668,5 +13667,19 @@ public final class ItemID public static final int SCURRIUS_SPINE = 28798; public static final int ANTIQUE_LAMP_28800 = 28800; public static final int SCURRY = 28801; + public static final int GRUBBY_KEY_28803 = 28803; + public static final int BOTTLE = 28804; + public static final int BOTTLE_OF_MIST = 28805; + public static final int IMBUED_BARRONITE = 28806; + public static final int SHIELD_OF_ARRAV = 28807; + public static final int LIST_OF_ELDERS = 28808; + public static final int ELIAS_WHITE = 28809; + public static final int ZOMBIE_AXE = 28810; + public static final int BROKEN_ZOMBIE_AXE = 28813; + public static final int STONE_TABLET_28816 = 28816; + public static final int GRANITE_TABLET = 28817; + public static final int SLATE_TABLET = 28818; + public static final int SHALE_TABLET = 28819; + public static final int ANTIQUE_LAMP_28820 = 28820; /* 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 a91736186f..9885dd6aa9 100644 --- a/runelite-api/src/main/java/net/runelite/api/NpcID.java +++ b/runelite-api/src/main/java/net/runelite/api/NpcID.java @@ -6248,8 +6248,7 @@ public final class NpcID public static final int RICHARD_6954 = 6954; public static final int FATHER_JEAN = 6955; public static final int MONK_6956 = 6956; - public static final int CHIEF_FARMER = 6957; - public static final int FARMERS_WIFE = 6958; + public static final int DALE = 6957; public static final int FARMER_6959 = 6959; public static final int FARMER_6960 = 6960; public static final int FARMER_6961 = 6961; @@ -10133,7 +10132,6 @@ public final class NpcID public static final int ALI_THE_TEA_SELLER = 12102; public static final int MORGIANA = 12103; public static final int CASSIM = 12104; - public static final int ELIAS_WHITE = 12105; public static final int SKELETON_HELLHOUND_12107 = 12107; public static final int GREATER_SKELETON_HELLHOUND_12108 = 12108; public static final int TOOL_LEPRECHAUN_12109 = 12109; @@ -10573,6 +10571,25 @@ public final class NpcID public static final int GOOSE_12605 = 12605; public static final int LAVA_DRAGON_12607 = 12607; public static final int LAVA_DRAGON_12608 = 12608; + public static final int ELIAS_WHITE = 12610; + public static final int ELIAS_WHITE_12611 = 12611; + public static final int ARRAV = 12612; + public static final int ARRAV_12613 = 12613; + public static final int ZEMOUREGAL = 12614; + public static final int ZEMOUREGAL_12615 = 12615; + public static final int SHARATHTEERK = 12617; + public static final int MONK_OF_ZAMORAK_12618 = 12618; + public static final int MONK_OF_ZAMORAK_12619 = 12619; + public static final int AEONISIG_RAISPHER_12620 = 12620; + public static final int KING_ROALD_12621 = 12621; + public static final int SIR_PRYSIN_12622 = 12622; + public static final int AMBASSADOR_FERRNOOK_12623 = 12623; + public static final int QUEEN_ELLAMARIA_12624 = 12624; + public static final int QUEEN_ELLAMARIA_12625 = 12625; + public static final int RELDO_12626 = 12626; + public static final int CAPTAIN_ROVIN_12627 = 12627; + public static final int TREZNOR_12628 = 12628; + public static final int DIMINTHEIS_12629 = 12629; public static final int TRADER_STAN_12630 = 12630; public static final int TRADER_STAN_12631 = 12631; public static final int TRADER_CREWMEMBER_12632 = 12632; @@ -10656,5 +10673,52 @@ public final class NpcID public static final int DWARF_12710 = 12710; public static final int DWARF_12711 = 12711; public static final int DWARF_12712 = 12712; + public static final int GUARD_12713 = 12713; + public static final int GUARD_12714 = 12714; + public static final int GUARD_12715 = 12715; + public static final int GUARD_12716 = 12716; + public static final int GUARD_12717 = 12717; + public static final int GUARD_12718 = 12718; + public static final int GUARD_12719 = 12719; + public static final int ARMOURED_ZOMBIE = 12720; + public static final int ARMOURED_ZOMBIE_12721 = 12721; + public static final int ARMOURED_ZOMBIE_12722 = 12722; + public static final int ARMOURED_ZOMBIE_12723 = 12723; + public static final int ARMOURED_ZOMBIE_12724 = 12724; + public static final int ARMOURED_ZOMBIE_12725 = 12725; + public static final int ARMOURED_ZOMBIE_12726 = 12726; + public static final int ARMOURED_ZOMBIE_12727 = 12727; + public static final int ARMOURED_ZOMBIE_12728 = 12728; + public static final int ARMOURED_ZOMBIE_12729 = 12729; + public static final int ARMOURED_ZOMBIE_12730 = 12730; + public static final int ARMOURED_ZOMBIE_12731 = 12731; + public static final int ARMOURED_ZOMBIE_12732 = 12732; + public static final int ARMOURED_ZOMBIE_12733 = 12733; + public static final int ARMOURED_ZOMBIE_12734 = 12734; + public static final int ARMOURED_ZOMBIE_12735 = 12735; + public static final int ARMOURED_ZOMBIE_12736 = 12736; + public static final int ARMOURED_ZOMBIE_12737 = 12737; + public static final int ARMOURED_ZOMBIE_12738 = 12738; + public static final int ARMOURED_ZOMBIE_12739 = 12739; + public static final int ARMOURED_ZOMBIE_12740 = 12740; + public static final int ARMOURED_ZOMBIE_12741 = 12741; + public static final int ARMOURED_ZOMBIE_12742 = 12742; + public static final int ARMOURED_ZOMBIE_12743 = 12743; + public static final int ARMOURED_ZOMBIE_12744 = 12744; + public static final int ARMOURED_ZOMBIE_12745 = 12745; + public static final int ARMOURED_ZOMBIE_12746 = 12746; + public static final int ARMOURED_ZOMBIE_12747 = 12747; + public static final int ARMOURED_ZOMBIE_12748 = 12748; + public static final int ARMOURED_ZOMBIE_12749 = 12749; + public static final int ARMOURED_ZOMBIE_12755 = 12755; + public static final int ARMOURED_ZOMBIE_12756 = 12756; + public static final int ARMOURED_ZOMBIE_12757 = 12757; + public static final int ARMOURED_ZOMBIE_12758 = 12758; + public static final int ARMOURED_ZOMBIE_12759 = 12759; + public static final int ARMOURED_ZOMBIE_12760 = 12760; + public static final int ARMOURED_ZOMBIE_12761 = 12761; + public static final int ARMOURED_ZOMBIE_12762 = 12762; + public static final int ARMOURED_ZOMBIE_12763 = 12763; + public static final int ARMOURED_ZOMBIE_12764 = 12764; /* 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 807a8ee790..124f3056d8 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullItemID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullItemID.java @@ -4164,6 +4164,7 @@ public final class NullItemID public static final int NULL_11161 = 11161; public static final int NULL_11162 = 11162; public static final int NULL_11163 = 11163; + public static final int NULL_11164 = 11164; public static final int NULL_11166 = 11166; public static final int NULL_11168 = 11168; public static final int NULL_11170 = 11170; @@ -14924,5 +14925,9 @@ public final class NullItemID public static final int NULL_28797 = 28797; public static final int NULL_28799 = 28799; public static final int NULL_28802 = 28802; + public static final int NULL_28811 = 28811; + public static final int NULL_28812 = 28812; + public static final int NULL_28814 = 28814; + public static final int NULL_28815 = 28815; /* This file is automatically generated. Do not edit. */ } diff --git a/runelite-api/src/main/java/net/runelite/api/NullNpcID.java b/runelite-api/src/main/java/net/runelite/api/NullNpcID.java index 88b9e1dd4d..cbf6b40200 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullNpcID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullNpcID.java @@ -697,6 +697,7 @@ public final class NullNpcID public static final int NULL_6924 = 6924; public static final int NULL_6925 = 6925; public static final int NULL_6946 = 6946; + public static final int NULL_6958 = 6958; public static final int NULL_7016 = 7016; public static final int NULL_7017 = 7017; public static final int NULL_7070 = 7070; @@ -1953,6 +1954,7 @@ public final class NullNpcID public static final int NULL_12039 = 12039; public static final int NULL_12042 = 12042; public static final int NULL_12083 = 12083; + public static final int NULL_12105 = 12105; public static final int NULL_12106 = 12106; public static final int NULL_12119 = 12119; public static final int NULL_12136 = 12136; @@ -2018,5 +2020,11 @@ public final class NullNpcID public static final int NULL_12596 = 12596; public static final int NULL_12606 = 12606; public static final int NULL_12609 = 12609; + public static final int NULL_12616 = 12616; + public static final int NULL_12750 = 12750; + public static final int NULL_12751 = 12751; + public static final int NULL_12752 = 12752; + public static final int NULL_12753 = 12753; + public static final int NULL_12754 = 12754; /* 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 503eb7fef1..b6e89ef1fb 100644 --- a/runelite-api/src/main/java/net/runelite/api/NullObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/NullObjectID.java @@ -25437,10 +25437,17 @@ public final class NullObjectID public static final int NULL_50026 = 50026; public static final int NULL_50027 = 50027; public static final int NULL_50028 = 50028; + public static final int NULL_50029 = 50029; + public static final int NULL_50030 = 50030; + public static final int NULL_50031 = 50031; + public static final int NULL_50032 = 50032; + public static final int NULL_50033 = 50033; + public static final int NULL_50037 = 50037; public static final int NULL_50038 = 50038; public static final int NULL_50039 = 50039; public static final int NULL_50040 = 50040; public static final int NULL_50041 = 50041; + public static final int NULL_50045 = 50045; public static final int NULL_50054 = 50054; public static final int NULL_50055 = 50055; public static final int NULL_50056 = 50056; @@ -25452,5 +25459,363 @@ public final class NullObjectID public static final int NULL_50069 = 50069; public static final int NULL_50070 = 50070; public static final int NULL_50071 = 50071; + public static final int NULL_50075 = 50075; + public static final int NULL_50076 = 50076; + public static final int NULL_50077 = 50077; + public static final int NULL_50098 = 50098; + public static final int NULL_50099 = 50099; + public static final int NULL_50100 = 50100; + public static final int NULL_50101 = 50101; + public static final int NULL_50102 = 50102; + public static final int NULL_50103 = 50103; + public static final int NULL_50104 = 50104; + public static final int NULL_50105 = 50105; + public static final int NULL_50106 = 50106; + public static final int NULL_50107 = 50107; + public static final int NULL_50108 = 50108; + public static final int NULL_50109 = 50109; + public static final int NULL_50110 = 50110; + public static final int NULL_50111 = 50111; + public static final int NULL_50119 = 50119; + public static final int NULL_50120 = 50120; + public static final int NULL_50121 = 50121; + public static final int NULL_50128 = 50128; + public static final int NULL_50129 = 50129; + public static final int NULL_50130 = 50130; + public static final int NULL_50144 = 50144; + public static final int NULL_50156 = 50156; + public static final int NULL_50163 = 50163; + public static final int NULL_50164 = 50164; + public static final int NULL_50165 = 50165; + public static final int NULL_50166 = 50166; + public static final int NULL_50167 = 50167; + public static final int NULL_50168 = 50168; + public static final int NULL_50169 = 50169; + public static final int NULL_50170 = 50170; + public static final int NULL_50171 = 50171; + public static final int NULL_50172 = 50172; + public static final int NULL_50173 = 50173; + public static final int NULL_50174 = 50174; + public static final int NULL_50175 = 50175; + public static final int NULL_50176 = 50176; + public static final int NULL_50177 = 50177; + public static final int NULL_50178 = 50178; + public static final int NULL_50179 = 50179; + public static final int NULL_50180 = 50180; + public static final int NULL_50181 = 50181; + public static final int NULL_50182 = 50182; + public static final int NULL_50183 = 50183; + public static final int NULL_50184 = 50184; + public static final int NULL_50185 = 50185; + public static final int NULL_50186 = 50186; + public static final int NULL_50187 = 50187; + public static final int NULL_50188 = 50188; + public static final int NULL_50189 = 50189; + public static final int NULL_50190 = 50190; + public static final int NULL_50191 = 50191; + public static final int NULL_50192 = 50192; + public static final int NULL_50193 = 50193; + public static final int NULL_50194 = 50194; + public static final int NULL_50195 = 50195; + public static final int NULL_50196 = 50196; + public static final int NULL_50197 = 50197; + public static final int NULL_50198 = 50198; + public static final int NULL_50199 = 50199; + public static final int NULL_50200 = 50200; + public static final int NULL_50212 = 50212; + public static final int NULL_50213 = 50213; + public static final int NULL_50214 = 50214; + public static final int NULL_50215 = 50215; + public static final int NULL_50216 = 50216; + public static final int NULL_50217 = 50217; + public static final int NULL_50218 = 50218; + public static final int NULL_50219 = 50219; + public static final int NULL_50220 = 50220; + public static final int NULL_50221 = 50221; + public static final int NULL_50222 = 50222; + public static final int NULL_50223 = 50223; + public static final int NULL_50224 = 50224; + public static final int NULL_50225 = 50225; + public static final int NULL_50226 = 50226; + public static final int NULL_50227 = 50227; + public static final int NULL_50228 = 50228; + public static final int NULL_50229 = 50229; + public static final int NULL_50231 = 50231; + public static final int NULL_50232 = 50232; + public static final int NULL_50233 = 50233; + public static final int NULL_50234 = 50234; + public static final int NULL_50235 = 50235; + public static final int NULL_50236 = 50236; + public static final int NULL_50237 = 50237; + public static final int NULL_50238 = 50238; + public static final int NULL_50239 = 50239; + public static final int NULL_50240 = 50240; + public static final int NULL_50241 = 50241; + public static final int NULL_50242 = 50242; + public static final int NULL_50243 = 50243; + public static final int NULL_50244 = 50244; + public static final int NULL_50245 = 50245; + public static final int NULL_50246 = 50246; + public static final int NULL_50247 = 50247; + public static final int NULL_50248 = 50248; + public static final int NULL_50249 = 50249; + public static final int NULL_50250 = 50250; + public static final int NULL_50251 = 50251; + public static final int NULL_50252 = 50252; + public static final int NULL_50258 = 50258; + public static final int NULL_50259 = 50259; + public static final int NULL_50262 = 50262; + public static final int NULL_50263 = 50263; + public static final int NULL_50264 = 50264; + public static final int NULL_50265 = 50265; + public static final int NULL_50274 = 50274; + public static final int NULL_50275 = 50275; + public static final int NULL_50276 = 50276; + public static final int NULL_50277 = 50277; + public static final int NULL_50278 = 50278; + public static final int NULL_50279 = 50279; + public static final int NULL_50280 = 50280; + public static final int NULL_50281 = 50281; + public static final int NULL_50283 = 50283; + public static final int NULL_50284 = 50284; + public static final int NULL_50285 = 50285; + public static final int NULL_50286 = 50286; + public static final int NULL_50287 = 50287; + public static final int NULL_50288 = 50288; + public static final int NULL_50292 = 50292; + public static final int NULL_50293 = 50293; + public static final int NULL_50302 = 50302; + public static final int NULL_50303 = 50303; + public static final int NULL_50304 = 50304; + public static final int NULL_50305 = 50305; + public static final int NULL_50306 = 50306; + public static final int NULL_50307 = 50307; + public static final int NULL_50308 = 50308; + public static final int NULL_50309 = 50309; + public static final int NULL_50310 = 50310; + public static final int NULL_50311 = 50311; + public static final int NULL_50356 = 50356; + public static final int NULL_50357 = 50357; + public static final int NULL_50358 = 50358; + public static final int NULL_50359 = 50359; + public static final int NULL_50360 = 50360; + public static final int NULL_50361 = 50361; + public static final int NULL_50362 = 50362; + public static final int NULL_50363 = 50363; + public static final int NULL_50364 = 50364; + public static final int NULL_50365 = 50365; + public static final int NULL_50366 = 50366; + public static final int NULL_50367 = 50367; + public static final int NULL_50368 = 50368; + public static final int NULL_50369 = 50369; + public static final int NULL_50370 = 50370; + public static final int NULL_50371 = 50371; + public static final int NULL_50372 = 50372; + public static final int NULL_50373 = 50373; + public static final int NULL_50374 = 50374; + public static final int NULL_50375 = 50375; + public static final int NULL_50380 = 50380; + public static final int NULL_50381 = 50381; + public static final int NULL_50382 = 50382; + public static final int NULL_50383 = 50383; + public static final int NULL_50384 = 50384; + public static final int NULL_50385 = 50385; + public static final int NULL_50386 = 50386; + public static final int NULL_50387 = 50387; + public static final int NULL_50388 = 50388; + public static final int NULL_50389 = 50389; + public static final int NULL_50390 = 50390; + public static final int NULL_50391 = 50391; + public static final int NULL_50397 = 50397; + public static final int NULL_50398 = 50398; + public static final int NULL_50399 = 50399; + public static final int NULL_50400 = 50400; + public static final int NULL_50401 = 50401; + public static final int NULL_50402 = 50402; + public static final int NULL_50403 = 50403; + public static final int NULL_50404 = 50404; + public static final int NULL_50410 = 50410; + public static final int NULL_50423 = 50423; + public static final int NULL_50424 = 50424; + public static final int NULL_50427 = 50427; + public static final int NULL_50428 = 50428; + public static final int NULL_50429 = 50429; + public static final int NULL_50430 = 50430; + public static final int NULL_50431 = 50431; + public static final int NULL_50432 = 50432; + public static final int NULL_50433 = 50433; + public static final int NULL_50434 = 50434; + public static final int NULL_50435 = 50435; + public static final int NULL_50436 = 50436; + public static final int NULL_50437 = 50437; + public static final int NULL_50438 = 50438; + public static final int NULL_50439 = 50439; + public static final int NULL_50440 = 50440; + public static final int NULL_50441 = 50441; + public static final int NULL_50442 = 50442; + public static final int NULL_50443 = 50443; + public static final int NULL_50444 = 50444; + public static final int NULL_50445 = 50445; + public static final int NULL_50446 = 50446; + public static final int NULL_50447 = 50447; + public static final int NULL_50448 = 50448; + public static final int NULL_50449 = 50449; + public static final int NULL_50450 = 50450; + public static final int NULL_50451 = 50451; + public static final int NULL_50452 = 50452; + public static final int NULL_50453 = 50453; + public static final int NULL_50454 = 50454; + public static final int NULL_50455 = 50455; + public static final int NULL_50456 = 50456; + public static final int NULL_50457 = 50457; + public static final int NULL_50458 = 50458; + public static final int NULL_50459 = 50459; + public static final int NULL_50460 = 50460; + public static final int NULL_50461 = 50461; + public static final int NULL_50462 = 50462; + public static final int NULL_50463 = 50463; + public static final int NULL_50464 = 50464; + public static final int NULL_50465 = 50465; + public static final int NULL_50466 = 50466; + public static final int NULL_50467 = 50467; + public static final int NULL_50468 = 50468; + public static final int NULL_50469 = 50469; + public static final int NULL_50470 = 50470; + public static final int NULL_50471 = 50471; + public static final int NULL_50472 = 50472; + public static final int NULL_50473 = 50473; + public static final int NULL_50474 = 50474; + public static final int NULL_50475 = 50475; + public static final int NULL_50476 = 50476; + public static final int NULL_50477 = 50477; + public static final int NULL_50478 = 50478; + public static final int NULL_50479 = 50479; + public static final int NULL_50480 = 50480; + public static final int NULL_50481 = 50481; + public static final int NULL_50482 = 50482; + public static final int NULL_50483 = 50483; + public static final int NULL_50484 = 50484; + public static final int NULL_50485 = 50485; + public static final int NULL_50486 = 50486; + public static final int NULL_50487 = 50487; + public static final int NULL_50488 = 50488; + public static final int NULL_50489 = 50489; + public static final int NULL_50490 = 50490; + public static final int NULL_50491 = 50491; + public static final int NULL_50492 = 50492; + public static final int NULL_50493 = 50493; + public static final int NULL_50494 = 50494; + public static final int NULL_50496 = 50496; + public static final int NULL_50497 = 50497; + public static final int NULL_50515 = 50515; + public static final int NULL_50519 = 50519; + public static final int NULL_50520 = 50520; + public static final int NULL_50527 = 50527; + public static final int NULL_50536 = 50536; + public static final int NULL_50545 = 50545; + public static final int NULL_50546 = 50546; + public static final int NULL_50547 = 50547; + public static final int NULL_50548 = 50548; + public static final int NULL_50549 = 50549; + public static final int NULL_50550 = 50550; + public static final int NULL_50551 = 50551; + public static final int NULL_50552 = 50552; + public static final int NULL_50553 = 50553; + public static final int NULL_50554 = 50554; + public static final int NULL_50555 = 50555; + public static final int NULL_50556 = 50556; + public static final int NULL_50557 = 50557; + public static final int NULL_50558 = 50558; + public static final int NULL_50559 = 50559; + public static final int NULL_50560 = 50560; + public static final int NULL_50561 = 50561; + public static final int NULL_50567 = 50567; + public static final int NULL_50568 = 50568; + public static final int NULL_50569 = 50569; + public static final int NULL_50570 = 50570; + public static final int NULL_50571 = 50571; + public static final int NULL_50572 = 50572; + public static final int NULL_50573 = 50573; + public static final int NULL_50574 = 50574; + public static final int NULL_50575 = 50575; + public static final int NULL_50576 = 50576; + public static final int NULL_50577 = 50577; + public static final int NULL_50578 = 50578; + public static final int NULL_50580 = 50580; + public static final int NULL_50581 = 50581; + public static final int NULL_50582 = 50582; + public static final int NULL_50606 = 50606; + public static final int NULL_50607 = 50607; + public static final int NULL_50608 = 50608; + public static final int NULL_50609 = 50609; + public static final int NULL_50610 = 50610; + public static final int NULL_50611 = 50611; + public static final int NULL_50612 = 50612; + public static final int NULL_50613 = 50613; + public static final int NULL_50614 = 50614; + public static final int NULL_50615 = 50615; + public static final int NULL_50616 = 50616; + public static final int NULL_50617 = 50617; + public static final int NULL_50618 = 50618; + public static final int NULL_50619 = 50619; + public static final int NULL_50620 = 50620; + public static final int NULL_50621 = 50621; + public static final int NULL_50622 = 50622; + public static final int NULL_50623 = 50623; + public static final int NULL_50624 = 50624; + public static final int NULL_50625 = 50625; + public static final int NULL_50626 = 50626; + public static final int NULL_50627 = 50627; + public static final int NULL_50628 = 50628; + public static final int NULL_50629 = 50629; + public static final int NULL_50630 = 50630; + public static final int NULL_50631 = 50631; + public static final int NULL_50632 = 50632; + public static final int NULL_50633 = 50633; + public static final int NULL_50634 = 50634; + public static final int NULL_50635 = 50635; + public static final int NULL_50636 = 50636; + public static final int NULL_50637 = 50637; + public static final int NULL_50638 = 50638; + public static final int NULL_50639 = 50639; + public static final int NULL_50640 = 50640; + public static final int NULL_50641 = 50641; + public static final int NULL_50651 = 50651; + public static final int NULL_50655 = 50655; + public static final int NULL_50656 = 50656; + public static final int NULL_50657 = 50657; + public static final int NULL_50658 = 50658; + public static final int NULL_50659 = 50659; + public static final int NULL_50660 = 50660; + public static final int NULL_50661 = 50661; + public static final int NULL_50662 = 50662; + public static final int NULL_50663 = 50663; + public static final int NULL_50664 = 50664; + public static final int NULL_50665 = 50665; + public static final int NULL_50666 = 50666; + public static final int NULL_50667 = 50667; + public static final int NULL_50668 = 50668; + public static final int NULL_50669 = 50669; + public static final int NULL_50670 = 50670; + public static final int NULL_50671 = 50671; + public static final int NULL_50672 = 50672; + public static final int NULL_50673 = 50673; + public static final int NULL_50674 = 50674; + public static final int NULL_50675 = 50675; + public static final int NULL_50676 = 50676; + public static final int NULL_50677 = 50677; + public static final int NULL_50678 = 50678; + public static final int NULL_50679 = 50679; + public static final int NULL_50680 = 50680; + public static final int NULL_50681 = 50681; + public static final int NULL_50682 = 50682; + public static final int NULL_50683 = 50683; + public static final int NULL_50684 = 50684; + public static final int NULL_50685 = 50685; + public static final int NULL_50686 = 50686; + public static final int NULL_50687 = 50687; + public static final int NULL_50688 = 50688; + public static final int NULL_50689 = 50689; + public static final int NULL_50690 = 50690; /* 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 d1b86e3239..cc02aaab9e 100644 --- a/runelite-api/src/main/java/net/runelite/api/ObjectID.java +++ b/runelite-api/src/main/java/net/runelite/api/ObjectID.java @@ -8439,7 +8439,7 @@ public final class ObjectID public static final int HANGING_MEAT_14874 = 14874; public static final int TRAPDOOR_14880 = 14880; public static final int CANDLES_14883 = 14883; - public static final int TREE_TRUNK = 14884; + public static final int TREE_14884 = 14884; public static final int TREE_14885 = 14885; public static final int BANK_CHEST_14886 = 14886; public static final int POTTERS_WHEEL_14887 = 14887; @@ -9571,7 +9571,7 @@ public final class ObjectID public static final int CHEST_16891 = 16891; public static final int COOKING_RANGE_16893 = 16893; public static final int EXTRA_ANCHOR = 16894; - public static final int EXTRA_CHAIN = 16895; + public static final int CHAIN_16895 = 16895; public static final int WOODEN_TABLE_16899 = 16899; public static final int CHAIR_16900 = 16900; public static final int LANTERN_16901 = 16901; @@ -24599,5 +24599,263 @@ public final class ObjectID public static final int LADDER_50072 = 50072; public static final int LADDER_50073 = 50073; public static final int DYING_TREE_50074 = 50074; + public static final int TABLE_50078 = 50078; + public static final int TABLE_50079 = 50079; + public static final int CHAIR_50080 = 50080; + public static final int WHITE_TREE_PATCH_50081 = 50081; + public static final int WILDERNESS_SIGN_50082 = 50082; + public static final int WILDERNESS_SIGN_50083 = 50083; + public static final int ROCKS_50084 = 50084; + public static final int ROCKS_50085 = 50085; + public static final int ROCKS_50086 = 50086; + public static final int ROCKS_50087 = 50087; + public static final int TREE_STUMP_50088 = 50088; + public static final int TREE_STUMP_50089 = 50089; + public static final int BUSH_50090 = 50090; + public static final int BUSH_50091 = 50091; + public static final int BUSH_50092 = 50092; + public static final int BUSH_50093 = 50093; + public static final int PLANT_50094 = 50094; + public static final int PLANT_50095 = 50095; + public static final int BUSH_50096 = 50096; + public static final int BUSH_50097 = 50097; + public static final int GUARD_50112 = 50112; + public static final int GUARD_50113 = 50113; + public static final int GUARD_50114 = 50114; + public static final int GUARD_50115 = 50115; + public static final int VARROCK_CENSUS = 50116; + public static final int BOOK_50117 = 50117; + public static final int SCROLLS_50118 = 50118; + public static final int SUIT_OF_ARMOUR_50122 = 50122; + public static final int SUIT_OF_ARMOUR_50123 = 50123; + public static final int SHIELD_50124 = 50124; + public static final int SHIELD_50125 = 50125; + public static final int STATUE_OF_A_KING_50126 = 50126; + public static final int STATUE_OF_A_KING_50127 = 50127; + public static final int SWORD_CABINET_50131 = 50131; + public static final int CHAIR_50132 = 50132; + public static final int BROKEN_CHAIR_50133 = 50133; + public static final int BROKEN_CHAIR_50134 = 50134; + public static final int BROKEN_CHAIR_50135 = 50135; + public static final int CHURCH_PEW_50136 = 50136; + public static final int CHURCH_PEW_50137 = 50137; + public static final int STOOL_50138 = 50138; + public static final int DESK_50139 = 50139; + public static final int TRAPDOOR_50140 = 50140; + public static final int TRAPDOOR_50141 = 50141; + public static final int TRAPDOOR_50142 = 50142; + public static final int LADDER_50143 = 50143; + public static final int RED_MIST = 50145; + public static final int RED_MIST_50146 = 50146; + public static final int GATE_50147 = 50147; + public static final int GATE_50148 = 50148; + public static final int GATE_50149 = 50149; + public static final int GATE_50150 = 50150; + public static final int DOOR_50151 = 50151; + public static final int DOOR_50152 = 50152; + public static final int DOOR_50153 = 50153; + public static final int BALCONY = 50154; + public static final int BALCONY_50155 = 50155; + public static final int BALCONY_50157 = 50157; + public static final int BALCONY_50158 = 50158; + public static final int BALCONY_50159 = 50159; + public static final int BALCONY_50160 = 50160; + public static final int BALCONY_50161 = 50161; + public static final int BALCONY_50162 = 50162; + public static final int ENTRY_50201 = 50201; + public static final int STAIRS_50202 = 50202; + public static final int LEVER_50203 = 50203; + public static final int LEVER_50204 = 50204; + public static final int LEVER_50205 = 50205; + public static final int LEVER_50206 = 50206; + public static final int ODD_MARKINGS_50207 = 50207; + public static final int ODD_MARKINGS_50208 = 50208; + public static final int ODD_MARKINGS_50209 = 50209; + public static final int ODD_MARKINGS_50210 = 50210; + public static final int IMPOSING_DOORS_50211 = 50211; + public static final int TORCH_50230 = 50230; + public static final int STAIRS_50253 = 50253; + public static final int STAIRS_50254 = 50254; + public static final int SCROLL_HOLDERS = 50255; + public static final int BROKEN_SCROLL_HOLDERS = 50256; + public static final int BROKEN_SCROLL_HOLDERS_50257 = 50257; + public static final int CAVEIN = 50260; + public static final int CAVEIN_50261 = 50261; + public static final int DAIS = 50266; + public static final int DECORATIONS = 50267; + public static final int DECORATIONS_50268 = 50268; + public static final int DECORATIONS_50269 = 50269; + public static final int DECORATIONS_50270 = 50270; + public static final int STONE_BOAT = 50271; + public static final int STONE_BOAT_50272 = 50272; + public static final int STONE_BOAT_50273 = 50273; + public static final int CRATE_50282 = 50282; + public static final int UNINVITING_HOLE = 50289; + public static final int UNINVITING_HOLE_50290 = 50290; + public static final int UNINVITING_HOLE_50291 = 50291; + public static final int BLUE_TILE = 50294; + public static final int RED_TILE = 50295; + public static final int GREEN_TILE = 50296; + public static final int YELLOW_TILE = 50297; + public static final int BLUE_BLOCK = 50298; + public static final int RED_BLOCK = 50299; + public static final int GREEN_BLOCK = 50300; + public static final int YELLOW_BLOCK = 50301; + public static final int SARCOPHAGUS_50312 = 50312; + public static final int SARCOPHAGUS_50313 = 50313; + public static final int SARCOPHAGUS_50314 = 50314; + public static final int SARCOPHAGUS_50315 = 50315; + public static final int REGAL_CHAIR = 50316; + public static final int BROKEN_CHAIR_50317 = 50317; + public static final int SPICED_WINE = 50318; + public static final int BROKEN_JUG = 50319; + public static final int POT_OF_WHEAT = 50320; + public static final int BROKEN_POT_50321 = 50321; + public static final int SHELVES_50322 = 50322; + public static final int SHELVES_50323 = 50323; + public static final int SHELVES_50324 = 50324; + public static final int SHELVES_50325 = 50325; + public static final int SHELVES_50326 = 50326; + public static final int REGAL_TABLE = 50327; + public static final int BROKEN_TABLE_50328 = 50328; + public static final int STATUE_50329 = 50329; + public static final int STATUE_BASE = 50330; + public static final int STATUE_50331 = 50331; + public static final int USHABTI = 50332; + public static final int AMASCUT_STATUE = 50333; + public static final int APMEKEN_STATUE = 50334; + public static final int CRONDIS_STATUE = 50335; + public static final int HET_STATUE = 50336; + public static final int ICTHLARIN_STATUE = 50337; + public static final int SCABARAS_STATUE = 50338; + public static final int BROKEN_STATUE_50339 = 50339; + public static final int BROKEN_STATUE_50340 = 50340; + public static final int BROKEN_STATUE_50341 = 50341; + public static final int BROKEN_STATUE_50342 = 50342; + public static final int BROKEN_STATUE_50343 = 50343; + public static final int BROKEN_STATUE_50344 = 50344; + public static final int TUMEKEN_STATUE = 50345; + public static final int SCONCE = 50346; + public static final int SCONCE_50347 = 50347; + public static final int SKELETON_50348 = 50348; + public static final int SKELETON_50349 = 50349; + public static final int SKELETON_50350 = 50350; + public static final int SKELETON_50351 = 50351; + public static final int SKELETON_50352 = 50352; + public static final int SKELETON_50353 = 50353; + public static final int FIRE_PIT_50354 = 50354; + public static final int BARREL_STACK = 50355; + public static final int CRATE_50376 = 50376; + public static final int CRATES_50377 = 50377; + public static final int CRATES_50378 = 50378; + public static final int CRATE_50379 = 50379; + public static final int DUNG_50392 = 50392; + public static final int DUNG_50393 = 50393; + public static final int DUNG_50394 = 50394; + public static final int DUNG_50395 = 50395; + public static final int DUNG_50396 = 50396; + public static final int CHAIR_50405 = 50405; + public static final int TABLE_50406 = 50406; + public static final int BARREL_50407 = 50407; + public static final int CRATE_50408 = 50408; + public static final int CRATES_50409 = 50409; + public static final int BED_50411 = 50411; + public static final int BED_50412 = 50412; + public static final int BED_50413 = 50413; + public static final int CHAIR_50414 = 50414; + public static final int TABLE_50415 = 50415; + public static final int BARREL_50416 = 50416; + public static final int BARREL_50417 = 50417; + public static final int CRATE_50418 = 50418; + public static final int CRATES_50419 = 50419; + public static final int SACKS_50420 = 50420; + public static final int TORCH_50421 = 50421; + public static final int TORCH_50422 = 50422; + public static final int ARMOUR_50425 = 50425; + public static final int SKULLS_50426 = 50426; + public static final int BED_50495 = 50495; + public static final int BLACKSTONE = 50498; + public static final int WEAPON_RACK_50499 = 50499; + public static final int WEAPON_TABLE = 50500; + public static final int WEAPON_RACK_50501 = 50501; + public static final int WEAPON_TABLE_50502 = 50502; + public static final int STAIRS_50503 = 50503; + public static final int STAIRS_50504 = 50504; + public static final int STAIRS_50505 = 50505; + public static final int BOOKCASE_50506 = 50506; + public static final int BOOKCASE_50507 = 50507; + public static final int STAIRS_50508 = 50508; + public static final int STAIRS_50509 = 50509; + public static final int DOOR_50510 = 50510; + public static final int DOOR_50511 = 50511; + public static final int DOOR_50512 = 50512; + public static final int DOOR_50513 = 50513; + public static final int DOOR_50514 = 50514; + public static final int TAPESTRY_50516 = 50516; + public static final int METAL_DOOR_50517 = 50517; + public static final int METAL_DOOR_50518 = 50518; + public static final int HUMAN_DETECTION_SPELL = 50521; + public static final int FIRE_TRAP_50522 = 50522; + public static final int PIPE_50523 = 50523; + public static final int PIPE_50524 = 50524; + public static final int PIPE_50525 = 50525; + public static final int PIPE_50526 = 50526; + public static final int DOOR_50528 = 50528; + public static final int DOOR_50529 = 50529; + public static final int CHEST_50530 = 50530; + public static final int CHEST_50531 = 50531; + public static final int TABLE_50532 = 50532; + public static final int TABLE_50533 = 50533; + public static final int TABLE_50534 = 50534; + public static final int TABLE_50535 = 50535; + public static final int GATE_50537 = 50537; + public static final int PEDESTAL_50538 = 50538; + public static final int PEDESTAL_50539 = 50539; + public static final int PEDESTAL_50540 = 50540; + public static final int CAGED_KILLERWATT = 50541; + public static final int PIPE_50542 = 50542; + public static final int PIPE_50543 = 50543; + public static final int STAIRS_50544 = 50544; + public static final int SHELVES_50562 = 50562; + public static final int RANGE_50563 = 50563; + public static final int STOOL_50564 = 50564; + public static final int TABLE_50565 = 50565; + public static final int PIPE_50566 = 50566; + public static final int PUDDLE_50579 = 50579; + public static final int CAVE_50583 = 50583; + public static final int CAVE_50584 = 50584; + public static final int CAVE_50585 = 50585; + public static final int RUBBLE_50586 = 50586; + public static final int RUBBLE_50587 = 50587; + public static final int RUBBLE_50588 = 50588; + public static final int RUBBLE_50589 = 50589; + public static final int RUBBLE_50590 = 50590; + public static final int RUBBLE_50591 = 50591; + public static final int RUBBLE_50592 = 50592; + public static final int RUBBLE_50593 = 50593; + public static final int RUBBLE_50594 = 50594; + public static final int RUBBLE_50595 = 50595; + public static final int RUBBLE_50596 = 50596; + public static final int RUBBLE_50597 = 50597; + public static final int RUBBLE_50598 = 50598; + public static final int RUBBLE_50599 = 50599; + public static final int RUBBLE_50600 = 50600; + public static final int RUBBLE_50601 = 50601; + public static final int RUBBLE_50602 = 50602; + public static final int RUBBLE_50603 = 50603; + public static final int RUBBLE_50604 = 50604; + public static final int RUBBLE_50605 = 50605; + public static final int BED_50642 = 50642; + public static final int TABLE_50643 = 50643; + public static final int CHAIR_50644 = 50644; + public static final int SACKS_50645 = 50645; + public static final int BARREL_50646 = 50646; + public static final int BARREL_50647 = 50647; + public static final int CRATE_50648 = 50648; + public static final int CRATES_50649 = 50649; + public static final int CRATES_50650 = 50650; + public static final int WILDERNESS_DITCH_50652 = 50652; + public static final int DOOR_50653 = 50653; + public static final int DOOR_50654 = 50654; /* This file is automatically generated. Do not edit. */ } diff --git a/runelite-api/src/main/java/net/runelite/api/Quest.java b/runelite-api/src/main/java/net/runelite/api/Quest.java index dab17fa1a0..e277c29568 100644 --- a/runelite-api/src/main/java/net/runelite/api/Quest.java +++ b/runelite-api/src/main/java/net/runelite/api/Quest.java @@ -217,6 +217,8 @@ public enum Quest THE_PATH_OF_GLOUPHRIE(3425, "The Path of Glouphrie"), CHILDREN_OF_THE_SUN(3450, "Children of the Sun"), BARBARIAN_TRAINING(3451, "Barbarian Training"), + DEFENDER_OF_VARROCK(3466, "Defender of Varrock"), + WHILE_GUTHIX_SLEEPS(3467, "While Guthix Sleeps"), ; @Getter 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 ad3acb0585..ec9691a639 100644 --- a/runelite-api/src/main/java/net/runelite/api/ScriptID.java +++ b/runelite-api/src/main/java/net/runelite/api/ScriptID.java @@ -449,4 +449,7 @@ public final class ScriptID @ScriptArguments(integer = 6, string = 2) public static final int CHATBOX_KEYINPUT_MATCHED = 2153; + + @ScriptArguments(integer = 6) + public static final int EQUIPMENT_SET_STAT_BONUS_SETUP = 3517; } diff --git a/runelite-api/src/main/java/net/runelite/api/events/WidgetLoaded.java b/runelite-api/src/main/java/net/runelite/api/events/WidgetLoaded.java index 40bd134602..24bac3fdab 100644 --- a/runelite-api/src/main/java/net/runelite/api/events/WidgetLoaded.java +++ b/runelite-api/src/main/java/net/runelite/api/events/WidgetLoaded.java @@ -25,6 +25,7 @@ package net.runelite.api.events; import lombok.Data; +import lombok.Getter; import net.runelite.api.annotations.Interface; /** @@ -37,5 +38,6 @@ public class WidgetLoaded * The group ID of the loaded widget. */ @Interface + @Getter(onMethod_ = @Interface) private int groupId; } diff --git a/runelite-api/src/main/java/net/runelite/api/hooks/Callbacks.java b/runelite-api/src/main/java/net/runelite/api/hooks/Callbacks.java index 07245f1be6..dfae199f17 100644 --- a/runelite-api/src/main/java/net/runelite/api/hooks/Callbacks.java +++ b/runelite-api/src/main/java/net/runelite/api/hooks/Callbacks.java @@ -212,4 +212,11 @@ public interface Callbacks * @param url */ void openUrl(String url); + + /** + * Returns if the current runelite client is outdated or not + * + * @return + */ + boolean isRuneLiteClientOutdated(); } diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetConfig.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetConfig.java index 54fa782a5e..5782a8d270 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetConfig.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetConfig.java @@ -71,14 +71,14 @@ public final class WidgetConfig public static final int USE_WIDGET = 32 << 11; /** - * Controls whether or not a widget can have another dragged onto it. + * Controls whether this widget can be dragged around. */ - public static final int DRAG_ON = 1 << 17; + public static final int DRAG = 1 << 17; /** - * Controls whether or not a widget can be dragged around. + * Controls whether this widget can have other widgets dragged onto it. */ - public static final int DRAG = 1 << 20; + public static final int DRAG_ON = 1 << 20; /** * Can widgets with USE_WIDGET be used on this widget diff --git a/runelite-client/pom.xml b/runelite-client/pom.xml index ff9a3662fb..50d066dcd8 100644 --- a/runelite-client/pom.xml +++ b/runelite-client/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.22 + 1.10.23.1 client diff --git a/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java b/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java index 8688cac76e..2dcc53cc06 100644 --- a/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java +++ b/runelite-client/src/main/java/net/runelite/client/RuneLiteModule.java @@ -68,7 +68,7 @@ public class RuneLiteModule extends AbstractModule { private final OkHttpClient okHttpClient; private final Supplier clientLoader; - private final Supplier configSupplier; + private final RuntimeConfigLoader configLoader; private final boolean developerMode; private final boolean safeMode; private final boolean disableTelemetry; @@ -83,7 +83,7 @@ protected void configure() Properties properties = RuneLiteProperties.getProperties(); Map props = new HashMap<>(properties); - RuntimeConfig runtimeConfig = configSupplier.get(); + RuntimeConfig runtimeConfig = configLoader.get(); if (runtimeConfig != null && runtimeConfig.getProps() != null) { props.putAll(runtimeConfig.getProps()); @@ -127,6 +127,8 @@ else if (entry.getValue() instanceof Boolean) bind(File.class).annotatedWith(Names.named("runeLiteDir")).toInstance(RuneLite.RUNELITE_DIR); bind(ScheduledExecutorService.class).toInstance(new ExecutorServiceExceptionLogger(Executors.newSingleThreadScheduledExecutor())); bind(OkHttpClient.class).toInstance(okHttpClient); + bind(RuntimeConfigLoader.class).toInstance(configLoader); + bind(RuntimeConfigRefresher.class).asEagerSingleton(); bind(MenuManager.class); bind(ChatMessageManager.class); bind(ItemManager.class); @@ -164,7 +166,7 @@ Client provideClient(@Nullable Applet applet) @Singleton RuntimeConfig provideRuntimeConfig() { - return configSupplier.get(); + return configLoader.get(); } @Provides diff --git a/runelite-client/src/main/java/net/runelite/client/RuntimeConfig.java b/runelite-client/src/main/java/net/runelite/client/RuntimeConfig.java index b2b72ffa02..b7ee17cd32 100644 --- a/runelite-client/src/main/java/net/runelite/client/RuntimeConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/RuntimeConfig.java @@ -48,6 +48,7 @@ public class RuntimeConfig private Set forceDeadAnimations; private Set nonAttackNpcs; + private Set outdatedClientVersions; private String[] updateLauncherWinVers; private double updateRollout; @@ -76,4 +77,15 @@ public boolean showOutageMessage() }); return true; } + + void refresh(RuntimeConfig config) + { + ignoreDeadNpcs = config.ignoreDeadNpcs; + forceDeadNpcs = config.forceDeadNpcs; + resetDeadOnChangeNpcs = config.resetDeadOnChangeNpcs; + forceDeadAnimations = config.forceDeadAnimations; + nonAttackNpcs = config.nonAttackNpcs; + + outdatedClientVersions = config.outdatedClientVersions; + } } \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/RuntimeConfigLoader.java b/runelite-client/src/main/java/net/runelite/client/RuntimeConfigLoader.java index 53ef13f7d7..30e64a3e6a 100644 --- a/runelite-client/src/main/java/net/runelite/client/RuntimeConfigLoader.java +++ b/runelite-client/src/main/java/net/runelite/client/RuntimeConfigLoader.java @@ -82,7 +82,7 @@ public RuntimeConfig tryGet() } } - private CompletableFuture fetch() + CompletableFuture fetch() { CompletableFuture future = new CompletableFuture<>(); diff --git a/runelite-client/src/main/java/net/runelite/client/RuntimeConfigRefresher.java b/runelite-client/src/main/java/net/runelite/client/RuntimeConfigRefresher.java new file mode 100644 index 0000000000..2eb221090e --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/RuntimeConfigRefresher.java @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2024, Hexagon + * 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; + + +import java.time.Instant; +import java.time.temporal.ChronoUnit; +import javax.inject.Inject; +import javax.inject.Singleton; +import lombok.extern.slf4j.Slf4j; +import net.runelite.api.GameState; +import net.runelite.api.events.GameStateChanged; +import net.runelite.client.eventbus.EventBus; +import net.runelite.client.eventbus.Subscribe; + +@Slf4j +@Singleton +class RuntimeConfigRefresher +{ + private final RuntimeConfig managedRuntimeConfig; + private final RuntimeConfigLoader configLoader; + + private Instant nextRefreshAt = nextRefreshTime(); + + @Inject + private RuntimeConfigRefresher( + RuntimeConfig managedRuntimeConfig, + RuntimeConfigLoader configLoader, + EventBus eventBus + ) + { + this.managedRuntimeConfig = managedRuntimeConfig; + this.configLoader = configLoader; + eventBus.register(this); + } + + @Subscribe + public void onGameStateChanged(GameStateChanged event) + { + if (event.getGameState() != GameState.LOGIN_SCREEN) + { + return; + } + + if (Instant.now().isBefore(nextRefreshAt)) + { + log.debug("Skipping runtimeConfig refresh, next refresh at {}", nextRefreshAt); + return; + } + + if (managedRuntimeConfig == null) + { + log.debug("Skipping runtimeConfig refresh, current one is null"); + return; + } + + configLoader.fetch().thenAccept(this::refreshConfig); + nextRefreshAt = nextRefreshTime(); + } + + private Instant nextRefreshTime() + { + return Instant.now().plus(10, ChronoUnit.MINUTES); + } + + private void refreshConfig(RuntimeConfig runtimeConfig) + { + managedRuntimeConfig.refresh(runtimeConfig); + log.debug("Successfully refreshed the runtimeConfig"); + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/callback/Hooks.java b/runelite-client/src/main/java/net/runelite/client/callback/Hooks.java index 76f03bcb09..502848ea74 100644 --- a/runelite-client/src/main/java/net/runelite/client/callback/Hooks.java +++ b/runelite-client/src/main/java/net/runelite/client/callback/Hooks.java @@ -40,8 +40,10 @@ import java.io.StringWriter; import java.util.ArrayList; import java.util.List; +import java.util.Set; import javax.annotation.Nullable; import javax.inject.Inject; +import javax.inject.Named; import javax.inject.Singleton; import lombok.extern.slf4j.Slf4j; import net.runelite.api.Client; @@ -61,6 +63,8 @@ import net.runelite.api.worldmap.WorldMap; import net.runelite.api.worldmap.WorldMapRenderer; import net.runelite.client.Notifier; +import net.runelite.client.RuneLiteProperties; +import net.runelite.client.RuntimeConfig; import net.runelite.client.TelemetryClient; import net.runelite.client.chat.ChatMessageManager; import net.runelite.client.eventbus.EventBus; @@ -107,6 +111,9 @@ public class Hooks implements Callbacks private final ClientUI clientUi; @Nullable private final TelemetryClient telemetryClient; + @Nullable + private final RuntimeConfig runtimeConfig; + private final boolean developerMode; private Dimension lastStretchedDimensions; private VolatileImage stretchedImage; @@ -168,7 +175,9 @@ private Hooks( DrawManager drawManager, Notifier notifier, ClientUI clientUi, - @Nullable TelemetryClient telemetryClient + @Nullable TelemetryClient telemetryClient, + @Nullable RuntimeConfig runtimeConfig, + @Named("developerMode") final boolean developerMode ) { this.client = client; @@ -185,6 +194,8 @@ private Hooks( this.notifier = notifier; this.clientUi = clientUi; this.telemetryClient = telemetryClient; + this.runtimeConfig = runtimeConfig; + this.developerMode = developerMode; eventBus.register(this); } @@ -670,4 +681,21 @@ public void openUrl(String url) { LinkBrowser.browse(url); } + + @Override + public boolean isRuneLiteClientOutdated() + { + if (runtimeConfig == null || developerMode) + { + return false; + } + + Set outdatedClientVersions = runtimeConfig.getOutdatedClientVersions(); + if (outdatedClientVersions == null) + { + return false; + } + + return outdatedClientVersions.contains(RuneLiteProperties.getVersion()); + } } diff --git a/runelite-client/src/main/java/net/runelite/client/game/LootManager.java b/runelite-client/src/main/java/net/runelite/client/game/LootManager.java index 9b7dc5d43a..d282e58cb4 100644 --- a/runelite-client/src/main/java/net/runelite/client/game/LootManager.java +++ b/runelite-client/src/main/java/net/runelite/client/game/LootManager.java @@ -80,7 +80,7 @@ public class LootManager private WorldPoint krakenPlayerLocation; private NPC delayedLootNpc; - private int delayedLootTickLimit; + private int delayedLootTick; private List delayedLootAreas; @Inject @@ -245,19 +245,20 @@ public void onNpcChanged(NpcChanged npcChanged) if (npc.getId() == NpcID.THE_NIGHTMARE_9433 || npc.getId() == NpcID.PHOSANIS_NIGHTMARE_9424) { delayedLootNpc = npc; - delayedLootTickLimit = 15; - delayedLootAreas = List.of(getAdjacentSquareLootTile(npc).toWorldArea()); + delayedLootTick = 10; + // it is too early to call getAdjacentSquareLootTile() because the player might move before the + // loot location is calculated by the server. } else if (npc.getId() == NpcID.HOLE_IN_THE_WALL) { delayedLootNpc = npc; - delayedLootTickLimit = 2; - delayedLootAreas = List.of(getAdjacentSquareLootTile(npc).toWorldArea()); + delayedLootTick = 1; + delayedLootAreas = getDropLocations(npc); } else if (npc.getId() == NpcID.DUKE_SUCELLUS_12192 || npc.getId() == NpcID.DUKE_SUCELLUS_12196) { delayedLootNpc = npc; - delayedLootTickLimit = 5; + delayedLootTick = 5; delayedLootAreas = getDropLocations(npc); } } @@ -265,9 +266,10 @@ else if (npc.getId() == NpcID.DUKE_SUCELLUS_12192 || npc.getId() == NpcID.DUKE_S @Subscribe public void onGameTick(GameTick gameTick) { - if (delayedLootNpc != null && delayedLootTickLimit-- > 0) + if (delayedLootNpc != null && --delayedLootTick == 0) { processDelayedLoot(); + clearDelayedLootNpc(); } playerLocationLastTick = client.getLocalPlayer().getWorldLocation(); @@ -278,17 +280,22 @@ public void onGameTick(GameTick gameTick) private void processDelayedLoot() { - final List itemStacks = getItemStacksFromAreas(delayedLootAreas); - if (itemStacks.isEmpty()) + if (delayedLootAreas == null) { - // no loot yet - return; + // This is only for nightmare + delayedLootAreas = List.of(getAdjacentSquareLootTile(delayedLootNpc).toWorldArea()); } - log.debug("Got delayed loot stack from {}: {}", delayedLootNpc.getName(), itemStacks); - eventBus.post(new NpcLootReceived(delayedLootNpc, itemStacks)); - - clearDelayedLootNpc(); + final List itemStacks = getItemStacksFromAreas(delayedLootAreas); + if (!itemStacks.isEmpty()) + { + log.debug("Got delayed loot stack from {}: {}", delayedLootNpc.getName(), itemStacks); + eventBus.post(new NpcLootReceived(delayedLootNpc, itemStacks)); + } + else + { + log.debug("Delayed loot expired with no loot"); + } } private void processNpcLoot(NPC npc) @@ -441,6 +448,11 @@ else if (playerLocationLastTick.getY() > y) final WorldArea expandedArea = new WorldArea(bossArea.getX() - expand, bossArea.getY() - expand, bossArea.getWidth() + expand * 2, bossArea.getHeight() + expand * 2, bossArea.getPlane()); return List.of(expandedArea); } + case NpcID.HOLE_IN_THE_WALL: + { + final WorldArea bossArea = npc.getWorldArea(); + return List.of(new WorldArea(bossArea.getX() - 1, bossArea.getY() - 1, 3, 3, bossArea.getPlane())); + } } return Collections.singletonList(npc.getWorldArea()); @@ -498,7 +510,7 @@ public Collection getItemSpawns(WorldPoint worldPoint) private void clearDelayedLootNpc() { delayedLootNpc = null; - delayedLootTickLimit = 0; + delayedLootTick = 0; delayedLootAreas = null; } } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/ArdougneDiaryRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/ArdougneDiaryRequirement.java index 9556a727c7..567f59aa1f 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/ArdougneDiaryRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/ArdougneDiaryRequirement.java @@ -122,7 +122,7 @@ public ArdougneDiaryRequirement() new SkillRequirement(Skill.CRAFTING, 10), new SkillRequirement(Skill.SMITHING, 91), new SkillRequirement(Skill.FLETCHING, 69)); - add("Imbue a salve amulet at Nightmare Zone or equip an imbued salve amulet.", + add("Imbue a Salve amulet at Nightmare Zone, or equip a Salve amulet that was imbued there.", new QuestRequirement(Quest.HAUNTED_MINE)); add("Pick some Torstol from the patch north of Ardougne.", new SkillRequirement(Skill.FARMING, 85)); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/FremennikDiaryRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/FremennikDiaryRequirement.java index f4d84ef3aa..dfd2fde23d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/FremennikDiaryRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/FremennikDiaryRequirement.java @@ -106,12 +106,12 @@ public FremennikDiaryRequirement() add("Teleport to Waterbirth Island.", new SkillRequirement(Skill.MAGIC, 72), new QuestRequirement(Quest.LUNAR_DIPLOMACY)); - add("Obtain the Blast Furnace Foremans permission to use the Blast Furnace for free.", + add("Obtain the Blast Furnace Foreman's permission to use the Blast Furnace for free.", new SkillRequirement(Skill.SMITHING, 60), new QuestRequirement(Quest.THE_GIANT_DWARF, true)); // ELITE - add("Craft 56 astral runes from Essence simultaneously from Essence without the use of Extracts.", + add("Craft 56 astral runes simultaneously from Essence without the use of Extracts.", new SkillRequirement(Skill.RUNECRAFT, 82), new QuestRequirement(Quest.LUNAR_DIPLOMACY)); add("Create a dragonstone amulet in the Neitiznot furnace.", diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/KandarinDiaryRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/KandarinDiaryRequirement.java index 58e6ebab08..36c19a8e10 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/KandarinDiaryRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/KandarinDiaryRequirement.java @@ -120,7 +120,7 @@ public KandarinDiaryRequirement() new SkillRequirement(Skill.AGILITY, 60)); add("Smith a Rune Hasta at Otto's Grotto.", new SkillRequirement(Skill.SMITHING, 90)); - add("Construct a Pyre ship from Magic Logs.", + add("Construct a Pyre ship from Magic Logs.(Requires Chewed Bones.)", new SkillRequirement(Skill.FIREMAKING, 85), new SkillRequirement(Skill.CRAFTING, 85)); add("Teleport to Catherby.", diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/WesternDiaryRequirement.java b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/WesternDiaryRequirement.java index 0faf5d8b02..60e4e96c3b 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/WesternDiaryRequirement.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/achievementdiary/diaries/WesternDiaryRequirement.java @@ -45,9 +45,9 @@ public WesternDiaryRequirement() new SkillRequirement(Skill.MINING, 15)); add("Claim any Chompy bird hat from Rantz.", new QuestRequirement(Quest.BIG_CHOMPY_BIRD_HUNTING)); - add("Have Brimstail teleport you to the Essence mine.", + add("Have Brimstail teleport you to the Essence Mine.", new QuestRequirement(Quest.RUNE_MYSTERIES)); - add("Fletch an Oak shortbow from the Gnome Stronghold.", + add("Fletch an Oak Shortbow in the Gnome Stronghold.", new SkillRequirement(Skill.FLETCHING, 20)); // MEDIUM @@ -128,7 +128,7 @@ public WesternDiaryRequirement() add("Fletch a Magic Longbow in Tirannwn.", new SkillRequirement(Skill.FLETCHING, 85), new QuestRequirement(Quest.MOURNINGS_END_PART_I)); - add("Kill the Thermonuclear Smoke devil.", + add("Kill the Thermonuclear Smoke devil (Does not require task).", new SkillRequirement(Skill.SLAYER, 93)); add("Have Prissy Scilla protect your Magic tree.", new SkillRequirement(Skill.FARMING, 75)); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java index f54fbf5a4c..6e219eba19 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/banktags/tabs/TabInterface.java @@ -138,6 +138,7 @@ public class TabInterface private static final int NEWTAB_OP_NEW_TAB = 1; private static final int NEWTAB_OP_IMPORT_TAB = 2; private static final int NEWTAB_OP_OPEN_TAB_MENU = 3; + private static final int TAGTAB_CHILD_OFFSET = 4; private final Client client; private final ClientThread clientThread; @@ -232,7 +233,7 @@ else if (event.getScriptId() == ScriptID.BANKMAIN_SIZE_CHECK && enabled) clientThread.invokeLater(() -> { repositionButtons(); - rebuildTabs(); + layoutTabs(); }); } } @@ -328,7 +329,7 @@ private void init() upButton = createGraphic(parent, "", TabSprites.UP_ARROW.getSpriteId(), -1, TAB_WIDTH, BUTTON_HEIGHT, MARGIN, 0); upButton.setAction(1, SCROLL_UP); int clickmask = upButton.getClickMask(); - clickmask |= WidgetConfig.DRAG; + clickmask |= WidgetConfig.DRAG_ON; upButton.setClickMask(clickmask); upButton.setHasListener(true); upButton.setOnOpListener((JavaScriptCallback) (event) -> scrollTab(-1)); @@ -336,7 +337,7 @@ private void init() downButton = createGraphic(parent, "", TabSprites.DOWN_ARROW.getSpriteId(), -1, TAB_WIDTH, BUTTON_HEIGHT, MARGIN, 0); downButton.setAction(1, SCROLL_DOWN); clickmask = downButton.getClickMask(); - clickmask |= WidgetConfig.DRAG; + clickmask |= WidgetConfig.DRAG_ON; downButton.setClickMask(clickmask); downButton.setHasListener(true); downButton.setOnOpListener((JavaScriptCallback) (event) -> scrollTab(1)); @@ -358,8 +359,9 @@ private void init() { // the server will resync the last opened vanilla tab when the bank is opened client.setVarbit(Varbits.CURRENT_BANK_TAB, 0); - activeTab = tabManager.find(config.tab()); - tagTabActive = false; + var tab = config.tab(); + activeTab = tabManager.find(tab); + tagTabActive = TAB_MENU_KEY.equals(tab); } // Move equipment button to the titlebar @@ -758,7 +760,7 @@ public void onDraggingWidgetChanged(DraggingWidgetChanged event) && draggedWidget.getId() == ComponentID.BANK_ITEM_CONTAINER && draggedWidget.getItemId() != -1 && draggedOn.getParent() == parent - && draggedOn.getIndex() > 3) // skip buttons + && draggedOn.getIndex() >= TAGTAB_CHILD_OFFSET) // skip buttons { // Tag an item dragged on a tag tab log.debug("Dragged {} to tab {}", draggedWidget.getItemId(), Text.removeTags(draggedOn.getName())); @@ -766,12 +768,17 @@ public void onDraggingWidgetChanged(DraggingWidgetChanged event) reloadActiveTab(); } else if ((tagTabActive && draggedWidget.getId() == ComponentID.BANK_ITEM_CONTAINER && draggedOn.getId() == ComponentID.BANK_ITEM_CONTAINER) - || (draggedWidget.getParent() == parent && draggedOn.getParent() == parent)) + || (draggedWidget.getParent() == parent && draggedOn.getParent() == parent && draggedWidget.getIndex() >= TAGTAB_CHILD_OFFSET && draggedOn.getIndex() >= TAGTAB_CHILD_OFFSET)) { // Reorder tag tabs log.debug("Reorder tag tab {} <-> {}", draggedWidget, draggedOn); moveTagTab(draggedWidget, draggedOn); } + else + { + // Rebuild to avoid the dragged tab being left over due to it being excluded from being hidden when layouted + rebuildTabs(); + } } else if (draggedWidget.getItemId() != -1) { @@ -947,7 +954,7 @@ private void scrollTab(int d) config.position(tabScrollOffset); - rebuildTabs(); + layoutTabs(); } private void openNamedTag(String name, boolean relayout) @@ -1042,19 +1049,14 @@ private void repositionButtons() private void rebuildTabs() { // remove the tag tabs but keep the buttons and scroll component - parent.setChildren(Arrays.copyOf(parent.getChildren(), 4)); - - int y = scrollComponent.getOriginalY(); - y += MARGIN; + parent.setChildren(Arrays.copyOf(parent.getChildren(), TAGTAB_CHILD_OFFSET)); var tabs = tabManager.getTabs(); - for (int i = tabScrollOffset; i < tabScrollOffset + tabCount && i < tabs.size(); ++i) + for (TagTab tab : tabs) { - TagTab tab = tabs.get(i); - Widget background = createGraphic(parent, ColorUtil.wrapWithColorTag(tab.getTag(), HILIGHT_COLOR), (activeTab == tab ? TabSprites.TAB_BACKGROUND_ACTIVE : TabSprites.TAB_BACKGROUND).getSpriteId(), - -1, TAB_WIDTH, TAB_HEIGHT, MARGIN, y); + -1, TAB_WIDTH, TAB_HEIGHT, MARGIN, -1); addTabActions(background); Widget icon = createGraphic( @@ -1063,8 +1065,42 @@ private void rebuildTabs() -1, tab.getIconItemId(), Constants.ITEM_SPRITE_WIDTH, Constants.ITEM_SPRITE_HEIGHT, - MARGIN + 3, y + 4); + MARGIN + 3, -1); addTabOptions(icon); + } + + layoutTabs(); + } + + // layout the tabs for their position due to scroll or window resize + private void layoutTabs() + { + Widget[] children = parent.getChildren(); + Widget draggedWidget = client.getDraggedWidget(); + for (int i = TAGTAB_CHILD_OFFSET; i < children.length; ++i) + { + Widget child = children[i]; + // avoid hiding dragged widget if scrolling from drag + if (draggedWidget != child) + { + child.setHidden(true); + } + } + + int y = scrollComponent.getOriginalY(); + y += MARGIN; + + for (int i = tabScrollOffset; i < tabScrollOffset + tabCount && i * 2 + 1 < children.length - TAGTAB_CHILD_OFFSET; ++i) + { + Widget background = children[TAGTAB_CHILD_OFFSET + i * 2]; + background.setOriginalY(y); + background.setHidden(false); + background.revalidate(); + + Widget icon = children[TAGTAB_CHILD_OFFSET + i * 2 + 1]; + icon.setOriginalY(y + 4); + icon.setHidden(false); + icon.revalidate(); y += TAB_HEIGHT + MARGIN; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraConfig.java index 0ab69c96b2..10bd98e7a6 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraConfig.java @@ -123,6 +123,17 @@ default int zoomIncrement() return 25; } + @ConfigItem( + keyName = "cameraSpeed", + name = "Camera Speed", + description = "Speed which the camera moves from input", + position = 7 + ) + default double cameraSpeed() + { + return 1f; + } + // region mouse settings @ConfigItem( keyName = "rightClickMovesCamera", @@ -160,6 +171,19 @@ default boolean rightClickExamine() return false; } + @ConfigItem( + keyName = "rightClickMenuBlocksCamera", + name = "Right click menu blocks camera", + description = "Prevents camera movement when 'Right click moves camera' is on and the right click menu
" + + "is opened due to either 'Right click objects' or 'Right click examine' being on.", + position = 10, + section = mouseSettingsSection + ) + default boolean rightClickMenuBlocksCamera() + { + return true; + } + @ConfigItem( keyName = "middleClickMenu", name = "Middle-button opens menu", diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraPlugin.java index 8df8921614..e0ce0496a5 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/camera/CameraPlugin.java @@ -140,6 +140,8 @@ protected void startUp() @Override protected void shutDown() { + client.setCameraMouseButtonMask(0); + client.setCameraSpeed(1f); client.setCameraPitchRelaxerEnabled(false); client.setInvertYaw(false); client.setInvertPitch(false); @@ -167,6 +169,14 @@ protected void shutDown() void copyConfigs() { + // rightClickMenuBlocksCamera=true works because mousePressed() does *not* remap rmb->mmb when the menu has object menus. + // The camera click mask is mmb, so no camera movement happens. + // + // rightClickMenuBlocksCamera=false works because the camera click mask is set to 2 or 4. Clicking on objects does *not* + // remap rmb->mmb, so the rmb click both opens the menu and moves the camera. Clicking on nothing *does* remap rmb->mmb + // which moves the camera, but won't open a Walk-here only menu. + client.setCameraMouseButtonMask(!config.rightClickMenuBlocksCamera() ? ((1 << MouseEvent.BUTTON2) | (1 << 4 /* button 4 */)) : 0); + client.setCameraSpeed((float) config.cameraSpeed()); client.setCameraPitchRelaxerEnabled(config.relaxCameraPitch()); client.setInvertYaw(config.invertYaw()); client.setInvertPitch(config.invertPitch()); @@ -248,7 +258,10 @@ public void onFocusChanged(FocusChanged event) @Subscribe public void onConfigChanged(ConfigChanged ev) { - copyConfigs(); + if (ev.getGroup().equals("zoom")) + { + copyConfigs(); + } } @Override diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesConfig.java index 3c14155710..2a0d506b89 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesConfig.java @@ -96,4 +96,14 @@ default int menuAlpha() { return 255; } + + @ConfigItem( + keyName = "condensePlayerOptions", + name = "Condense player options", + description = "Move player options like Follow and Trade with to submenus" + ) + default boolean condensePlayerOptions() + { + return false; + } } \ No newline at end of file diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesPlugin.java index 73f2fb4997..f624f4d10a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/interfacestyles/InterfaceStylesPlugin.java @@ -33,11 +33,15 @@ import net.runelite.api.Client; import net.runelite.api.GameState; import net.runelite.api.HealthBar; +import net.runelite.api.MenuAction; +import net.runelite.api.MenuEntry; +import net.runelite.api.Player; import net.runelite.api.SpriteID; import net.runelite.api.SpritePixels; import net.runelite.api.events.BeforeMenuRender; -import net.runelite.api.events.BeforeRender; import net.runelite.api.events.GameStateChanged; +import net.runelite.api.events.MenuOpened; +import net.runelite.api.events.PostClientTick; import net.runelite.api.events.PostHealthBar; import net.runelite.api.events.ScriptCallbackEvent; import net.runelite.api.widgets.Widget; @@ -129,6 +133,57 @@ public void onConfigChanged(ConfigChanged config) } } + // Use a higher priority so that player menu entries added by other sources are added to the player's submenu + @Subscribe(priority = 1) + public void onMenuOpened(MenuOpened event) + { + if (config.condensePlayerOptions()) + { + condensePlayerOptions(); + } + } + + private void condensePlayerOptions() + { + MenuEntry[] menuEntries = client.getMenuEntries(); + MenuEntry parentMenu = null; + Player prev = null; + for (int i = menuEntries.length - 1; i >= 0; --i) + { + MenuEntry menuEntry = menuEntries[i]; + MenuAction type = menuEntry.getType(); + + Player player = menuEntry.getPlayer(); + if (player != null && type != MenuAction.ITEM_USE_ON_PLAYER && type != MenuAction.WIDGET_TARGET_ON_PLAYER) + { + if (prev != player) + { + // This works by making the top most player menu the submenu, then adding a new + // menu with a copy of what this one was. + MenuEntry copy = client.createMenuEntry(-1) + .setIdentifier(menuEntry.getIdentifier()) + .setOption(menuEntry.getOption()) + .setTarget(menuEntry.getTarget()) + .setType(menuEntry.getType()) + .setParam0(menuEntry.getParam0()) + .setParam1(menuEntry.getParam1()) + .setDeprioritized(menuEntry.isDeprioritized()); + + menuEntry.setOption(""); + menuEntry.setType(MenuAction.RUNELITE_SUBMENU); + menuEntry.setDeprioritized(false); + + parentMenu = menuEntry; + menuEntry = copy; + } + + menuEntry.setParent(parentMenu); + } + + prev = player; + } + } + @Subscribe public void onScriptCallbackEvent(ScriptCallbackEvent event) { @@ -141,7 +196,7 @@ public void onScriptCallbackEvent(ScriptCallbackEvent event) } @Subscribe - public void onBeforeRender(BeforeRender event) + public void onPostClientTick(PostClientTick event) { adjustWidgetDimensions(); } @@ -194,6 +249,11 @@ else if (config.menuAlpha() != 255) private void overrideSprites() { final Skin configuredSkin = config.skin(); + if (configuredSkin == Skin.DEFAULT) + { + return; + } + for (SpriteOverride spriteOverride : SpriteOverride.values()) { for (Skin skin : spriteOverride.getSkin()) @@ -232,6 +292,11 @@ private void restoreSprites() private void overrideWidgetSprites() { final Skin configuredSkin = config.skin(); + if (configuredSkin == Skin.DEFAULT) + { + return; + } + for (WidgetOverride widgetOverride : WidgetOverride.values()) { if (widgetOverride.getSkin() == configuredSkin @@ -283,9 +348,15 @@ private SpritePixels getFileSpritePixels(String file) private void adjustWidgetDimensions() { + var skin = config.skin(); + if (skin == Skin.DEFAULT) + { + return; + } + for (WidgetOffset widgetOffset : WidgetOffset.values()) { - if (widgetOffset.getSkin() != config.skin()) + if (widgetOffset.getSkin() != skin) { continue; } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java index c01738619b..d1805e2327 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/npcunaggroarea/NpcAggroAreaPlugin.java @@ -296,17 +296,20 @@ private boolean isNpcMatch(NPC npc) private void checkAreaNpcs(final NPC... npcs) { - for (NPC npc : npcs) + if (!active) { - if (npc == null) + for (NPC npc : npcs) { - continue; - } + if (npc == null) + { + continue; + } - if (isNpcMatch(npc)) - { - active = true; - break; + if (isNpcMatch(npc)) + { + active = true; + break; + } } } @@ -322,7 +325,7 @@ private void recheckActive() @Subscribe(priority = -1) // run after slayer plugin so targets has time to populate public void onNpcSpawned(NpcSpawned event) { - if (config.alwaysActive()) + if (active) { return; } @@ -479,7 +482,7 @@ public void onGameStateChanged(GameStateChanged event) onLogin(); } - calculateLinesToDisplay(); // scene base has changed, so the lines need to be recomputed + recheckActive(); break; case LOGGING_IN: diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/party/PartyPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/party/PartyPlugin.java index a59e81beb1..eb40787523 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/party/PartyPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/party/PartyPlugin.java @@ -491,11 +491,6 @@ private void checkStateChanged(boolean forceSend) return; } - if (!forceSend && client.getTickCount() % messageFreq(party.getMembers().size()) != 0) - { - return; - } - final int healthCurrent = client.getBoostedSkillLevel(Skill.HITPOINTS); final int prayerCurrent = client.getBoostedSkillLevel(Skill.PRAYER); final int healthMax = client.getRealSkillLevel(Skill.HITPOINTS); @@ -508,55 +503,62 @@ private void checkStateChanged(boolean forceSend) final Player localPlayer = client.getLocalPlayer(); final String characterName = Strings.nullToEmpty(localPlayer != null && client.getGameState().getState() >= GameState.LOADING.getState() ? localPlayer.getName() : null); - boolean shouldSend = false; + boolean hasChange = false; + boolean canDelay = !forceSend; final StatusUpdate update = new StatusUpdate(); if (forceSend || !characterName.equals(lastStatus.getCharacterName())) { - shouldSend = true; + hasChange = true; update.setCharacterName(characterName); } if (forceSend || healthCurrent != lastStatus.getHealthCurrent()) { - shouldSend = true; + hasChange = true; update.setHealthCurrent(healthCurrent); } if (forceSend || healthMax != lastStatus.getHealthMax()) { - shouldSend = true; + hasChange = true; update.setHealthMax(healthMax); } if (forceSend || prayerCurrent != lastStatus.getPrayerCurrent()) { - shouldSend = true; + hasChange = true; update.setPrayerCurrent(prayerCurrent); } if (forceSend || prayerMax != lastStatus.getPrayerMax()) { - shouldSend = true; + hasChange = true; update.setPrayerMax(prayerMax); } if (forceSend || runEnergy != lastStatus.getRunEnergy()) { - shouldSend = true; + hasChange = true; update.setRunEnergy(runEnergy); } if (forceSend || specEnergy != lastStatus.getSpecEnergy()) { - shouldSend = true; + hasChange = true; + canDelay = !forceSend && specEnergy - lastStatus.getSpecEnergy() == 10; // delay regen update.setSpecEnergy(specEnergy); } if (forceSend || vengActive != lastStatus.getVengeanceActive()) { - shouldSend = true; + hasChange = true; update.setVengeanceActive(vengActive); } if (forceSend || !Objects.equals(memberColor, lastStatus.getMemberColor())) { - shouldSend = true; + hasChange = true; update.setMemberColor(memberColor); } - if (shouldSend) + if (canDelay && client.getTickCount() % messageFreq(party.getMembers().size()) != 0) + { + return; + } + + if (hasChange) { party.send(update); // non-null values for next-tick comparison diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerReorder.java b/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerReorder.java index 572b7af6c4..5cdd96671d 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerReorder.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/prayer/PrayerReorder.java @@ -368,17 +368,13 @@ private void rebuildPrayers(boolean unlocked) int widgetConfig = prayerWidget.getClickMask(); if (unlocked) { - // allow dragging of this widget - widgetConfig |= DRAG; - // allow this widget to be dragged on - widgetConfig |= DRAG_ON; + // allow dragging of this widget & to be dragged on + widgetConfig |= DRAG | DRAG_ON; } else { - // remove drag flag - widgetConfig &= ~DRAG; - // remove drag on flag - widgetConfig &= ~DRAG_ON; + // remove drag flag & drag on flags + widgetConfig &= ~(DRAG | DRAG_ON); } prayerWidget.setClickMask(widgetConfig); diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java index f6d7564df2..e13f885411 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/roofremoval/RoofRemovalPlugin.java @@ -47,6 +47,7 @@ import static net.runelite.api.Constants.ROOF_FLAG_HOVERED; import static net.runelite.api.Constants.ROOF_FLAG_POSITION; import net.runelite.api.GameState; +import net.runelite.api.Scene; import net.runelite.api.Tile; import net.runelite.api.coords.WorldPoint; import net.runelite.api.events.GameStateChanged; @@ -103,11 +104,20 @@ public void startUp() throws IOException loadRoofOverrides(); clientThread.invoke(() -> { + Scene scene = client.getScene(); + if (scene == null) + { + // this races with client startup which may not have the scene initialized yet + return false; + } + + scene.setRoofRemovalMode(buildRoofRemovalFlags()); + if (client.getGameState() == GameState.LOGGED_IN) { performRoofRemoval(); } - client.getScene().setRoofRemovalMode(buildRoofRemovalFlags()); + return true; }); } diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java index a39a531d66..d114e9fc3a 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/screenshot/ScreenshotConfig.java @@ -35,7 +35,7 @@ public interface ScreenshotConfig extends Config { @ConfigSection( name = "What to Screenshot", - description = "All the options that select what to screenshot", + description = "All the options that select what to screenshot.", position = 99 ) String whatSection = "what"; @@ -43,7 +43,7 @@ public interface ScreenshotConfig extends Config @ConfigItem( keyName = "includeFrame", name = "Include Client Frame", - description = "Configures whether or not the client frame is included in screenshots", + description = "Configures whether or not the client frame is included in screenshots.", position = 0 ) default boolean includeFrame() @@ -54,7 +54,7 @@ default boolean includeFrame() @ConfigItem( keyName = "displayDate", name = "Display Date", - description = "Configures whether or not the report button shows the date the screenshot was taken", + description = "Configures whether or not the report button shows the date the screenshot was taken.", position = 1 ) default boolean displayDate() @@ -65,7 +65,7 @@ default boolean displayDate() @ConfigItem( keyName = "notifyWhenTaken", name = "Notify When Taken", - description = "Configures whether or not you are notified when a screenshot has been taken", + description = "Configures whether or not you are notified when a screenshot has been taken.", position = 2 ) default boolean notifyWhenTaken() @@ -76,7 +76,7 @@ default boolean notifyWhenTaken() @ConfigItem( keyName = "copyToClipboard", name = "Copy to clipboard", - description = "Copies the saved screenshot to clipboard", + description = "Copies the saved screenshot to clipboard.", position = 4 ) default boolean copyToClipboard() @@ -87,7 +87,7 @@ default boolean copyToClipboard() @ConfigItem( keyName = "hotkey", name = "Screenshot hotkey", - description = "When you press this key a screenshot will be taken", + description = "When you press this key a screenshot will be taken.", position = 4 ) default Keybind hotkey() @@ -98,7 +98,7 @@ default Keybind hotkey() @ConfigItem( keyName = "rewards", name = "Screenshot Rewards", - description = "Configures whether screenshots are taken of clues, barrows, and quest completion", + description = "Configures whether screenshots are taken of clues, barrows, and quest completion.", position = 3, section = whatSection ) @@ -110,7 +110,7 @@ default boolean screenshotRewards() @ConfigItem( keyName = "levels", name = "Screenshot Levels", - description = "Configures whether screenshots are taken of level ups", + description = "Configures whether screenshots are taken of level ups.", position = 4, section = whatSection ) @@ -122,7 +122,7 @@ default boolean screenshotLevels() @ConfigItem( keyName = "kingdom", name = "Screenshot Kingdom Reward", - description = "Configures whether screenshots are taken of Kingdom Reward", + description = "Configures whether screenshots are taken of Kingdom Reward.", position = 5, section = whatSection ) @@ -134,7 +134,7 @@ default boolean screenshotKingdom() @ConfigItem( keyName = "pets", name = "Screenshot Pet", - description = "Configures whether screenshots are taken of receiving pets", + description = "Configures whether screenshots are taken of receiving pets.", position = 6, section = whatSection ) @@ -146,7 +146,7 @@ default boolean screenshotPet() @ConfigItem( keyName = "kills", name = "Screenshot PvP Kills", - description = "Configures whether or not screenshots are automatically taken of PvP kills", + description = "Configures whether or not screenshots are automatically taken of PvP kills.", position = 8, section = whatSection ) @@ -158,7 +158,7 @@ default boolean screenshotKills() @ConfigItem( keyName = "boss", name = "Screenshot Boss Kills", - description = "Configures whether or not screenshots are automatically taken of boss kills", + description = "Configures whether or not screenshots are automatically taken of boss kills.", position = 9, section = whatSection ) @@ -218,7 +218,8 @@ default boolean screenshotDuels() @ConfigItem( keyName = "valuableDrop", name = "Screenshot Valuable drops", - description = "Configures whether or not screenshots are automatically taken when you receive a valuable drop.", + description = "Configures whether or not screenshots are automatically taken when you receive a valuable drop.
" + + "Requires 'Loot drop notifications' to be enabled in the RuneScape settings.", position = 14, section = whatSection ) @@ -230,7 +231,8 @@ default boolean screenshotValuableDrop() @ConfigItem( keyName = "valuableDropThreshold", name = "Valuable Threshold", - description = "The minimum value to save screenshots of valuable drops.", + description = "The minimum value to save screenshots of valuable drops.
" + + "Requires 'Minimum item value needed for loot notification' to be set to a lesser or equal value in the RuneScape settings.", position = 15, section = whatSection ) @@ -242,7 +244,8 @@ default int valuableDropThreshold() @ConfigItem( keyName = "untradeableDrop", name = "Screenshot Untradeable drops", - description = "Configures whether or not screenshots are automatically taken when you receive an untradeable drop.", + description = "Configures whether or not screenshots are automatically taken when you receive an untradeable drop.
" + + "Requires 'Untradeable loot notifications' to be enabled in the RuneScape settings.", position = 16, section = whatSection ) @@ -278,7 +281,8 @@ default boolean screenshotHighGamble() @ConfigItem( keyName = "collectionLogEntries", name = "Screenshot collection log entries", - description = "Take a screenshot when completing an entry in the collection log", + description = "Take a screenshot when completing an entry in the collection log.
" + + "Requires 'Collection log - New addition notification' to be enabled in the RuneScape settings.", position = 19, section = whatSection ) @@ -290,7 +294,7 @@ default boolean screenshotCollectionLogEntries() @ConfigItem( keyName = "combatAchievements", name = "Screenshot combat achievements", - description = "Take a screenshot when completing a combat achievement task", + description = "Take a screenshot when completing a combat achievement task.", position = 20, section = whatSection ) @@ -302,7 +306,7 @@ default boolean screenshotCombatAchievements() @ConfigItem( keyName = "wildernessLootChest", name = "Screenshot wilderness loot chest", - description = "Take a screenshot when opening wilderness loot chest", + description = "Take a screenshot when opening wilderness loot chest.", position = 21, section = whatSection ) diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/wiki/WikiDpsManager.java b/runelite-client/src/main/java/net/runelite/client/plugins/wiki/WikiDpsManager.java new file mode 100644 index 0000000000..f2a31c36d8 --- /dev/null +++ b/runelite-client/src/main/java/net/runelite/client/plugins/wiki/WikiDpsManager.java @@ -0,0 +1,439 @@ +/* + * Copyright (c) 2024 LlemonDuck + * Copyright (c) 2024, Jayden Bailey + * Copyright (c) 2024, 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.plugins.wiki; + +import com.google.gson.Gson; +import com.google.gson.JsonArray; +import com.google.gson.JsonObject; +import java.io.IOException; +import javax.annotation.Nullable; +import javax.inject.Inject; +import javax.inject.Singleton; +import lombok.Getter; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import net.runelite.api.Client; +import net.runelite.api.EquipmentInventorySlot; +import net.runelite.api.InventoryID; +import net.runelite.api.Item; +import net.runelite.api.ItemContainer; +import net.runelite.api.ItemID; +import net.runelite.api.ScriptID; +import net.runelite.api.Skill; +import net.runelite.api.SpriteID; +import net.runelite.api.VarPlayer; +import net.runelite.api.Varbits; +import net.runelite.api.annotations.Component; +import net.runelite.api.events.ScriptPreFired; +import net.runelite.api.widgets.ComponentID; +import net.runelite.api.widgets.InterfaceID; +import net.runelite.api.widgets.JavaScriptCallback; +import net.runelite.api.widgets.Widget; +import net.runelite.api.widgets.WidgetType; +import net.runelite.api.widgets.WidgetUtil; +import net.runelite.client.callback.ClientThread; +import net.runelite.client.eventbus.EventBus; +import net.runelite.client.eventbus.Subscribe; +import net.runelite.client.util.LinkBrowser; +import okhttp3.Call; +import okhttp3.Callback; +import okhttp3.MediaType; +import okhttp3.OkHttpClient; +import okhttp3.Request; +import okhttp3.RequestBody; +import okhttp3.Response; + +@Slf4j +@Singleton +class WikiDpsManager +{ + private static final int[] SPRITE_IDS_INACTIVE = { + SpriteID.DIALOG_BACKGROUND_BRIGHTER, + SpriteID.WORLD_MAP_BUTTON_METAL_CORNER_TOP_LEFT, + SpriteID.WORLD_MAP_BUTTON_METAL_CORNER_TOP_RIGHT, + SpriteID.WORLD_MAP_BUTTON_METAL_CORNER_BOTTOM_LEFT, + SpriteID.WORLD_MAP_BUTTON_METAL_CORNER_BOTTOM_RIGHT, + SpriteID.WORLD_MAP_BUTTON_EDGE_LEFT, + SpriteID.WORLD_MAP_BUTTON_EDGE_TOP, + SpriteID.WORLD_MAP_BUTTON_EDGE_RIGHT, + SpriteID.WORLD_MAP_BUTTON_EDGE_BOTTOM, + }; + + private static final int[] SPRITE_IDS_ACTIVE = { + SpriteID.RESIZEABLE_MODE_SIDE_PANEL_BACKGROUND, + SpriteID.EQUIPMENT_BUTTON_METAL_CORNER_TOP_LEFT_HOVERED, + SpriteID.EQUIPMENT_BUTTON_METAL_CORNER_TOP_RIGHT_HOVERED, + SpriteID.EQUIPMENT_BUTTON_METAL_CORNER_BOTTOM_LEFT_HOVERED, + SpriteID.EQUIPMENT_BUTTON_METAL_CORNER_BOTTOM_RIGHT_HOVERED, + SpriteID.EQUIPMENT_BUTTON_EDGE_LEFT_HOVERED, + SpriteID.EQUIPMENT_BUTTON_EDGE_TOP_HOVERED, + SpriteID.EQUIPMENT_BUTTON_EDGE_RIGHT_HOVERED, + SpriteID.EQUIPMENT_BUTTON_EDGE_BOTTOM_HOVERED, + }; + + private static final int FONT_COLOUR_INACTIVE = 0xff981f; + private static final int FONT_COLOUR_ACTIVE = 0xffffff; + + private static final String UI_ENDPOINT = "https://tools.runescape.wiki/osrs-dps/"; + private static final String SHORTLINK_ENDPOINT = "https://tools.runescape.wiki/osrs-dps/shortlink"; + + private final Client client; + private final ClientThread clientThread; + private final EventBus eventBus; + private final OkHttpClient okHttpClient; + private final Gson gson; + + @Inject + private WikiDpsManager( + Client client, + ClientThread clientThread, + EventBus eventBus, + OkHttpClient okHttpClient, + Gson gson + ) + { + this.client = client; + this.clientThread = clientThread; + this.eventBus = eventBus; + this.okHttpClient = okHttpClient; + this.gson = gson; + } + + public void startUp() + { + eventBus.register(this); + clientThread.invokeLater(() -> tryAddButton(this::launch)); + } + + public void shutDown() + { + eventBus.unregister(this); + clientThread.invokeLater(this::removeButton); + } + + @Subscribe + public void onScriptPreFired(ScriptPreFired scriptPreFired) + { + if (scriptPreFired.getScriptId() == ScriptID.EQUIPMENT_SET_STAT_BONUS_SETUP) + { + int interfaceId = WidgetUtil.componentToInterface((int) scriptPreFired.getScriptEvent().getArguments()[1]); + boolean setBonus = (int) scriptPreFired.getScriptEvent().getArguments()[4] == 1; + + if (!setBonus) + { + if (interfaceId == InterfaceID.BANK_EQUIPMENT) + { + clientThread.invokeLater(() -> addButton(Screen.BANK_EQUIPMENT, this::launch)); + } + else if (interfaceId == InterfaceID.EQUIPMENT_BONUSES) + { + addButton(Screen.EQUIPMENT_BONUSES, this::launch); + } + } + } + } + + @Getter + @RequiredArgsConstructor + enum Screen + { + EQUIPMENT_BONUSES(ComponentID.EQUIPMENT_BONUSES_PARENT, ComponentID.EQUIPMENT_BONUSES_SET_BONUS, ComponentID.EQUIPMENT_BONUSES_STAT_BONUS, 55), + BANK_EQUIPMENT(ComponentID.BANK_EQUIPMENT_PARENT, ComponentID.BANK_EQUIPMENT_SET_BONUS, ComponentID.BANK_EQUIPMENT_STAT_BONUS, 49), + ; + + /** + * parent widget of the interface, install target + */ + @Getter(onMethod_ = @Component) + private final int parentId; + + /** + * the "Set Bonus" button widget layer + */ + @Getter(onMethod_ = @Component) + private final int setBonusId; + + /** + * the "Stat Bonus" button widget layer, which replaces "Set Bonus" after it is clicked + */ + @Getter(onMethod_ = @Component) + private final int statBonusId; + + /** + * OriginalX for Set Bonus and Stat Bonus, prior to us moving them around (for shutdown) + **/ + private final int originalX; + + } + + void tryAddButton(Runnable onClick) + { + for (Screen screen : Screen.values()) + { + addButton(screen, onClick); + } + } + + /** + * Shifts over the Set Bonus / Stat Bonus buttons + * and adds new widgets to make a visually equal button with a different name. + */ + void addButton(Screen screen, Runnable onClick) + { + Widget parent = client.getWidget(screen.getParentId()); + Widget setBonus = client.getWidget(screen.getSetBonusId()); + Widget statBonus = client.getWidget(screen.getStatBonusId()); + Widget[] refComponents; + if (parent == null || setBonus == null || statBonus == null || (refComponents = setBonus.getChildren()) == null) + { + return; + } + + // Since the Set Bonus button uses absolute positioning, + // we must also use absolute for all the children below, + // which means it's necessary to offset the values by simulating corresponding pos/size modes. + int padding = 8; + int w = setBonus.getOriginalWidth(); + int h = setBonus.getOriginalHeight(); + int x = setBonus.getOriginalX() + (w / 2) + (padding / 2); + int y = setBonus.getOriginalY(); + if (screen == Screen.BANK_EQUIPMENT) // uses ABSOLUTE_CENTER + { + y += parent.getHeight() / 2 - setBonus.getHeight() / 2; + } + + // now shift the Set Bonus and Stat Bonus buttons over a bit to make room + setBonus.setOriginalX(setBonus.getOriginalX() - (w / 2) - (padding / 2)) + .revalidate(); + statBonus.setOriginalX(statBonus.getOriginalX() - (w / 2) - (padding / 2)) + .revalidate(); + + final Widget[] spriteWidgets = new Widget[9]; + + // the background uses ABSOLUTE_CENTER and MINUS sizing + int bgWidth = w - refComponents[0].getOriginalWidth(); + int bgHeight = h - refComponents[0].getOriginalHeight(); + int bgX = (x + refComponents[0].getOriginalX()) + (w - bgWidth) / 2; + int bgY = (y + refComponents[0].getOriginalY()) + (h - bgHeight) / 2; + spriteWidgets[0] = parent.createChild(-1, WidgetType.GRAPHIC) + .setSpriteId(refComponents[0].getSpriteId()) + .setPos(bgX, bgY) + .setSize(bgWidth, bgHeight); + spriteWidgets[0].revalidate(); + + // borders and corners all use absolute positioning which is easy + for (int i = 1; i < 9; i++) + { + spriteWidgets[i] = parent.createChild(-1, WidgetType.GRAPHIC) + .setSpriteId(refComponents[i].getSpriteId()) + .setPos(x + refComponents[i].getOriginalX(), y + refComponents[i].getOriginalY()) + .setSize(refComponents[i].getOriginalWidth(), refComponents[i].getOriginalHeight()); + spriteWidgets[i].revalidate(); + } + + // text label uses ABSOLUTE_CENTER positioning and MINUS sizing, + // but matches size of parent so effectively no-op + final Widget text = parent.createChild(-1, WidgetType.TEXT) + .setText("View DPS") + .setTextColor(FONT_COLOUR_INACTIVE) + .setFontId(refComponents[9].getFontId()) + .setTextShadowed(refComponents[9].getTextShadowed()) + .setXTextAlignment(refComponents[9].getXTextAlignment()) + .setYTextAlignment(refComponents[9].getYTextAlignment()) + .setPos(x, y) + .setSize(w, h); + text.revalidate(); + + // we'll give the text layer the listeners since it covers the whole area + text.setHasListener(true); + text.setOnMouseOverListener((JavaScriptCallback) ev -> + { + for (int i = 0; i <= 8; i++) + { + spriteWidgets[i].setSpriteId(SPRITE_IDS_ACTIVE[i]); + } + text.setTextColor(FONT_COLOUR_ACTIVE); + }); + text.setOnMouseLeaveListener((JavaScriptCallback) ev -> + { + for (int i = 0; i <= 8; i++) + { + spriteWidgets[i].setSpriteId(SPRITE_IDS_INACTIVE[i]); + } + text.setTextColor(FONT_COLOUR_INACTIVE); + }); + + // register a click listener + text.setAction(0, "View DPS on OSRS Wiki"); + text.setOnOpListener((JavaScriptCallback) ev -> onClick.run()); + + // recompute locations / sizes on parent + parent.revalidate(); + } + + void removeButton() + { + for (Screen screen : Screen.values()) + { + Widget parent = client.getWidget(screen.getParentId()); + if (parent != null) + { + parent.deleteAllChildren(); + parent.revalidate(); + } + + Widget setBonus = client.getWidget(screen.getSetBonusId()); + if (setBonus != null) + { + setBonus.setOriginalX(screen.getOriginalX()) + .revalidate(); + } + + Widget statBonus = client.getWidget(screen.getStatBonusId()); + if (statBonus != null) + { + statBonus.setOriginalX(screen.getOriginalX()) + .revalidate(); + } + } + } + + @Nullable + private JsonObject createEquipmentObject(ItemContainer itemContainer, EquipmentInventorySlot slot) + { + if (itemContainer == null) + { + return null; + } + + if (slot == EquipmentInventorySlot.BOOTS && itemContainer.count() == 1 && itemContainer.contains(ItemID.CHEFS_HAT)) + { + JsonObject o = new JsonObject(); + o.addProperty("id", ItemID.SNAIL_SHELL); + return o; + } + + Item item = itemContainer.getItem(slot.getSlotIdx()); + if (item != null) + { + JsonObject o = new JsonObject(); + o.addProperty("id", item.getId()); + return o; + } + return null; + } + + private JsonObject buildShortlinkData() + { + JsonObject j = new JsonObject(); + + // Build the player's loadout data + JsonArray loadouts = new JsonArray(); + ItemContainer eqContainer = client.getItemContainer(InventoryID.EQUIPMENT); + + JsonObject l = new JsonObject(); + JsonObject eq = new JsonObject(); + + eq.add("ammo", createEquipmentObject(eqContainer, EquipmentInventorySlot.AMMO)); + eq.add("body", createEquipmentObject(eqContainer, EquipmentInventorySlot.BODY)); + eq.add("cape", createEquipmentObject(eqContainer, EquipmentInventorySlot.CAPE)); + eq.add("feet", createEquipmentObject(eqContainer, EquipmentInventorySlot.BOOTS)); + eq.add("hands", createEquipmentObject(eqContainer, EquipmentInventorySlot.GLOVES)); + eq.add("head", createEquipmentObject(eqContainer, EquipmentInventorySlot.HEAD)); + eq.add("legs", createEquipmentObject(eqContainer, EquipmentInventorySlot.LEGS)); + eq.add("neck", createEquipmentObject(eqContainer, EquipmentInventorySlot.AMULET)); + eq.add("ring", createEquipmentObject(eqContainer, EquipmentInventorySlot.RING)); + eq.add("shield", createEquipmentObject(eqContainer, EquipmentInventorySlot.SHIELD)); + eq.add("weapon", createEquipmentObject(eqContainer, EquipmentInventorySlot.WEAPON)); + l.add("equipment", eq); + + JsonObject skills = new JsonObject(); + skills.addProperty("atk", client.getRealSkillLevel(Skill.ATTACK)); + skills.addProperty("def", client.getRealSkillLevel(Skill.DEFENCE)); + skills.addProperty("hp", client.getRealSkillLevel(Skill.HITPOINTS)); + skills.addProperty("magic", client.getRealSkillLevel(Skill.MAGIC)); + skills.addProperty("mining", client.getRealSkillLevel(Skill.MINING)); + skills.addProperty("prayer", client.getRealSkillLevel(Skill.PRAYER)); + skills.addProperty("ranged", client.getRealSkillLevel(Skill.RANGED)); + skills.addProperty("str", client.getRealSkillLevel(Skill.STRENGTH)); + l.add("skills", skills); + + JsonObject buffs = new JsonObject(); + buffs.addProperty("inWilderness", client.getVarbitValue(Varbits.IN_WILDERNESS) == 1); + buffs.addProperty("kandarinDiary", client.getVarbitValue(Varbits.DIARY_KANDARIN_HARD) == 1); + buffs.addProperty("onSlayerTask", client.getVarpValue(VarPlayer.SLAYER_TASK_SIZE) > 0); + buffs.addProperty("chargeSpell", client.getVarpValue(VarPlayer.CHARGE_GOD_SPELL) > 0); + l.add("buffs", buffs); + + l.addProperty("name", client.getLocalPlayer().getName()); + + loadouts.add(l); + j.add("loadouts", loadouts); + + return j; + } + + private static class ShortlinkResponse + { + String data; + } + + void launch() + { + JsonObject jsonBody = buildShortlinkData(); + Request request = new Request.Builder() + .url(SHORTLINK_ENDPOINT) + .post(RequestBody.create(MediaType.parse("application/json; charset=utf-8"), jsonBody.toString())) + .build(); + + okHttpClient.newCall(request).enqueue(new Callback() + { + @Override + public void onFailure(Call call, IOException e) + { + log.warn("Failed to create shortlink for DPS calculator", e); + } + + @Override + public void onResponse(Call call, Response response) + { + try (response) + { + if (response.isSuccessful() && response.body() != null) + { + ShortlinkResponse resp = gson.fromJson(response.body().charStream(), ShortlinkResponse.class); + LinkBrowser.browse(UI_ENDPOINT + "?id=" + resp.data); + } + else + { + log.warn("Failed to create shortlink for DPS calculator: http status {}", response.code()); + } + } + } + }); + } +} diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/wiki/WikiPlugin.java b/runelite-client/src/main/java/net/runelite/client/plugins/wiki/WikiPlugin.java index 5a88c31327..092d8b5063 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/wiki/WikiPlugin.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/wiki/WikiPlugin.java @@ -94,6 +94,9 @@ public class WikiPlugin extends Plugin @Inject private Provider wikiSearchChatboxTextInputProvider; + @Inject + private WikiDpsManager wikiDpsManager; + private Widget icon; private boolean wikiSelected = false; @@ -110,12 +113,14 @@ WikiConfig getConfig(ConfigManager configManager) public void startUp() { clientThread.invokeLater(this::addWidgets); + wikiDpsManager.startUp(); } @Override public void shutDown() { clientThread.invokeLater(this::removeWidgets); + wikiDpsManager.shutDown(); } private void removeWidgets() @@ -199,12 +204,18 @@ private void addWidgets() final int searchIndex = config.leftClickSearch() ? 4 : 5; icon.setAction(searchIndex, "Search"); + icon.setAction(6, "DPS"); icon.setOnOpListener((JavaScriptCallback) ev -> { - if (ev.getOp() == searchIndex + 1) + int op = ev.getOp() - 1; + if (op == searchIndex) { openSearchInput(); } + else if (op == 6) + { + wikiDpsManager.launch(); + } }); // This doesn't always run because we cancel the menuop diff --git a/runelite-client/src/main/java/net/runelite/client/plugins/woodcutting/WoodcuttingSession.java b/runelite-client/src/main/java/net/runelite/client/plugins/woodcutting/WoodcuttingSession.java index 62c12efd82..bab395c0f0 100644 --- a/runelite-client/src/main/java/net/runelite/client/plugins/woodcutting/WoodcuttingSession.java +++ b/runelite-client/src/main/java/net/runelite/client/plugins/woodcutting/WoodcuttingSession.java @@ -58,9 +58,10 @@ void incrementLogsCut() ++logsCut; Duration elapsed = Duration.between(start, Instant.now()); - if (!elapsed.isZero()) + long elapsedMs = elapsed.toMillis(); + if (logsCut >= 3 && elapsedMs > 0) { - logsPerHr = (int) ((double) logsCut * Duration.ofHours(1).toMillis() / elapsed.toMillis()); + logsPerHr = (int) ((double) logsCut * Duration.ofHours(1).toMillis() / elapsedMs); } } @@ -69,9 +70,10 @@ void incrementBark(int num) bark += num; Duration elapsed = Duration.between(start, Instant.now()); - if (!elapsed.isZero()) + long elapsedMs = elapsed.toMillis(); + if (elapsedMs > 0) { - barkPerHr = (int) ((double) bark * Duration.ofHours(1).toMillis() / elapsed.toMillis()); + barkPerHr = (int) ((double) bark * Duration.ofHours(1).toMillis() / elapsedMs); } } } 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 d7c608350f..ba33937ff8 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 @@ -1312,8 +1312,10 @@ private static void setupDefaults() { // Force heavy-weight popups/tooltips. // Prevents them from being obscured by the game applet. - ToolTipManager.sharedInstance().setLightWeightPopupEnabled(false); - ToolTipManager.sharedInstance().setInitialDelay(300); + var tooltipManager = ToolTipManager.sharedInstance(); + tooltipManager.setLightWeightPopupEnabled(false); + tooltipManager.setInitialDelay(300); + tooltipManager.setDismissDelay(10_000); JPopupMenu.setDefaultLightWeightPopupEnabled(false); // Do not fill in background on repaint. Reduces flickering when diff --git a/runelite-client/src/main/resources/item_variations.json b/runelite-client/src/main/resources/item_variations.json index 5961be1c7d..4cbc80cdd1 100644 --- a/runelite-client/src/main/resources/item_variations.json +++ b/runelite-client/src/main/resources/item_variations.json @@ -742,7 +742,8 @@ 27519, 27520, 27521, - 27522 + 27522, + 28816 ], "mixed chemicals": [ 705, @@ -3933,7 +3934,8 @@ 25925, 27299, 27543, - 28800 + 28800, + 28820 ], "herb tea mix": [ 4464, @@ -9848,6 +9850,10 @@ 25842, 25843 ], + "grubby key": [ + 23499, + 28803 + ], "temple key": [ 23502, 28389 diff --git a/runelite-client/src/main/scripts/ChatBuilder.hash b/runelite-client/src/main/scripts/ChatBuilder.hash index e9b9a443d3..9b63917e47 100644 --- a/runelite-client/src/main/scripts/ChatBuilder.hash +++ b/runelite-client/src/main/scripts/ChatBuilder.hash @@ -1 +1 @@ -23A61A172C500DF4B0FB1500B2B833834BDB7D474D2A9D94548EBA838D0CE766 \ No newline at end of file +4A78CE396EF7493A1FE42C4A29A706F3BA62EE65F99AB118765DD93504ABC682 \ 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 4810fc2057..4e458adf96 100644 --- a/runelite-client/src/main/scripts/ChatBuilder.rs2asm +++ b/runelite-client/src/main/scripts/ChatBuilder.rs2asm @@ -415,12 +415,12 @@ LABEL393: iload 10 iconst -1 if_icmpne LABEL397 - jump LABEL1919 + jump LABEL1946 LABEL397: iload 9 iconst -1 if_icmpne LABEL401 - jump LABEL1919 + jump LABEL1946 LABEL401: iload 10 chat_gethistoryex_byuid @@ -439,7 +439,7 @@ LABEL401: invoke 193 iconst 1 if_icmpeq CHAT_FILTER - jump LABEL1915 + jump LABEL1942 CHAT_FILTER: sload 20 ; Load the message iconst 1 ; Gets changed to 0 if message is blocked @@ -452,7 +452,7 @@ CHAT_FILTER: iconst 1 ; 2nd half of conditional sstore 20 ; Override the message with our filtered message if_icmpeq LABEL419 ; Check if we are building this message - jump LABEL1915 ; continue to next message, skipping this + jump LABEL1942 ; continue to next message, skipping this LABEL419: iload 11 sload 18 @@ -468,7 +468,7 @@ LABEL419: invoke 90 iconst 1 if_icmpeq LABEL434 - jump LABEL1915 + jump LABEL1942 LABEL434: iconst 0 ; splitpmbox iload 10 ; message uid @@ -510,7 +510,7 @@ LABEL434: 107: LABEL1378 113: LABEL1417 114: LABEL1438 - jump LABEL1465 + jump LABEL1492 LABEL437: sload 23 sload 18 @@ -535,7 +535,7 @@ LABEL437: iload 4 invoke 203 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL461: sload 23 sload 18 @@ -560,7 +560,7 @@ LABEL461: iload 4 invoke 203 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL485: sload 23 sconst "From " @@ -588,7 +588,7 @@ LABEL485: iload 4 invoke 203 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL510: sload 23 sload 9 @@ -610,7 +610,7 @@ LABEL510: iload 4 invoke 199 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL531: sload 23 sload 5 @@ -649,7 +649,7 @@ LABEL555: iconst 10616832 if_setontimer LABEL566: - jump LABEL1482 + jump LABEL1509 LABEL567: sload 23 sconst "To " @@ -677,7 +677,7 @@ LABEL567: iload 4 invoke 203 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL592: sload 23 sload 10 @@ -699,7 +699,7 @@ LABEL592: iload 4 invoke 199 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL613: sload 23 sconst "" @@ -721,7 +721,7 @@ LABEL613: iload 4 invoke 199 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL634: sload 23 sconst "[" @@ -751,7 +751,7 @@ LABEL634: iload 4 invoke 203 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL663: sload 20 invoke 632 @@ -777,7 +777,7 @@ LABEL663: iload 4 invoke 199 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL688: sload 20 invoke 632 @@ -803,7 +803,7 @@ LABEL688: iload 4 invoke 199 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL713: iconst 1 activeclansettings_find_affined @@ -1037,7 +1037,7 @@ LABEL899: invoke 4483 istore 7 LABEL931: - jump LABEL1482 + jump LABEL1509 LABEL932: activeclansettings_find_listened iconst 1 @@ -1213,7 +1213,7 @@ LABEL1064: invoke 4483 istore 7 LABEL1096: - jump LABEL1482 + jump LABEL1509 LABEL1097: sload 20 invoke 5309 @@ -1423,7 +1423,7 @@ LABEL1267: invoke 4483 istore 7 LABEL1292: - jump LABEL1482 + jump LABEL1509 LABEL1293: activeclanchannel_find_listened iconst 1 @@ -1482,7 +1482,7 @@ LABEL1325: invoke 4483 istore 7 LABEL1347: - jump LABEL1482 + jump LABEL1509 LABEL1348: sload 20 invoke 2066 @@ -1513,7 +1513,7 @@ LABEL1348: iload 4 invoke 203 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL1378: clientclock iload 12 @@ -1556,7 +1556,7 @@ LABEL1399: invoke 199 istore 7 LABEL1416: - jump LABEL1482 + jump LABEL1509 LABEL1417: sload 23 sload 15 @@ -1578,19 +1578,48 @@ LABEL1417: iload 4 invoke 199 istore 7 - jump LABEL1482 + jump LABEL1509 LABEL1438: sload 20 invoke 632 sstore 20 sstore 18 + sload 18 + string_length + iconst 0 + if_icmpgt LABEL1447 + jump LABEL1471 +LABEL1447: sload 23 sload 18 - sconst ": " + sconst ":" + join_string 2 + sconst "null" + invoke 4742 sload 16 sload 20 sconst "" - join_string 5 + join_string 3 + iload 8 + iload 9 + iconst 10616888 + iload 1 + iconst 3 + iconst 14 + iload 6 + iconst 0 + iconst 103 + iload 3 + iload 4 + invoke 203 + istore 7 + jump LABEL1491 +LABEL1471: + sload 23 + sload 16 + sload 20 + sconst "" + join_string 3 sconst "null" invoke 4742 iload 8 @@ -1606,8 +1635,9 @@ LABEL1438: iload 4 invoke 199 istore 7 - jump LABEL1482 -LABEL1465: +LABEL1491: + jump LABEL1509 +LABEL1492: sload 23 sload 20 sconst "null" @@ -1625,32 +1655,32 @@ LABEL1465: iload 4 invoke 199 istore 7 -LABEL1482: +LABEL1509: iload 9 if_clearops iload 11 switch - 1: LABEL1487 - 2: LABEL1487 - 3: LABEL1487 - 6: LABEL1487 - 7: LABEL1487 - 9: LABEL1487 - 90: LABEL1487 - 91: LABEL1487 - 106: LABEL1487 - 41: LABEL1487 - 44: LABEL1487 - 101: LABEL1604 - 103: LABEL1656 - 104: LABEL1656 - 110: LABEL1656 - 14: LABEL1699 - 109: LABEL1760 - 111: LABEL1803 - 112: LABEL1846 - jump LABEL1889 -LABEL1487: + 1: LABEL1514 + 2: LABEL1514 + 3: LABEL1514 + 6: LABEL1514 + 7: LABEL1514 + 9: LABEL1514 + 90: LABEL1514 + 91: LABEL1514 + 106: LABEL1514 + 41: LABEL1514 + 44: LABEL1514 + 101: LABEL1631 + 103: LABEL1683 + 104: LABEL1683 + 110: LABEL1683 + 14: LABEL1726 + 109: LABEL1787 + 111: LABEL1830 + 112: LABEL1873 + jump LABEL1916 +LABEL1514: sconst "" sload 18 sconst "" @@ -1674,39 +1704,39 @@ LABEL1487: if_setonmouseleave iload 11 iconst 41 - if_icmpne LABEL1512 - jump LABEL1521 -LABEL1512: + if_icmpne LABEL1539 + jump LABEL1548 +LABEL1539: sload 18 invoke 2759 iconst 1 - if_icmpeq LABEL1517 - jump LABEL1521 -LABEL1517: + if_icmpeq LABEL1544 + jump LABEL1548 +LABEL1544: iconst 10 sconst "Crown Info" iload 9 if_setop -LABEL1521: +LABEL1548: sload 0 sload 18 removetags compare iconst 0 - if_icmpne LABEL1528 - jump LABEL1603 -LABEL1528: + if_icmpne LABEL1555 + jump LABEL1630 +LABEL1555: iload 15 iconst 1 - if_icmpeq LABEL1532 - jump LABEL1537 -LABEL1532: + if_icmpeq LABEL1559 + jump LABEL1564 +LABEL1559: iconst 6 sconst "Message" iload 9 if_setop - jump LABEL1545 -LABEL1537: + jump LABEL1572 +LABEL1564: iconst 6 sconst "Add friend" iload 9 @@ -1715,78 +1745,78 @@ LABEL1537: sconst "Add ignore" iload 9 if_setop -LABEL1545: +LABEL1572: iconst 8 sconst "Report" iload 9 if_setop iload 11 iconst 9 - if_icmpeq LABEL1553 - jump LABEL1566 -LABEL1553: + if_icmpeq LABEL1580 + jump LABEL1593 +LABEL1580: clan_getchatcount iconst 0 - if_icmpgt LABEL1557 - jump LABEL1565 -LABEL1557: + if_icmpgt LABEL1584 + jump LABEL1592 +LABEL1584: clan_getchatrank clan_getchatminkick - if_icmpge LABEL1561 - jump LABEL1565 -LABEL1561: + if_icmpge LABEL1588 + jump LABEL1592 +LABEL1588: iconst 9 sconst "Kick" iload 9 if_setop -LABEL1565: - jump LABEL1603 -LABEL1566: +LABEL1592: + jump LABEL1630 +LABEL1593: iload 11 iconst 41 - if_icmpeq LABEL1570 - jump LABEL1603 -LABEL1570: + if_icmpeq LABEL1597 + jump LABEL1630 +LABEL1597: iload 18 iload 19 - if_icmpge LABEL1574 - jump LABEL1603 -LABEL1574: + if_icmpge LABEL1601 + jump LABEL1630 +LABEL1601: iconst 0 activeclanchannel_find_affined iconst 1 - if_icmpeq LABEL1579 - jump LABEL1603 -LABEL1579: + if_icmpeq LABEL1606 + jump LABEL1630 +LABEL1606: sload 18 removetags activeclanchannel_getuserslot istore 17 iload 17 iconst -1 - if_icmpeq LABEL1591 + if_icmpeq LABEL1618 iload 17 activeclanchannel_getuserrank iconst -1 - if_icmple LABEL1591 - jump LABEL1603 -LABEL1591: + if_icmple LABEL1618 + jump LABEL1630 +LABEL1618: iconst 9 sconst "Kick" iload 9 if_setop iload 18 iload 20 - if_icmpge LABEL1599 - jump LABEL1603 -LABEL1599: + if_icmpge LABEL1626 + jump LABEL1630 +LABEL1626: iconst 10 sconst "Ban" iload 9 if_setop -LABEL1603: - jump LABEL1901 -LABEL1604: +LABEL1630: + jump LABEL1928 +LABEL1631: sconst "" sload 18 sconst "" @@ -1810,31 +1840,31 @@ LABEL1604: if_setonmouseleave invoke 5548 iconst 1 - if_icmpeq LABEL1629 - jump LABEL1634 -LABEL1629: + if_icmpeq LABEL1656 + jump LABEL1661 +LABEL1656: iconst 1 sconst "Accept invitation" iload 9 if_setop - jump LABEL1638 -LABEL1634: + jump LABEL1665 +LABEL1661: iconst 1 sconst "Accept trade" iload 9 if_setop -LABEL1638: +LABEL1665: iload 15 iconst 1 - if_icmpeq LABEL1642 - jump LABEL1647 -LABEL1642: + if_icmpeq LABEL1669 + jump LABEL1674 +LABEL1669: iconst 6 sconst "Message" iload 9 if_setop - jump LABEL1655 -LABEL1647: + jump LABEL1682 +LABEL1674: iconst 6 sconst "Add friend" iload 9 @@ -1843,9 +1873,9 @@ LABEL1647: sconst "Add ignore" iload 9 if_setop -LABEL1655: - jump LABEL1901 -LABEL1656: +LABEL1682: + jump LABEL1928 +LABEL1683: sconst "" sload 18 sconst "" @@ -1873,15 +1903,15 @@ LABEL1656: if_setop iload 15 iconst 1 - if_icmpeq LABEL1685 - jump LABEL1690 -LABEL1685: + if_icmpeq LABEL1712 + jump LABEL1717 +LABEL1712: iconst 6 sconst "Message" iload 9 if_setop - jump LABEL1698 -LABEL1690: + jump LABEL1725 +LABEL1717: iconst 6 sconst "Add friend" iload 9 @@ -1890,20 +1920,20 @@ LABEL1690: sconst "Add ignore" iload 9 if_setop -LABEL1698: - jump LABEL1901 -LABEL1699: +LABEL1725: + jump LABEL1928 +LABEL1726: sload 21 string_length iconst 0 - if_icmpgt LABEL1704 - jump LABEL1733 -LABEL1704: + if_icmpgt LABEL1731 + jump LABEL1760 +LABEL1731: iload 13 iconst -1 - if_icmpne LABEL1708 - jump LABEL1733 -LABEL1708: + if_icmpne LABEL1735 + jump LABEL1760 +LABEL1735: iconst 6 sconst "Open" iload 9 @@ -1928,8 +1958,8 @@ LABEL1708: sconst "Iii" iload 9 if_setonmouseleave - jump LABEL1741 -LABEL1733: + jump LABEL1768 +LABEL1760: iconst -1 sconst "" iload 9 @@ -1938,7 +1968,7 @@ LABEL1733: sconst "" iload 9 if_setonmouseleave -LABEL1741: +LABEL1768: iconst 9 sconst "Clear history" iload 9 @@ -1957,8 +1987,8 @@ LABEL1741: sconst "iisi" iload 9 if_setonop - jump LABEL1901 -LABEL1760: + jump LABEL1928 +LABEL1787: sconst "" sload 18 sconst "" @@ -1986,15 +2016,15 @@ LABEL1760: if_setonmouseleave iload 15 iconst 1 - if_icmpeq LABEL1789 - jump LABEL1794 -LABEL1789: + if_icmpeq LABEL1816 + jump LABEL1821 +LABEL1816: iconst 6 sconst "Message" iload 9 if_setop - jump LABEL1802 -LABEL1794: + jump LABEL1829 +LABEL1821: iconst 6 sconst "Add friend" iload 9 @@ -2003,9 +2033,9 @@ LABEL1794: sconst "Add ignore" iload 9 if_setop -LABEL1802: - jump LABEL1901 -LABEL1803: +LABEL1829: + jump LABEL1928 +LABEL1830: sconst "" sload 18 sconst "" @@ -2033,15 +2063,15 @@ LABEL1803: if_setonmouseleave iload 15 iconst 1 - if_icmpeq LABEL1832 - jump LABEL1837 -LABEL1832: + if_icmpeq LABEL1859 + jump LABEL1864 +LABEL1859: iconst 6 sconst "Message" iload 9 if_setop - jump LABEL1845 -LABEL1837: + jump LABEL1872 +LABEL1864: iconst 6 sconst "Add friend" iload 9 @@ -2050,9 +2080,9 @@ LABEL1837: sconst "Add ignore" iload 9 if_setop -LABEL1845: - jump LABEL1901 -LABEL1846: +LABEL1872: + jump LABEL1928 +LABEL1873: sconst "" sload 18 sconst "" @@ -2080,15 +2110,15 @@ LABEL1846: if_setonmouseleave iload 15 iconst 1 - if_icmpeq LABEL1875 - jump LABEL1880 -LABEL1875: + if_icmpeq LABEL1902 + jump LABEL1907 +LABEL1902: iconst 6 sconst "Message" iload 9 if_setop - jump LABEL1888 -LABEL1880: + jump LABEL1915 +LABEL1907: iconst 6 sconst "Add friend" iload 9 @@ -2097,9 +2127,9 @@ LABEL1880: sconst "Add ignore" iload 9 if_setop -LABEL1888: - jump LABEL1901 -LABEL1889: +LABEL1915: + jump LABEL1928 +LABEL1916: iconst -1 sconst "" iload 9 @@ -2112,7 +2142,7 @@ LABEL1889: sconst "" iload 9 if_setonmouseleave -LABEL1901: +LABEL1928: iload 6 iload 7 sub @@ -2127,20 +2157,20 @@ LABEL1901: iload 8 enum istore 9 -LABEL1915: +LABEL1942: iload 10 chat_getprevuid istore 10 jump LABEL393 -LABEL1919: +LABEL1946: iload 8 istore 22 -LABEL1921: +LABEL1948: iload 9 iconst -1 - if_icmpne LABEL1925 - jump LABEL2008 -LABEL1925: + if_icmpne LABEL1952 + jump LABEL2035 +LABEL1952: iload 9 if_clearops iconst -1 @@ -2167,14 +2197,14 @@ LABEL1925: multiply cc_find iconst 1 - if_icmpeq LABEL1953 - jump LABEL1957 -LABEL1953: + if_icmpeq LABEL1980 + jump LABEL1984 +LABEL1980: sconst "" cc_settext iconst 1 cc_sethide -LABEL1957: +LABEL1984: iconst 10616888 iload 8 iconst 4 @@ -2183,14 +2213,14 @@ LABEL1957: add cc_find iconst 1 - if_icmpeq LABEL1967 - jump LABEL1971 -LABEL1967: + if_icmpeq LABEL1994 + jump LABEL1998 +LABEL1994: sconst "" cc_settext iconst 1 cc_sethide -LABEL1971: +LABEL1998: iconst 10616888 iload 8 iconst 4 @@ -2199,14 +2229,14 @@ LABEL1971: add cc_find iconst 1 - if_icmpeq LABEL1981 - jump LABEL1985 -LABEL1981: + if_icmpeq LABEL2008 + jump LABEL2012 +LABEL2008: sconst "" cc_settext iconst 1 cc_sethide -LABEL1985: +LABEL2012: iconst 10616888 iload 8 iconst 4 @@ -2215,12 +2245,12 @@ LABEL1985: add cc_find iconst 1 - if_icmpeq LABEL1995 - jump LABEL1997 -LABEL1995: + if_icmpeq LABEL2022 + jump LABEL2024 +LABEL2022: iconst 1 cc_sethide -LABEL1997: +LABEL2024: iload 8 iconst 1 add @@ -2231,8 +2261,8 @@ LABEL1997: iload 8 enum istore 9 - jump LABEL1921 -LABEL2008: + jump LABEL1948 +LABEL2035: iload 6 iconst 2 sub @@ -2246,20 +2276,20 @@ LABEL2008: istore 23 iload 6 iload 23 - if_icmpgt LABEL2023 - jump LABEL2025 -LABEL2023: + if_icmpgt LABEL2050 + jump LABEL2052 +LABEL2050: iload 6 istore 23 -LABEL2025: +LABEL2052: iload 22 istore 8 -LABEL2027: +LABEL2054: iload 8 iconst 0 - if_icmpgt LABEL2031 - jump LABEL2114 -LABEL2031: + if_icmpgt LABEL2058 + jump LABEL2141 +LABEL2058: iload 8 iconst 1 sub @@ -2290,15 +2320,15 @@ LABEL2031: multiply cc_find iconst 1 - if_icmpeq LABEL2063 - jump LABEL2068 -LABEL2063: + if_icmpeq LABEL2090 + jump LABEL2095 +LABEL2090: cc_getx iload 6 iconst 0 iconst 0 cc_setposition -LABEL2068: +LABEL2095: iconst 10616888 iload 8 iconst 4 @@ -2307,15 +2337,15 @@ LABEL2068: add cc_find iconst 1 - if_icmpeq LABEL2078 - jump LABEL2083 -LABEL2078: + if_icmpeq LABEL2105 + jump LABEL2110 +LABEL2105: cc_getx iload 6 iconst 0 iconst 0 cc_setposition -LABEL2083: +LABEL2110: iconst 10616888 iload 8 iconst 4 @@ -2324,15 +2354,15 @@ LABEL2083: add cc_find iconst 1 - if_icmpeq LABEL2093 - jump LABEL2098 -LABEL2093: + if_icmpeq LABEL2120 + jump LABEL2125 +LABEL2120: cc_getx iload 6 iconst 0 iconst 0 cc_setposition -LABEL2098: +LABEL2125: iconst 10616888 iload 8 iconst 4 @@ -2341,17 +2371,17 @@ LABEL2098: add cc_find iconst 1 - if_icmpeq LABEL2108 - jump LABEL2113 -LABEL2108: + if_icmpeq LABEL2135 + jump LABEL2140 +LABEL2135: cc_getx iload 6 iconst 0 iconst 0 cc_setposition -LABEL2113: - jump LABEL2027 -LABEL2114: +LABEL2140: + jump LABEL2054 +LABEL2141: iconst 0 iload 23 iconst 10616888 diff --git a/runelite-client/src/test/java/net/runelite/client/plugins/PluginManagerTest.java b/runelite-client/src/test/java/net/runelite/client/plugins/PluginManagerTest.java index 0b89db5c76..edaac72a1f 100644 --- a/runelite-client/src/test/java/net/runelite/client/plugins/PluginManagerTest.java +++ b/runelite-client/src/test/java/net/runelite/client/plugins/PluginManagerTest.java @@ -49,6 +49,7 @@ import net.runelite.client.RuneLite; import net.runelite.client.RuneLiteModule; import net.runelite.client.RuntimeConfig; +import net.runelite.client.RuntimeConfigLoader; import net.runelite.client.config.Config; import net.runelite.client.config.ConfigItem; import net.runelite.client.config.ConfigManager; @@ -105,8 +106,11 @@ public void before() throws IOException return mock(c); }); + RuntimeConfigLoader configLoader = mock(RuntimeConfigLoader.class); + when(configLoader.get()).thenReturn(mock(RuntimeConfig.class)); + Injector injector = Guice.createInjector(Modules - .override(new RuneLiteModule(okHttpClient, () -> null, () -> mock(RuntimeConfig.class), true, false, false, + .override(new RuneLiteModule(okHttpClient, () -> null, configLoader, true, false, false, RuneLite.DEFAULT_SESSION_FILE, null, false, false )) diff --git a/runelite-jshell/pom.xml b/runelite-jshell/pom.xml index c26d87d87f..81c5eace96 100644 --- a/runelite-jshell/pom.xml +++ b/runelite-jshell/pom.xml @@ -30,7 +30,7 @@ net.runelite runelite-parent - 1.10.22 + 1.10.23.1 jshell diff --git a/runelite-maven-plugin/pom.xml b/runelite-maven-plugin/pom.xml index 6940305eda..2d2a26fc3c 100644 --- a/runelite-maven-plugin/pom.xml +++ b/runelite-maven-plugin/pom.xml @@ -29,7 +29,7 @@ net.runelite runelite-parent - 1.10.22 + 1.10.23.1 runelite-maven-plugin