fix stipend backoff: split into two safe rules, avoid iif (both branches always evaluate), remove debug lines
Some checks failed
/ test (push) Failing after 19s

This commit is contained in:
Erik 2026-04-06 14:14:45 +02:00
parent f8695b2275
commit a58f8340ae
2 changed files with 71 additions and 33 deletions

View file

@ -291,11 +291,15 @@ STATE: {service_decide} ~~ {
DoExpr {clearvar[bellaBackoffClock]} DoExpr {clearvar[bellaBackoffClock]}
IF: All IF: All
Expr {getqueststatus[`stipendtimer_0812`]==1} Expr {getqueststatus[`stipendtimer_0812`]==1}
DO: ChatExpr {\/a [stipend-debug] clockExists=+testvar[stipendBackoffClock]+ elapsed=+iif[testvar[stipendBackoffClock],stopwatchelapsedseconds[getvar[stipendBackoffClock]],`none`]+ backoff=+getvar[stipendBackoffSeconds]+ guard=+isfalse[iif[testvar[stipendBackoffClock],stopwatchelapsedseconds[getvar[stipendBackoffClock]]<getvar[stipendBackoffSeconds],0]]} Not Expr {testvar[stipendBackoffClock]}
DO: SetState {service_stipend}
IF: All IF: All
Expr {getqueststatus[`stipendtimer_0812`]==1} Expr {getqueststatus[`stipendtimer_0812`]==1}
Expr {isfalse[iif[testvar[stipendBackoffClock], stopwatchelapsedseconds[getvar[stipendBackoffClock]]<getvar[stipendBackoffSeconds], 0]]} Expr {testvar[stipendBackoffClock]}
DO: SetState {service_stipend} Expr {stopwatchelapsedseconds[getvar[stipendBackoffClock]]>=getvar[stipendBackoffSeconds]}
DO: DoAll
DoExpr {clearvar[stipendBackoffClock]}
SetState {service_stipend}
IF: All IF: All
Expr {getvar[disableAugmentServices]!=1} Expr {getvar[disableAugmentServices]!=1}
ItemCountGE 1 {Blank Augmentation Gem} ItemCountGE 1 {Blank Augmentation Gem}
@ -324,7 +328,6 @@ STATE: {service_stipend} ~~ {
Chat {/vt opt set enablenav true} Chat {/vt opt set enablenav true}
DoExpr {setvar[stipendBackoffClock, stopwatchcreate[]]} DoExpr {setvar[stipendBackoffClock, stopwatchcreate[]]}
DoExpr {stopwatchstart[getvar[stipendBackoffClock]]} DoExpr {stopwatchstart[getvar[stipendBackoffClock]]}
ChatExpr {\/a [stipend-debug] clock created exists=+testvar[stipendBackoffClock]+ elapsed=+stopwatchelapsedseconds[getvar[stipendBackoffClock]]}
DoExpr {touchvar[stipendNavLoaded]} DoExpr {touchvar[stipendNavLoaded]}
EmbedNav nav0__stipend_nav {stipend.nav} EmbedNav nav0__stipend_nav {stipend.nav}
IF: All IF: All

View file

@ -2850,7 +2850,29 @@ service_decide
i i
2 2
i i
8 1
TABLE
2
K
V
n
n
2
i
26
TABLE
2
k
v
n
n
1
s
e
s
getqueststatus[`stipendtimer_0812`]==1
i
21
TABLE TABLE
2 2
K K
@ -2870,31 +2892,22 @@ n
s s
e e
s s
getqueststatus[`stipendtimer_0812`]==1 testvar[stipendBackoffClock]
TABLE
2
k
v
n
n
1
s s
e service_stipend
s
\/a [stipend-debug] clockExists=+testvar[stipendBackoffClock]+ elapsed=+iif[testvar[stipendBackoffClock],stopwatchelapsedseconds[getvar[stipendBackoffClock]],`none`]+ backoff=+getvar[stipendBackoffSeconds]+ guard=+isfalse[iif[testvar[stipendBackoffClock],stopwatchelapsedseconds[getvar[stipendBackoffClock]]<getvar[stipendBackoffSeconds],0]]
s s
service_decide service_decide
i i
2 2
i i
1 3
TABLE TABLE
2 2
K K
V V
n n
n n
2 3
i i
26 26
TABLE TABLE
@ -2920,7 +2933,42 @@ n
s s
e e
s s
isfalse[iif[testvar[stipendBackoffClock], stopwatchelapsedseconds[getvar[stipendBackoffClock]]<getvar[stipendBackoffSeconds], 0]] testvar[stipendBackoffClock]
i
26
TABLE
2
k
v
n
n
1
s
e
s
stopwatchelapsedseconds[getvar[stipendBackoffClock]]>=getvar[stipendBackoffSeconds]
TABLE
2
K
V
n
n
2
i
7
TABLE
2
k
v
n
n
1
s
e
s
clearvar[stipendBackoffClock]
i
1
s s
service_stipend service_stipend
s s
@ -3131,7 +3179,7 @@ K
V V
n n
n n
8 7
i i
2 2
s s
@ -3171,19 +3219,6 @@ e
s s
stopwatchstart[getvar[stipendBackoffClock]] stopwatchstart[getvar[stipendBackoffClock]]
i i
8
TABLE
2
k
v
n
n
1
s
e
s
\/a [stipend-debug] clock created exists=+testvar[stipendBackoffClock]+ elapsed=+stopwatchelapsedseconds[getvar[stipendBackoffClock]]
i
7 7
TABLE TABLE
2 2