From 81050f264a5c92b7cfed1875a9109dc4e9bf6f67 Mon Sep 17 00:00:00 2001 From: Jordan Atwood Date: Tue, 28 May 2019 19:06:09 -0700 Subject: [PATCH] attack styles: Attach spec bar redraw listener to weapon text This fixes a bug where the special attack bar would not be redrawn if the combat tab was opened with any weapon equipped which did not have a special attack bar. The weapon text widget is used because it is always rendered with the combat tab widgets, and does not already have any kind of listeners attached. Fixes runelite/runelite#8946 --- .../src/main/java/net/runelite/api/widgets/WidgetID.java | 1 - .../src/main/java/net/runelite/api/widgets/WidgetInfo.java | 1 - runelite-client/src/main/scripts/CombatInterfaceSP.rs2asm | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java index 50e388076c..523c0335c8 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetID.java @@ -533,7 +533,6 @@ public class WidgetID static final int SPELL_ICON = 27; static final int SPELL_TEXT = 28; static final int AUTO_RETALIATE = 29; - static final int SPEC_BAR = 34; } static class VolcanicMine diff --git a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java index 058e9aa05a..78bb2832b4 100644 --- a/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java +++ b/runelite-api/src/main/java/net/runelite/api/widgets/WidgetInfo.java @@ -313,7 +313,6 @@ public enum WidgetInfo COMBAT_SPELL_ICON(WidgetID.COMBAT_GROUP_ID, WidgetID.Combat.SPELL_ICON), COMBAT_SPELL_TEXT(WidgetID.COMBAT_GROUP_ID, WidgetID.Combat.SPELL_TEXT), COMBAT_AUTO_RETALIATE(WidgetID.COMBAT_GROUP_ID, WidgetID.Combat.AUTO_RETALIATE), - COMBAT_SPEC_BAR(WidgetID.COMBAT_GROUP_ID, WidgetID.Combat.SPEC_BAR), // Used by CombatInterfaceSP.rs2asm DIALOG_OPTION(WidgetID.DIALOG_OPTION_GROUP_ID, 0), diff --git a/runelite-client/src/main/scripts/CombatInterfaceSP.rs2asm b/runelite-client/src/main/scripts/CombatInterfaceSP.rs2asm index 9f908245af..fae9b4e230 100644 --- a/runelite-client/src/main/scripts/CombatInterfaceSP.rs2asm +++ b/runelite-client/src/main/scripts/CombatInterfaceSP.rs2asm @@ -3,10 +3,10 @@ .string_stack_count 0 .int_var_count 1 .string_var_count 0 - ; Attach specbar redraw listeners to special attack bar instead of to + ; Attach specbar redraw listeners to the weapon name text instead of to ; auto retaliate text (which is var0). Test by enabling "Hide auto retaliate" ; and using a spec. - iconst 38862882 ; 593.34 - spec bar + iconst 38862849 ; 593.1 - weapon name widget istore 0 ; overwrite script parameter which is the autoretail text iload 0 invoke 187