client: fix spec bar not updating with hide auto retaliate on

Move the widget listener from the auto retaliate text to the spec bar,
so when auto retaliate is hidden the listeners still function.
This commit is contained in:
Adam
2019-05-25 21:48:52 -04:00
committed by Adam
parent da260fb8b2
commit 2800a226a1
4 changed files with 32 additions and 0 deletions

View File

@@ -533,6 +533,7 @@ 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

View File

@@ -313,6 +313,7 @@ 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),

View File

@@ -0,0 +1 @@
DDFE4E407122EEEAE2C64A233EA937B2CC20E92D66CB66772C31182A6C60820D

View File

@@ -0,0 +1,29 @@
.id 327
.int_stack_count 1
.string_stack_count 0
.int_var_count 1
.string_var_count 0
; Attach specbar redraw listeners to special attack bar 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
istore 0 ; overwrite script parameter which is the autoretail text
iload 0
invoke 187
iconst 186
iload 0
iconst 301
iconst 300
iconst 284
iconst 3
sconst "IY"
iload 0
if_setonvartransmit
iconst 186
iload 0
iconst 94
iconst 1
sconst "IY"
iload 0
if_setoninvtransmit
return