# AlbumActivity_View_AlbumGetNewJokerWindow_1138.luac
; fn @AlbumGetNewJokerWindow.lua  line 0-0 np=0 va=1 ms=3 code=31 consts=15 upvals=1 protos=6
;   K[0]='AlbumGetNewJokerWindow'
;   K[1]='setmetatable'
;   K[2]='canClickWindowMask'
;   K[3]=true
;   K[4]='windowMaskAlpha'
;   K[5]='EWindowMaskAlpha'
;   K[6]='Dark'
;   K[7]='AlbumActivityBaseWindow'
;   K[8]='__index'
;   K[9]='BeforeOpenCheck'
;   K[10]='Init'
;   K[11]='UpdatePerSecond'
;   K[12]='OnWindowMaskClicked'
;   K[13]='OnCloseFinish'
;   K[14]='OnBtnClicked'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  SETTABLE  R1[K2('canClickWindowMask')] = K3(true)
0003  GETTABUP  R2 = _ENV[K5('EWindowMaskAlpha')]
0004  GETTABLE  R2 = R2[K6('Dark')]
0005  SETTABLE  R1[K4('windowMaskAlpha')] = R2
0006  GETTABUP  R2 = _ENV[K7('AlbumActivityBaseWindow')]
0007  CALL      R0 = call(R0, 1 args, 2 rets)
0008  SETTABUP  _ENV[K0('AlbumGetNewJokerWindow')] = R0
0009  GETTABUP  R0 = _ENV[K0('AlbumGetNewJokerWindow')]
0010  GETTABUP  R1 = _ENV[K0('AlbumGetNewJokerWindow')]
0011  SETTABLE  R0[K8('__index')] = R1
0012  GETTABUP  R0 = _ENV[K0('AlbumGetNewJokerWindow')]
0013  CLOSURE   R1 = closure proto0
0014  SETTABLE  R0[K9('BeforeOpenCheck')] = R1
0015  GETTABUP  R0 = _ENV[K0('AlbumGetNewJokerWindow')]
0016  CLOSURE   R1 = closure proto1
0017  SETTABLE  R0[K10('Init')] = R1
0018  GETTABUP  R0 = _ENV[K0('AlbumGetNewJokerWindow')]
0019  CLOSURE   R1 = closure proto2
0020  SETTABLE  R0[K11('UpdatePerSecond')] = R1
0021  GETTABUP  R0 = _ENV[K0('AlbumGetNewJokerWindow')]
0022  CLOSURE   R1 = closure proto3
0023  SETTABLE  R0[K12('OnWindowMaskClicked')] = R1
0024  GETTABUP  R0 = _ENV[K0('AlbumGetNewJokerWindow')]
0025  CLOSURE   R1 = closure proto4
0026  SETTABLE  R0[K13('OnCloseFinish')] = R1
0027  GETTABUP  R0 = _ENV[K0('AlbumGetNewJokerWindow')]
0028  CLOSURE   R1 = closure proto5
0029  SETTABLE  R0[K14('OnBtnClicked')] = R1
0030  RETURN    return R0..R-1
; ---------- proto0 [BeforeOpenCheck] ----------
  ; fn ?  line 13-16 np=1 va=0 ms=4 code=13 consts=4 upvals=1 protos=0
  ;   K[0]='AlbumActivityModel'
  ;   K[1]='GetActiveModel'
  ;   K[2]='GetJokerCount'
  ;   K[3]=0
  ;   upvals: _ENV
  ;   locals: self(0-13), model(3-13)
  0000  GETTABUP  R1 = _ENV[K0('AlbumActivityModel')]
  0001  GETTABLE  R1 = R1[K1('GetActiveModel')]
  0002  CALL      R1 = call(R1, 1 args, 0 rets)
  0003  TESTSET   if R0 then R2   -> -130555
  0004  JMP       (jump)   -> 11
  0005  SELF      R3 = R1[K2('GetJokerCount')] (self)
  0006  CALL      R2 = call(R2, 1 args, 1 rets)
  0007  LT        if R1 lt R2   -> 1547
  0008  JMP       (jump)   -> 10
  0009  LOADBOOL  R2 = false
  0010  LOADBOOL  R2 = true
  0011  RETURN    return R2..R1
  0012  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 18-36 np=2 va=0 ms=9 code=47 consts=24 upvals=1 protos=0
  ;   K[0]='AlbumActivityBaseWindow'
  ;   K[1]='Init'
  ;   K[2]='m_model'
  ;   K[3]='GetMaxJokerCardTime'
  ;   K[4]='GetNextStateTime'
  ;   K[5]='m_jokerEndTime'
  ;   K[6]='Sec2Day'
  ;   K[7]='math'
  ;   K[8]='min'
  ;   K[9]='m_bOnce'
  ;   K[10]=true
  ;   K[11]='m_jokerCount'
  ;   K[12]='GetJokerCount'
  ;   K[13]='m_descText'
  ;   K[14]='text'
  ;   K[15]='GM'
  ;   K[16]='GameTextModel'
  ;   K[17]='GetText'
  ;   K[18]='joker_card_waiting_notice'
  ;   K[19]='UpdatePerSecond'
  ;   K[20]='UIUtil'
  ;   K[21]='SetActive'
  ;   K[22]='m_windowRoot'
  ;   K[23]='m_cardRoot'
  ;   upvals: _ENV
  ;   locals: self(0-47), activityType(0-47), jokerGetTime(9-47), nextStateTime(12-47)
  0000  GETTABUP  R2 = _ENV[K0('AlbumActivityBaseWindow')]
  0001  GETTABLE  R2 = R2[K1('Init')]
  0002  MOVE      R3 = R0
  0003  MOVE      R4 = R0
  0004  LOADBOOL  R5 = false
  0005  CALL      R2 = call(R2, 0 args, 3 rets)
  0006  GETTABLE  R2 = R0[K2('m_model')]
  0007  SELF      R3 = R2[K3('GetMaxJokerCardTime')] (self)
  0008  CALL      R2 = call(R2, 1 args, 1 rets)
  0009  GETTABLE  R3 = R0[K2('m_model')]
  0010  SELF      R4 = R3[K4('GetNextStateTime')] (self)
  0011  CALL      R3 = call(R3, 1 args, 1 rets)
  0012  GETTABUP  R4 = _ENV[K6('Sec2Day')]
  0013  ADD       R4 = R4 add R2
  0014  SETTABLE  R0[K5('m_jokerEndTime')] = R4
  0015  GETTABUP  R4 = _ENV[K7('math')]
  0016  GETTABLE  R4 = R4[K8('min')]
  0017  GETTABLE  R5 = R0[K5('m_jokerEndTime')]
  0018  MOVE      R6 = R0
  0019  CALL      R4 = call(R4, 1 args, 2 rets)
  0020  SETTABLE  R0[K5('m_jokerEndTime')] = R4
  0021  SETTABLE  R0[K9('m_bOnce')] = K10(true)
  0022  GETTABLE  R4 = R0[K2('m_model')]
  0023  SELF      R5 = R4[K12('GetJokerCount')] (self)
  0024  CALL      R4 = call(R4, 1 args, 1 rets)
  0025  SETTABLE  R0[K11('m_jokerCount')] = R4
  0026  GETTABLE  R4 = R0[K13('m_descText')]
  0027  GETTABUP  R5 = _ENV[K15('GM')]
  0028  GETTABLE  R5 = R5[K16('GameTextModel')]
  0029  SELF      R6 = R5[K17('GetText')] (self)
  0030  LOADK     R7 = K18 'joker_card_waiting_notice'
  0031  GETTABLE  R8 = R0[K11('m_jokerCount')]
  0032  CALL      R5 = call(R5, 1 args, 3 rets)
  0033  SETTABLE  R4[K14('text')] = R5
  0034  SELF      R5 = R0[K19('UpdatePerSecond')] (self)
  0035  CALL      R4 = call(R4, 0 args, 1 rets)
  0036  GETTABUP  R4 = _ENV[K20('UIUtil')]
  0037  GETTABLE  R4 = R4[K21('SetActive')]
  0038  GETTABLE  R5 = R0[K22('m_windowRoot')]
  0039  LOADBOOL  R6 = false
  0040  CALL      R4 = call(R4, 0 args, 2 rets)
  0041  GETTABUP  R4 = _ENV[K20('UIUtil')]
  0042  GETTABLE  R4 = R4[K21('SetActive')]
  0043  GETTABLE  R5 = R0[K23('m_cardRoot')]
  0044  LOADBOOL  R6 = true
  0045  CALL      R4 = call(R4, 0 args, 2 rets)
  0046  RETURN    return R0..R-1
; ---------- proto2 [UpdatePerSecond] ----------
  ; fn ?  line 38-56 np=1 va=0 ms=8 code=57 consts=25 upvals=1 protos=0
  ;   K[0]='m_jokerEndTime'
  ;   K[1]=nil
  ;   K[2]='math'
  ;   K[3]='max'
  ;   K[4]=0
  ;   K[5]='GM'
  ;   K[6]='GameModel'
  ;   K[7]='GetServerTime'
  ;   K[8]='m_bOnce'
  ;   K[9]=false
  ;   K[10]='m_countdownText'
  ;   K[11]='text'
  ;   K[12]='GameTextModel'
  ;   K[13]='GetText'
  ;   K[14]='joker_card_time_expired'
  ;   K[15]='m_descText'
  ;   K[16]='joker_card_expired_notice'
  ;   K[17]='m_jokerCount'
  ;   K[18]='m_closeBtnGo'
  ;   K[19]='SetActive'
  ;   K[20]='canCloseByAndroidBack'
  ;   K[21]='TimeUtil'
  ;   K[22]='ParseTimeDescription'
  ;   K[23]=2
  ;   K[24]='joker_card_timing'
  ;   upvals: _ENV
  ;   locals: self(0-57), delta(14-57), str(48-56)
  0000  GETTABLE  R1 = R0[K0('m_jokerEndTime')]
  0001  EQ        if R0 eq K1(nil)   -> -130300
  0002  JMP       (jump)   -> 4
  0003  RETURN    return R0..R-1
  0004  GETTABUP  R1 = _ENV[K2('math')]
  0005  GETTABLE  R1 = R1[K3('max')]
  0006  LOADK     R2 = K4 0
  0007  GETTABLE  R3 = R0[K0('m_jokerEndTime')]
  0008  GETTABUP  R4 = _ENV[K5('GM')]
  0009  GETTABLE  R4 = R4[K6('GameModel')]
  0010  SELF      R5 = R4[K7('GetServerTime')] (self)
  0011  CALL      R4 = call(R4, 1 args, 1 rets)
  0012  SUB       R3 = R4 sub R3
  0013  CALL      R1 = call(R1, 1 args, 2 rets)
  0014  EQ        if R0 eq K4(0)   -> -130284
  0015  JMP       (jump)   -> 41
  0016  GETTABLE  R2 = R0[K8('m_bOnce')]
  0017  TEST      if not R2 then   -> -131053
  0018  JMP       (jump)   -> 56
  0019  SETTABLE  R0[K8('m_bOnce')] = K9(false)
  0020  GETTABLE  R2 = R0[K10('m_countdownText')]
  0021  GETTABUP  R3 = _ENV[K5('GM')]
  0022  GETTABLE  R3 = R3[K12('GameTextModel')]
  0023  SELF      R4 = R3[K13('GetText')] (self)
  0024  LOADK     R5 = K14 'joker_card_time_expired'
  0025  CALL      R3 = call(R3, 1 args, 2 rets)
  0026  SETTABLE  R2[K11('text')] = R3
  0027  GETTABLE  R2 = R0[K15('m_descText')]
  0028  GETTABUP  R3 = _ENV[K5('GM')]
  0029  GETTABLE  R3 = R3[K12('GameTextModel')]
  0030  SELF      R4 = R3[K13('GetText')] (self)
  0031  LOADK     R5 = K16 'joker_card_expired_notice'
  0032  GETTABLE  R6 = R0[K17('m_jokerCount')]
  0033  CALL      R3 = call(R3, 1 args, 3 rets)
  0034  SETTABLE  R2[K11('text')] = R3
  0035  GETTABLE  R2 = R0[K18('m_closeBtnGo')]
  0036  SELF      R3 = R2[K19('SetActive')] (self)
  0037  LOADBOOL  R4 = false
  0038  CALL      R2 = call(R2, 0 args, 2 rets)
  0039  SETTABLE  R0[K20('canCloseByAndroidBack')] = K9(false)
  0040  JMP       (jump)   -> 56
  0041  GETTABUP  R2 = _ENV[K21('TimeUtil')]
  0042  GETTABLE  R2 = R2[K22('ParseTimeDescription')]
  0043  MOVE      R3 = R0
  0044  LOADK     R4 = K23 2
  0045  LOADBOOL  R5 = false
  0046  LOADBOOL  R6 = false
  0047  CALL      R2 = call(R2, 1 args, 4 rets)
  0048  GETTABLE  R3 = R0[K10('m_countdownText')]
  0049  GETTABUP  R4 = _ENV[K5('GM')]
  0050  GETTABLE  R4 = R4[K12('GameTextModel')]
  0051  SELF      R5 = R4[K13('GetText')] (self)
  0052  LOADK     R6 = K24 'joker_card_timing'
  0053  MOVE      R7 = R0
  0054  CALL      R4 = call(R4, 1 args, 3 rets)
  0055  SETTABLE  R3[K11('text')] = R4
  0056  RETURN    return R0..R-1
; ---------- proto3 [OnWindowMaskClicked] ----------
  ; fn ?  line 58-63 np=1 va=0 ms=4 code=14 consts=6 upvals=0 protos=0
  ;   K[0]='m_winAnimator'
  ;   K[1]='IsNull'
  ;   K[2]='SetTrigger'
  ;   K[3]='Remind'
  ;   K[4]='canClickWindowMask'
  ;   K[5]=false
  ;   locals: self(0-14)
  0000  GETTABLE  R1 = R0[K0('m_winAnimator')]
  0001  TEST      if not R1 then   -> -131069
  0002  JMP       (jump)   -> 13
  0003  GETTABLE  R1 = R0[K0('m_winAnimator')]
  0004  SELF      R2 = R1[K1('IsNull')] (self)
  0005  CALL      R1 = call(R1, 1 args, 1 rets)
  0006  TEST      if not R1 then   -> -131063
  0007  JMP       (jump)   -> 13
  0008  GETTABLE  R1 = R0[K0('m_winAnimator')]
  0009  SELF      R2 = R1[K2('SetTrigger')] (self)
  0010  LOADK     R3 = K3 'Remind'
  0011  CALL      R1 = call(R1, 0 args, 2 rets)
  0012  SETTABLE  R0[K4('canClickWindowMask')] = K5(false)
  0013  RETURN    return R0..R-1
; ---------- proto4 [OnCloseFinish] ----------
  ; fn ?  line 65-77 np=1 va=0 ms=7 code=19 consts=12 upvals=1 protos=1
  ;   K[0]='m_open'
  ;   K[1]='AlbumActivityModel'
  ;   K[2]='UseNewJokerCard'
  ;   K[3]=true
  ;   K[4]='GM'
  ;   K[5]='UIManager'
  ;   K[6]='OpenView'
  ;   K[7]='m_activityDefinition'
  ;   K[8]='MainWindowPrefabName'
  ;   K[9]='m_activityType'
  ;   K[10]='AlbumActivityBaseWindow'
  ;   K[11]='OnCloseFinish'
  ;   upvals: _ENV
  ;   locals: self(0-19)
  0000  GETTABLE  R1 = R0[K0('m_open')]
  0001  TEST      if not R1 then   -> -131069
  0002  JMP       (jump)   -> 14
  0003  GETTABUP  R1 = _ENV[K1('AlbumActivityModel')]
  0004  SETTABLE  R1[K2('UseNewJokerCard')] = K3(true)
  0005  GETTABUP  R1 = _ENV[K4('GM')]
  0006  GETTABLE  R1 = R1[K5('UIManager')]
  0007  SELF      R2 = R1[K6('OpenView')] (self)
  0008  GETTABLE  R3 = R0[K7('m_activityDefinition')]
  0009  GETTABLE  R3 = R3[K8('MainWindowPrefabName')]
  0010  GETTABLE  R4 = R0[K9('m_activityType')]
  0011  LOADBOOL  R5 = false
  0012  CLOSURE   R6 = closure proto0
  0013  CALL      R1 = call(R1, 0 args, 5 rets)
  0014  GETTABUP  R1 = _ENV[K10('AlbumActivityBaseWindow')]
  0015  GETTABLE  R1 = R1[K11('OnCloseFinish')]
  0016  MOVE      R2 = R0
  0017  CALL      R1 = call(R1, 0 args, 1 rets)
  0018  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 69-74 np=1 va=0 ms=8 code=23 consts=10 upvals=2 protos=0
    ;   K[0]='GM'
    ;   K[1]='TutorialModel'
    ;   K[2]='HasAnyStrongTutorialOngoing'
    ;   K[3]='UIManager'
    ;   K[4]='GetOpenedTopView'
    ;   K[5]='OpenView'
    ;   K[6]='UIPrefabConfigName'
    ;   K[7]='AlbumJokerExchangeWindow'
    ;   K[8]='m_activityType'
    ;   K[9]='m_jokerEndTime'
    ;   upvals: _ENV, self
    ;   locals: window(0-23)
    0000  GETTABUP  R1 = _ENV[K0('GM')]
    0001  GETTABLE  R1 = R1[K1('TutorialModel')]
    0002  SELF      R2 = R1[K2('HasAnyStrongTutorialOngoing')] (self)
    0003  CALL      R1 = call(R1, 1 args, 1 rets)
    0004  TEST      if not R1 then   -> -131065
    0005  JMP       (jump)   -> 22
    0006  GETTABUP  R1 = _ENV[K0('GM')]
    0007  GETTABLE  R1 = R1[K3('UIManager')]
    0008  SELF      R2 = R1[K4('GetOpenedTopView')] (self)
    0009  CALL      R1 = call(R1, 1 args, 1 rets)
    0010  EQ        if R0 eq R0   -> -130548
    0011  JMP       (jump)   -> 22
    0012  GETTABUP  R1 = _ENV[K0('GM')]
    0013  GETTABLE  R1 = R1[K3('UIManager')]
    0014  SELF      R2 = R1[K5('OpenView')] (self)
    0015  GETTABUP  R3 = _ENV[K6('UIPrefabConfigName')]
    0016  GETTABLE  R3 = R3[K7('AlbumJokerExchangeWindow')]
    0017  GETTABUP  R4 = self[K8('m_activityType')]
    0018  LOADBOOL  R5 = false
    0019  LOADNIL   R6..R6 = nil
    0020  GETTABUP  R7 = self[K9('m_jokerEndTime')]
    0021  CALL      R1 = call(R1, 0 args, 6 rets)
    0022  RETURN    return R0..R-1
; ---------- proto5 [OnBtnClicked] ----------
  ; fn ?  line 79-82 np=1 va=0 ms=3 code=4 consts=3 upvals=0 protos=0
  ;   K[0]='Close'
  ;   K[1]='m_open'
  ;   K[2]=true
  ;   locals: self(0-4)
  0000  SELF      R2 = R0[K0('Close')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  SETTABLE  R0[K1('m_open')] = K2(true)
  0003  RETURN    return R0..R-1
