# ExtraBoardActivity_View_ExtraBoardActivityRewardRecoverWindow_1022.luac
; fn @ExtraBoardActivityRewardRecoverWindow.lua  line 0-0 np=0 va=1 ms=4 code=27 consts=13 upvals=1 protos=5
;   K[0]=686
;   K[1]='ExtraBoardActivityRewardRecoverWindow'
;   K[2]='setmetatable'
;   K[3]='disableEffectWhenCloseView'
;   K[4]=true
;   K[5]='disableSpriteRendererWhenCloseView'
;   K[6]='ExtraBoardActivityBaseWindow'
;   K[7]='__index'
;   K[8]='BeforeOpenCheck'
;   K[9]='Init'
;   K[10]='_UpdateRewards'
;   K[11]='Close'
;   K[12]='UpdateSortingOrder'
;   upvals: _ENV
;   locals: moreRewardHeight(1-27)
0000  LOADK     R0 = K0 686
0001  GETTABUP  R1 = _ENV[K2('setmetatable')]
0002  NEWTABLE  R2 = {} (0 items)
0003  SETTABLE  R2[K3('disableEffectWhenCloseView')] = K4(true)
0004  SETTABLE  R2[K5('disableSpriteRendererWhenCloseView')] = K4(true)
0005  GETTABUP  R3 = _ENV[K6('ExtraBoardActivityBaseWindow')]
0006  CALL      R1 = call(R1, 1 args, 2 rets)
0007  SETTABUP  _ENV[K1('ExtraBoardActivityRewardRecoverWindow')] = R1
0008  GETTABUP  R1 = _ENV[K1('ExtraBoardActivityRewardRecoverWindow')]
0009  GETTABUP  R2 = _ENV[K1('ExtraBoardActivityRewardRecoverWindow')]
0010  SETTABLE  R1[K7('__index')] = R2
0011  GETTABUP  R1 = _ENV[K1('ExtraBoardActivityRewardRecoverWindow')]
0012  CLOSURE   R2 = closure proto0
0013  SETTABLE  R1[K8('BeforeOpenCheck')] = R2
0014  GETTABUP  R1 = _ENV[K1('ExtraBoardActivityRewardRecoverWindow')]
0015  CLOSURE   R2 = closure proto1
0016  SETTABLE  R1[K9('Init')] = R2
0017  GETTABUP  R1 = _ENV[K1('ExtraBoardActivityRewardRecoverWindow')]
0018  CLOSURE   R2 = closure proto2
0019  SETTABLE  R1[K10('_UpdateRewards')] = R2
0020  GETTABUP  R1 = _ENV[K1('ExtraBoardActivityRewardRecoverWindow')]
0021  CLOSURE   R2 = closure proto3
0022  SETTABLE  R1[K11('Close')] = R2
0023  GETTABUP  R1 = _ENV[K1('ExtraBoardActivityRewardRecoverWindow')]
0024  CLOSURE   R2 = closure proto4
0025  SETTABLE  R1[K12('UpdateSortingOrder')] = R2
0026  RETURN    return R0..R-1
; ---------- proto0 [BeforeOpenCheck] ----------
  ; fn ?  line 10-19 np=1 va=0 ms=10 code=26 consts=8 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='ExtraBoardActivityDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetState'
  ;   K[6]='ActivityState'
  ;   K[7]='Ended'
  ;   upvals: _ENV
  ;   locals: self(0-26), model(1-26), (for generator)(4-23), (for state)(4-23), (for control)(4-23), activityType(5-21), _(5-21)
  0000  LOADNIL   R1..R1 = nil
  0001  GETTABUP  R2 = _ENV[K0('pairs')]
  0002  GETTABUP  R3 = _ENV[K1('ExtraBoardActivityDefinition')]
  0003  CALL      R2 = call(R2, 3 args, 1 rets)
  0004  JMP       (jump)   -> 21
  0005  GETTABUP  R7 = _ENV[K2('GM')]
  0006  GETTABLE  R7 = R7[K3('ActivityManager')]
  0007  SELF      R8 = R7[K4('GetModel')] (self)
  0008  MOVE      R9 = R0
  0009  CALL      R7 = call(R7, 1 args, 2 rets)
  0010  MOVE      R1 = R0
  0011  TEST      if not R1 then   -> -131059
  0012  JMP       (jump)   -> 21
  0013  SELF      R8 = R1[K5('GetState')] (self)
  0014  CALL      R7 = call(R7, 1 args, 1 rets)
  0015  GETTABUP  R8 = _ENV[K6('ActivityState')]
  0016  GETTABLE  R8 = R8[K7('Ended')]
  0017  EQ        if R0 eq R8   -> -127461
  0018  JMP       (jump)   -> 21
  0019  LOADBOOL  R7 = true
  0020  RETURN    return R7..R6
  0021  TFORCALL  tforcall R2
  0022  TFORLOOP  tforloop R4(sBx=-18)   -> 5
  0023  LOADBOOL  R2 = false
  0024  RETURN    return R2..R1
  0025  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 21-42 np=3 va=0 ms=14 code=79 consts=38 upvals=1 protos=0
  ;   K[0]='ExtraBoardActivityBaseWindow'
  ;   K[1]='Init'
  ;   K[2]='m_rewards'
  ;   K[3]='m_model'
  ;   K[4]='IsMaxLevel'
  ;   K[5]='string'
  ;   K[6]='lower'
  ;   K[7]='_victory_reward'
  ;   K[8]='m_titleText'
  ;   K[9]='text'
  ;   K[10]='GM'
  ;   K[11]='GameTextModel'
  ;   K[12]='GetText'
  ;   K[13]='extraboard_victory_title'
  ;   K[14]='extraboard_fail_title'
  ;   K[15]='m_descText'
  ;   K[16]='extraboard_fail_reward'
  ;   K[17]='UIUtil'
  ;   K[18]='SetActive'
  ;   K[19]='m_victoryGo'
  ;   K[20]='m_failGo'
  ;   K[21]=nil
  ;   K[22]='RewardApi'
  ;   K[23]='AcquireRewardsLogic'
  ;   K[24]='EPropertySource'
  ;   K[25]='Give'
  ;   K[26]='EBIType'
  ;   K[27]='ExtraBoardRewardRecover'
  ;   K[28]='ERewardScene'
  ;   K[29]='Other'
  ;   K[30]='EGameMode'
  ;   K[31]='Board'
  ;   K[32]='CacheItemType'
  ;   K[33]='Stack'
  ;   K[34]='ExtraBoard'
  ;   K[35]='UpdateSortingOrder'
  ;   K[36]='_UpdateRewards'
  ;   K[37]='AddFilterRewardEventListener'
  ;   upvals: _ENV
  ;   locals: self(0-79), activityType(0-79), rewards(0-79), bMaxLevel(10-79), prefix(14-79), victoryDesc(17-79)
  0000  GETTABUP  R3 = _ENV[K0('ExtraBoardActivityBaseWindow')]
  0001  GETTABLE  R3 = R3[K1('Init')]
  0002  MOVE      R4 = R0
  0003  MOVE      R5 = R0
  0004  LOADBOOL  R6 = false
  0005  CALL      R3 = call(R3, 0 args, 3 rets)
  0006  SETTABLE  R0[K2('m_rewards')] = R2
  0007  GETTABLE  R3 = R0[K3('m_model')]
  0008  SELF      R4 = R3[K4('IsMaxLevel')] (self)
  0009  CALL      R3 = call(R3, 1 args, 1 rets)
  0010  GETTABUP  R4 = _ENV[K5('string')]
  0011  GETTABLE  R4 = R4[K6('lower')]
  0012  MOVE      R5 = R0
  0013  CALL      R4 = call(R4, 1 args, 1 rets)
  0014  MOVE      R5 = R0
  0015  LOADK     R6 = K7 '_victory_reward'
  0016  CONCAT    R5 = concat(R5..R5)
  0017  GETTABLE  R6 = R0[K8('m_titleText')]
  0018  GETTABUP  R7 = _ENV[K10('GM')]
  0019  GETTABLE  R7 = R7[K11('GameTextModel')]
  0020  SELF      R8 = R7[K12('GetText')] (self)
  0021  TEST      if not R3 then   -> -131049
  0022  JMP       (jump)   -> 26
  0023  LOADK     R9 = K13 'extraboard_victory_title'
  0024  TEST      if not R9 then   -> -131045
  0025  JMP       (jump)   -> 27
  0026  LOADK     R9 = K14 'extraboard_fail_title'
  0027  CALL      R7 = call(R7, 1 args, 2 rets)
  0028  SETTABLE  R6[K9('text')] = R7
  0029  GETTABLE  R6 = R0[K15('m_descText')]
  0030  GETTABUP  R7 = _ENV[K10('GM')]
  0031  GETTABLE  R7 = R7[K11('GameTextModel')]
  0032  SELF      R8 = R7[K12('GetText')] (self)
  0033  TEST      if not R3 then   -> -131037
  0034  JMP       (jump)   -> 37
  0035  TESTSET   if R1 then R9   -> -128474
  0036  JMP       (jump)   -> 38
  0037  LOADK     R9 = K16 'extraboard_fail_reward'
  0038  CALL      R7 = call(R7, 1 args, 2 rets)
  0039  SETTABLE  R6[K9('text')] = R7
  0040  GETTABUP  R6 = _ENV[K17('UIUtil')]
  0041  GETTABLE  R6 = R6[K18('SetActive')]
  0042  GETTABLE  R7 = R0[K19('m_victoryGo')]
  0043  MOVE      R8 = R0
  0044  CALL      R6 = call(R6, 0 args, 2 rets)
  0045  GETTABLE  R6 = R0[K20('m_failGo')]
  0046  EQ        if R1 eq K21(nil)   -> -127675
  0047  JMP       (jump)   -> 53
  0048  GETTABUP  R6 = _ENV[K17('UIUtil')]
  0049  GETTABLE  R6 = R6[K18('SetActive')]
  0050  GETTABLE  R7 = R0[K20('m_failGo')]
  0051  NOT       R8 = not R0
  0052  CALL      R6 = call(R6, 0 args, 2 rets)
  0053  GETTABUP  R6 = _ENV[K22('RewardApi')]
  0054  GETTABLE  R6 = R6[K23('AcquireRewardsLogic')]
  0055  GETTABLE  R7 = R0[K2('m_rewards')]
  0056  GETTABUP  R8 = _ENV[K24('EPropertySource')]
  0057  GETTABLE  R8 = R8[K25('Give')]
  0058  GETTABUP  R9 = _ENV[K26('EBIType')]
  0059  GETTABLE  R9 = R9[K27('ExtraBoardRewardRecover')]
  0060  GETTABUP  R10 = _ENV[K28('ERewardScene')]
  0061  GETTABLE  R10 = R10[K29('Other')]
  0062  GETTABUP  R11 = _ENV[K30('EGameMode')]
  0063  GETTABLE  R11 = R11[K31('Board')]
  0064  GETTABUP  R12 = _ENV[K32('CacheItemType')]
  0065  GETTABLE  R12 = R12[K33('Stack')]
  0066  GETTABUP  R13 = _ENV[K30('EGameMode')]
  0067  GETTABLE  R13 = R13[K34('ExtraBoard')]
  0068  CALL      R6 = call(R6, 0 args, 7 rets)
  0069  SELF      R7 = R0[K35('UpdateSortingOrder')] (self)
  0070  CALL      R6 = call(R6, 0 args, 1 rets)
  0071  SELF      R7 = R0[K36('_UpdateRewards')] (self)
  0072  CALL      R6 = call(R6, 0 args, 1 rets)
  0073  GETTABUP  R6 = _ENV[K22('RewardApi')]
  0074  GETTABLE  R6 = R6[K37('AddFilterRewardEventListener')]
  0075  MOVE      R7 = R0
  0076  GETTABLE  R8 = R0[K36('_UpdateRewards')]
  0077  CALL      R6 = call(R6, 0 args, 2 rets)
  0078  RETURN    return R0..R-1
; ---------- proto2 [_UpdateRewards] ----------
  ; fn ?  line 44-56 np=1 va=0 ms=8 code=39 consts=18 upvals=2 protos=0
  ;   K[0]='RewardApi'
  ;   K[1]='FilterRewards'
  ;   K[2]='m_rewards'
  ;   K[3]='ERewardScene'
  ;   K[4]='Other'
  ;   K[5]='m_bPlayRewardAnim'
  ;   K[6]=false
  ;   K[7]='Table'
  ;   K[8]='IsEmpty'
  ;   K[9]=5
  ;   K[10]='UIUtil'
  ;   K[11]='SetSizeDelta'
  ;   K[12]='m_bgRect'
  ;   K[13]='m_scrollRect'
  ;   K[14]='enabled'
  ;   K[15]='m_rewardContent'
  ;   K[16]='Init'
  ;   K[17]=true
  ;   upvals: _ENV, moreRewardHeight
  ;   locals: self(0-39), rewards(6-39)
  0000  GETTABUP  R1 = _ENV[K0('RewardApi')]
  0001  GETTABLE  R1 = R1[K1('FilterRewards')]
  0002  GETTABLE  R2 = R0[K2('m_rewards')]
  0003  GETTABUP  R3 = _ENV[K3('ERewardScene')]
  0004  GETTABLE  R3 = R3[K4('Other')]
  0005  CALL      R1 = call(R1, 1 args, 2 rets)
  0006  SETTABLE  R0[K5('m_bPlayRewardAnim')] = K6(false)
  0007  GETTABUP  R2 = _ENV[K7('Table')]
  0008  GETTABLE  R2 = R2[K8('IsEmpty')]
  0009  MOVE      R3 = R0
  0010  CALL      R2 = call(R2, 1 args, 1 rets)
  0011  TEST      if not R2 then   -> -131058
  0012  JMP       (jump)   -> 38
  0013  LEN       R2 = len R0
  0014  LT        if R0 lt R2   -> 4626
  0015  JMP       (jump)   -> 22
  0016  GETTABUP  R2 = _ENV[K10('UIUtil')]
  0017  GETTABLE  R2 = R2[K11('SetSizeDelta')]
  0018  GETTABLE  R3 = R0[K12('m_bgRect')]
  0019  LOADNIL   R4..R4 = nil
  0020  GETUPVAL  R5 = _ENV
  0021  CALL      R2 = call(R2, 0 args, 3 rets)
  0022  GETTABLE  R2 = R0[K13('m_scrollRect')]
  0023  LEN       R3 = len R0
  0024  LT        if R1 lt R3   -> 4637
  0025  JMP       (jump)   -> 27
  0026  LOADBOOL  R3 = false
  0027  LOADBOOL  R3 = true
  0028  SETTABLE  R2[K14('enabled')] = R3
  0029  GETTABLE  R2 = R0[K15('m_rewardContent')]
  0030  SELF      R3 = R2[K16('Init')] (self)
  0031  MOVE      R4 = R0
  0032  GETTABUP  R5 = _ENV[K3('ERewardScene')]
  0033  GETTABLE  R5 = R5[K4('Other')]
  0034  LOADNIL   R6..R6 = nil
  0035  LOADK     R7 = K9 5
  0036  CALL      R2 = call(R2, 0 args, 5 rets)
  0037  SETTABLE  R0[K5('m_bPlayRewardAnim')] = K17(true)
  0038  RETURN    return R0..R-1
; ---------- proto3 [Close] ----------
  ; fn ?  line 58-63 np=1 va=0 ms=3 code=11 consts=5 upvals=1 protos=0
  ;   K[0]='ExtraBoardActivityBaseWindow'
  ;   K[1]='Close'
  ;   K[2]='m_bPlayRewardAnim'
  ;   K[3]='m_rewardContent'
  ;   K[4]='PlayRewardAnimation'
  ;   upvals: _ENV
  ;   locals: self(0-11)
  0000  GETTABUP  R1 = _ENV[K0('ExtraBoardActivityBaseWindow')]
  0001  GETTABLE  R1 = R1[K1('Close')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABLE  R1 = R0[K2('m_bPlayRewardAnim')]
  0005  TEST      if not R1 then   -> -131065
  0006  JMP       (jump)   -> 10
  0007  GETTABLE  R1 = R0[K3('m_rewardContent')]
  0008  SELF      R2 = R1[K4('PlayRewardAnimation')] (self)
  0009  CALL      R1 = call(R1, 0 args, 1 rets)
  0010  RETURN    return R0..R-1
; ---------- proto4 [UpdateSortingOrder] ----------
  ; fn ?  line 65-76 np=1 va=0 ms=10 code=28 consts=11 upvals=1 protos=0
  ;   K[0]=3
  ;   K[1]='GetSortingOrder'
  ;   K[2]='m_contentCanvas'
  ;   K[3]='sortingOrder'
  ;   K[4]='m_victoryGo'
  ;   K[5]='GetComponentsInChildren'
  ;   K[6]='typeof'
  ;   K[7]='Renderer'
  ;   K[8]=0
  ;   K[9]='Length'
  ;   K[10]=1
  ;   upvals: _ENV
  ;   locals: self(0-28), sortingOrderLength(1-28), baseSortingOrder(3-28), arrRenderer(13-28), (for index)(17-27), (for limit)(17-27), (for step)(17-27), i(18-26)
  0000  LOADK     R1 = K0 3
  0001  SELF      R3 = R0[K1('GetSortingOrder')] (self)
  0002  CALL      R2 = call(R2, 1 args, 1 rets)
  0003  GETTABLE  R3 = R0[K2('m_contentCanvas')]
  0004  ADD       R4 = R1 add R2
  0005  SETTABLE  R3[K3('sortingOrder')] = R4
  0006  GETTABLE  R3 = R0[K4('m_victoryGo')]
  0007  SELF      R4 = R3[K5('GetComponentsInChildren')] (self)
  0008  GETTABUP  R5 = _ENV[K6('typeof')]
  0009  GETTABUP  R6 = _ENV[K7('Renderer')]
  0010  CALL      R5 = call(R5, 1 args, 1 rets)
  0011  LOADBOOL  R6 = true
  0012  CALL      R3 = call(R3, 1 args, 3 rets)
  0013  LOADK     R4 = K8 0
  0014  GETTABLE  R5 = R3[K9('Length')]
  0015  SUB       R5 = K10(1) sub R5
  0016  LOADK     R6 = K10 1
  0017  FORPREP   forprep R4(sBx=8)   -> 26
  0018  GETTABLE  R8 = R3[R7]
  0019  GETTABLE  R9 = R3[R7]
  0020  GETTABLE  R9 = R9[K3('sortingOrder')]
  0021  TEST      if not R9 then   -> -131048
  0022  JMP       (jump)   -> 24
  0023  LOADK     R9 = K8 0
  0024  ADD       R9 = R2 add R9
  0025  SETTABLE  R8[K3('sortingOrder')] = R9
  0026  FORLOOP   forloop R4(sBx=-9)   -> 18
  0027  RETURN    return R0..R-1
