timestamp: use less callbacks in script overlays

all of these separate callbacks are error prone to update and hard to
test
This commit is contained in:
Max Weber
2021-05-25 17:08:29 -06:00
committed by Adam
parent adabb68ff1
commit 58e351dca6
5 changed files with 107 additions and 107 deletions

View File

@@ -400,6 +400,10 @@ CHAT_FILTER:
if_icmpeq LABEL356 ; Check if we are building this message
jump LABEL530
LABEL356:
iload 12 ; message uid
sconst "chatMessageBuilding"
runelite_callback
pop_int
iload 17
switch
3: LABEL359
@@ -409,19 +413,14 @@ LABEL356:
jump LABEL446
LABEL359:
iload 7
iload 12 ; Load the id of the messageNode
sconst "" ; Push a container for the timestamp
sconst "addTimestamp" ; Push event name
runelite_callback ; Invoke callback
pop_int ; Pop the id of the messageNode
sload 4
sconst "splitPrivChatUsernameColor"
runelite_callback
sconst "From "
sload 1
sconst ":"
sconst "privateChatSplitFrom"
runelite_callback
sconst "</col>"
join_string 6 ; Add the timestamp to the message
join_string 5
sload 4
sload 0
sconst "</col>"
@@ -443,19 +442,14 @@ LABEL359:
jump LABEL462
LABEL385:
iload 7
iload 12 ; Load the id of the messageNode
sconst "" ; Push container for the timestamp
sconst "addTimestamp" ; Push event name
runelite_callback ; Invoke callback
pop_int ; Pop the id of the messageNode
sload 4
sconst "splitPrivChatUsernameColor"
runelite_callback
sconst "To "
sload 1
sconst ":"
sconst "privateChatSplitTo"
runelite_callback
sconst "</col>"
join_string 6 ; Add the timestamp to the message
join_string 5
sload 4
sload 0
sconst "</col>"
@@ -477,15 +471,10 @@ LABEL385:
jump LABEL462
LABEL411:
iload 7
iload 12 ; Load the id of the messageNode
sconst "" ; Push a container for the timestamp
sconst "addTimestamp" ; Push event name
runelite_callback ; Invoke callback
pop_int ; Pop the id of the messageNode
sload 4 ; Load the log in/out message
sload 4
sload 0
sconst "</col>"
join_string 4
join_string 3
iload 9
iload 10
iconst 10682368