Merge pull request #5453 from Abextm/chatbox-input-bad-wids

runelite-client: Don't duplicate chatbox input when widget ids are wrong
This commit is contained in:
Adam
2018-10-01 09:14:44 -04:00
committed by GitHub
2 changed files with 16 additions and 0 deletions

View File

@@ -36,6 +36,18 @@
.int_var_count 2
.string_var_count 1
; If we are not the active listener, the widget ids have probably changed
get_varc 5
load_int -2
if_icmpeq LABEL2
; Log the error
load_string "Got input while not active; Widget ids in ChatboxInputInit are probably wrong."
load_string "debug"
runelite_callback
return
LABEL2:
; Discard zero presses
iload 0
load_int 0

View File

@@ -46,6 +46,10 @@
sload 1
put_varc_string 22
; Mark varcstring22 for our use
load_int -2
put_varc 5
; Set text
sload 0
load_int 10616876