# WeeklyActiveQuest_View_WeeklyActiveQuestPopupHelper_1307.luac
; fn @WeeklyActiveQuestPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=51 consts=19 upvals=1 protos=8
;   K[0]='WeeklyActiveQuestStartedPopupHelper'
;   K[1]='setmetatable'
;   K[2]='canPopScene'
;   K[3]='EPopupScene'
;   K[4]='Board'
;   K[5]=true
;   K[6]='BasePopupHelper'
;   K[7]='__index'
;   K[8]='Create'
;   K[9]='WeeklyActiveQuestStartedPopupHelper'
;   K[10]='Init'
;   K[11]='_OnStateChanged'
;   K[12]='CheckPopup'
;   K[13]='WeeklyActiveQuestEndedPopupHelper'
;   K[14]='setmetatable'
;   K[15]='BasePopupHelper'
;   K[16]='WeeklyActiveQuestEndedPopupHelper'
;   K[17]='Init'
;   K[18]='_OnStateChanged'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  NEWTABLE  R2 = {} (0 items)
0003  GETTABUP  R3 = _ENV[K3('EPopupScene')]
0004  GETTABLE  R3 = R3[K4('Board')]
0005  SETTABLE  R2[R3] = K5(true)
0006  SETTABLE  R1[K2('canPopScene')] = R2
0007  GETTABUP  R2 = _ENV[K6('BasePopupHelper')]
0008  CALL      R0 = call(R0, 1 args, 2 rets)
0009  SETTABUP  _ENV[K0('WeeklyActiveQuestStartedPopupHelper')] = R0
0010  GETTABUP  R0 = _ENV[K0('WeeklyActiveQuestStartedPopupHelper')]
0011  GETTABUP  R1 = _ENV[K0('WeeklyActiveQuestStartedPopupHelper')]
0012  SETTABLE  R0[K7('__index')] = R1
0013  GETTABUP  R0 = _ENV[K0('WeeklyActiveQuestStartedPopupHelper')]
0014  CLOSURE   R1 = closure proto0
0015  SETTABLE  R0[K8('Create')] = R1
0016  GETTABUP  R0 = _ENV[K9('WeeklyActiveQuestStartedPopupHelper')]
0017  CLOSURE   R1 = closure proto1
0018  SETTABLE  R0[K10('Init')] = R1
0019  GETTABUP  R0 = _ENV[K9('WeeklyActiveQuestStartedPopupHelper')]
0020  CLOSURE   R1 = closure proto2
0021  SETTABLE  R0[K11('_OnStateChanged')] = R1
0022  GETTABUP  R0 = _ENV[K9('WeeklyActiveQuestStartedPopupHelper')]
0023  CLOSURE   R1 = closure proto3
0024  SETTABLE  R0[K12('CheckPopup')] = R1
0025  GETTABUP  R0 = _ENV[K14('setmetatable')]
0026  NEWTABLE  R1 = {} (0 items)
0027  NEWTABLE  R2 = {} (0 items)
0028  GETTABUP  R3 = _ENV[K3('EPopupScene')]
0029  GETTABLE  R3 = R3[K4('Board')]
0030  SETTABLE  R2[R3] = K5(true)
0031  SETTABLE  R1[K2('canPopScene')] = R2
0032  GETTABUP  R2 = _ENV[K15('BasePopupHelper')]
0033  CALL      R0 = call(R0, 1 args, 2 rets)
0034  SETTABUP  _ENV[K13('WeeklyActiveQuestEndedPopupHelper')] = R0
0035  GETTABUP  R0 = _ENV[K13('WeeklyActiveQuestEndedPopupHelper')]
0036  GETTABUP  R1 = _ENV[K13('WeeklyActiveQuestEndedPopupHelper')]
0037  SETTABLE  R0[K7('__index')] = R1
0038  GETTABUP  R0 = _ENV[K13('WeeklyActiveQuestEndedPopupHelper')]
0039  CLOSURE   R1 = closure proto4
0040  SETTABLE  R0[K8('Create')] = R1
0041  GETTABUP  R0 = _ENV[K16('WeeklyActiveQuestEndedPopupHelper')]
0042  CLOSURE   R1 = closure proto5
0043  SETTABLE  R0[K17('Init')] = R1
0044  GETTABUP  R0 = _ENV[K16('WeeklyActiveQuestEndedPopupHelper')]
0045  CLOSURE   R1 = closure proto6
0046  SETTABLE  R0[K18('_OnStateChanged')] = R1
0047  GETTABUP  R0 = _ENV[K16('WeeklyActiveQuestEndedPopupHelper')]
0048  CLOSURE   R1 = closure proto7
0049  SETTABLE  R0[K12('CheckPopup')] = R1
0050  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 9-13 np=0 va=0 ms=3 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='WeeklyActiveQuestStartedPopupHelper'
  ;   K[2]='Init'
  ;   upvals: _ENV
  ;   locals: helper(4-8)
  0000  GETTABUP  R0 = _ENV[K0('setmetatable')]
  0001  NEWTABLE  R1 = {} (0 items)
  0002  GETTABUP  R2 = _ENV[K1('WeeklyActiveQuestStartedPopupHelper')]
  0003  CALL      R0 = call(R0, 1 args, 2 rets)
  0004  SELF      R2 = R0[K2('Init')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  RETURN    return R0..R-1
  0007  RETURN    return R0..R-1
; ---------- proto1 [Init] ----------
  ; fn ?  line 15-22 np=1 va=0 ms=10 code=30 consts=11 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='pairs'
  ;   K[3]='WeeklyActiveQuestDefinition'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='_OnStateChanged'
  ;   K[8]='NewDayEvent'
  ;   K[9]='EEventType'
  ;   K[10]='ChangeGameMode'
  ;   upvals: _ENV
  ;   locals: self(0-30), (for generator)(7-22), (for state)(7-22), (for control)(7-22), _(8-20), activityDefinition(8-20)
  0000  GETTABUP  R1 = _ENV[K0('BasePopupHelper')]
  0001  GETTABLE  R1 = R1[K1('Init')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABUP  R1 = _ENV[K2('pairs')]
  0005  GETTABUP  R2 = _ENV[K3('WeeklyActiveQuestDefinition')]
  0006  CALL      R1 = call(R1, 3 args, 1 rets)
  0007  JMP       (jump)   -> 20
  0008  GETTABUP  R6 = _ENV[K4('EventDispatcher')]
  0009  GETTABLE  R6 = R6[K5('AddListener')]
  0010  GETTABLE  R7 = R5[K6('StateChangedEvent')]
  0011  MOVE      R8 = R0
  0012  GETTABLE  R9 = R0[K7('_OnStateChanged')]
  0013  CALL      R6 = call(R6, 0 args, 3 rets)
  0014  GETTABUP  R6 = _ENV[K4('EventDispatcher')]
  0015  GETTABLE  R6 = R6[K5('AddListener')]
  0016  GETTABLE  R7 = R5[K8('NewDayEvent')]
  0017  MOVE      R8 = R0
  0018  GETTABLE  R9 = R0[K7('_OnStateChanged')]
  0019  CALL      R6 = call(R6, 0 args, 3 rets)
  0020  TFORCALL  tforcall R1
  0021  TFORLOOP  tforloop R3(sBx=-14)   -> 8
  0022  GETTABUP  R1 = _ENV[K4('EventDispatcher')]
  0023  GETTABLE  R1 = R1[K5('AddListener')]
  0024  GETTABUP  R2 = _ENV[K9('EEventType')]
  0025  GETTABLE  R2 = R2[K10('ChangeGameMode')]
  0026  MOVE      R3 = R0
  0027  GETTABLE  R4 = R0[K7('_OnStateChanged')]
  0028  CALL      R1 = call(R1, 0 args, 3 rets)
  0029  RETURN    return R0..R-1
; ---------- proto2 [_OnStateChanged] ----------
  ; fn ?  line 24-27 np=1 va=0 ms=4 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='SetNeedCheckPopup'
  ;   locals: self(0-4)
  0000  SELF      R2 = R0[K0('SetNeedCheckPopup')] (self)
  0001  LOADBOOL  R3 = true
  0002  CALL      R1 = call(R1, 0 args, 2 rets)
  0003  RETURN    return R0..R-1
; ---------- proto3 [CheckPopup] ----------
  ; fn ?  line 29-42 np=1 va=0 ms=12 code=30 consts=11 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='WeeklyActiveQuestDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetState'
  ;   K[6]='ActivityState'
  ;   K[7]='Started'
  ;   K[8]='HasPopupToday'
  ;   K[9]='UpdatePerSecond'
  ;   K[10]='MainWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: self(0-30), (for generator)(3-29), (for state)(3-29), (for control)(3-29), activityType(4-27), activityDefinition(4-27), model(9-27), state(11-27)
  0000  GETTABUP  R1 = _ENV[K0('pairs')]
  0001  GETTABUP  R2 = _ENV[K1('WeeklyActiveQuestDefinition')]
  0002  CALL      R1 = call(R1, 3 args, 1 rets)
  0003  JMP       (jump)   -> 27
  0004  GETTABUP  R6 = _ENV[K2('GM')]
  0005  GETTABLE  R6 = R6[K3('ActivityManager')]
  0006  SELF      R7 = R6[K4('GetModel')] (self)
  0007  MOVE      R8 = R0
  0008  CALL      R6 = call(R6, 1 args, 2 rets)
  0009  SELF      R8 = R6[K5('GetState')] (self)
  0010  CALL      R7 = call(R7, 1 args, 1 rets)
  0011  GETTABUP  R8 = _ENV[K6('ActivityState')]
  0012  GETTABLE  R8 = R8[K7('Started')]
  0013  EQ        if R0 eq R8   -> -127465
  0014  JMP       (jump)   -> 27
  0015  SELF      R9 = R6[K8('HasPopupToday')] (self)
  0016  CALL      R8 = call(R8, 1 args, 1 rets)
  0017  TEST      if not R8 then   -> -131052
  0018  JMP       (jump)   -> 27
  0019  SELF      R9 = R6[K9('UpdatePerSecond')] (self)
  0020  CALL      R8 = call(R8, 0 args, 1 rets)
  0021  GETTABLE  R8 = R5[K10('MainWindowPrefabName')]
  0022  NEWTABLE  R9 = {} (2 items)
  0023  MOVE      R10 = R0
  0024  LOADBOOL  R11 = true
  0025  SETLIST   setlist R9[B=1,C=2]
  0026  RETURN    return R8..R7
  0027  TFORCALL  tforcall R1
  0028  TFORLOOP  tforloop R3(sBx=-25)   -> 4
  0029  RETURN    return R0..R-1
; ---------- proto4 [Create] ----------
  ; fn ?  line 54-58 np=0 va=0 ms=3 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='WeeklyActiveQuestEndedPopupHelper'
  ;   K[2]='Init'
  ;   upvals: _ENV
  ;   locals: helper(4-8)
  0000  GETTABUP  R0 = _ENV[K0('setmetatable')]
  0001  NEWTABLE  R1 = {} (0 items)
  0002  GETTABUP  R2 = _ENV[K1('WeeklyActiveQuestEndedPopupHelper')]
  0003  CALL      R0 = call(R0, 1 args, 2 rets)
  0004  SELF      R2 = R0[K2('Init')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  RETURN    return R0..R-1
  0007  RETURN    return R0..R-1
; ---------- proto5 [Init] ----------
  ; fn ?  line 60-67 np=1 va=0 ms=10 code=30 consts=11 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='pairs'
  ;   K[3]='WeeklyActiveQuestDefinition'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='_OnStateChanged'
  ;   K[8]='NewDayEvent'
  ;   K[9]='EEventType'
  ;   K[10]='ChangeGameMode'
  ;   upvals: _ENV
  ;   locals: self(0-30), (for generator)(7-22), (for state)(7-22), (for control)(7-22), _(8-20), activityDefinition(8-20)
  0000  GETTABUP  R1 = _ENV[K0('BasePopupHelper')]
  0001  GETTABLE  R1 = R1[K1('Init')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABUP  R1 = _ENV[K2('pairs')]
  0005  GETTABUP  R2 = _ENV[K3('WeeklyActiveQuestDefinition')]
  0006  CALL      R1 = call(R1, 3 args, 1 rets)
  0007  JMP       (jump)   -> 20
  0008  GETTABUP  R6 = _ENV[K4('EventDispatcher')]
  0009  GETTABLE  R6 = R6[K5('AddListener')]
  0010  GETTABLE  R7 = R5[K6('StateChangedEvent')]
  0011  MOVE      R8 = R0
  0012  GETTABLE  R9 = R0[K7('_OnStateChanged')]
  0013  CALL      R6 = call(R6, 0 args, 3 rets)
  0014  GETTABUP  R6 = _ENV[K4('EventDispatcher')]
  0015  GETTABLE  R6 = R6[K5('AddListener')]
  0016  GETTABLE  R7 = R5[K8('NewDayEvent')]
  0017  MOVE      R8 = R0
  0018  GETTABLE  R9 = R0[K7('_OnStateChanged')]
  0019  CALL      R6 = call(R6, 0 args, 3 rets)
  0020  TFORCALL  tforcall R1
  0021  TFORLOOP  tforloop R3(sBx=-14)   -> 8
  0022  GETTABUP  R1 = _ENV[K4('EventDispatcher')]
  0023  GETTABLE  R1 = R1[K5('AddListener')]
  0024  GETTABUP  R2 = _ENV[K9('EEventType')]
  0025  GETTABLE  R2 = R2[K10('ChangeGameMode')]
  0026  MOVE      R3 = R0
  0027  GETTABLE  R4 = R0[K7('_OnStateChanged')]
  0028  CALL      R1 = call(R1, 0 args, 3 rets)
  0029  RETURN    return R0..R-1
; ---------- proto6 [_OnStateChanged] ----------
  ; fn ?  line 69-72 np=1 va=0 ms=4 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='SetNeedCheckPopup'
  ;   locals: self(0-4)
  0000  SELF      R2 = R0[K0('SetNeedCheckPopup')] (self)
  0001  LOADBOOL  R3 = true
  0002  CALL      R1 = call(R1, 0 args, 2 rets)
  0003  RETURN    return R0..R-1
; ---------- proto7 [CheckPopup] ----------
  ; fn ?  line 74-88 np=1 va=0 ms=13 code=32 consts=11 upvals=1 protos=0
  ;   K[0]='pairs'
  ;   K[1]='WeeklyActiveQuestDefinition'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='GetState'
  ;   K[6]='ActivityState'
  ;   K[7]='Ended'
  ;   K[8]='CanRewardRecover'
  ;   K[9]='RewardRecover'
  ;   K[10]='RewardRecoverWindowPrefabName'
  ;   upvals: _ENV
  ;   locals: self(0-32), (for generator)(3-31), (for state)(3-31), (for control)(3-31), activityType(4-29), activityDefinition(4-29), model(9-29), state(11-29), rewards(21-29)
  0000  GETTABUP  R1 = _ENV[K0('pairs')]
  0001  GETTABUP  R2 = _ENV[K1('WeeklyActiveQuestDefinition')]
  0002  CALL      R1 = call(R1, 3 args, 1 rets)
  0003  JMP       (jump)   -> 29
  0004  GETTABUP  R6 = _ENV[K2('GM')]
  0005  GETTABLE  R6 = R6[K3('ActivityManager')]
  0006  SELF      R7 = R6[K4('GetModel')] (self)
  0007  MOVE      R8 = R0
  0008  CALL      R6 = call(R6, 1 args, 2 rets)
  0009  SELF      R8 = R6[K5('GetState')] (self)
  0010  CALL      R7 = call(R7, 1 args, 1 rets)
  0011  GETTABUP  R8 = _ENV[K6('ActivityState')]
  0012  GETTABLE  R8 = R8[K7('Ended')]
  0013  EQ        if R0 eq R8   -> -127465
  0014  JMP       (jump)   -> 29
  0015  SELF      R9 = R6[K8('CanRewardRecover')] (self)
  0016  CALL      R8 = call(R8, 1 args, 1 rets)
  0017  TEST      if not R8 then   -> -131053
  0018  JMP       (jump)   -> 29
  0019  SELF      R9 = R6[K9('RewardRecover')] (self)
  0020  CALL      R8 = call(R8, 1 args, 1 rets)
  0021  TEST      if not R8 then   -> -131049
  0022  JMP       (jump)   -> 29
  0023  GETTABLE  R9 = R5[K10('RewardRecoverWindowPrefabName')]
  0024  NEWTABLE  R10 = {} (2 items)
  0025  MOVE      R11 = R0
  0026  MOVE      R12 = R0
  0027  SETLIST   setlist R10[B=1,C=2]
  0028  RETURN    return R9..R8
  0029  TFORCALL  tforcall R1
  0030  TFORLOOP  tforloop R3(sBx=-27)   -> 4
  0031  RETURN    return R0..R-1
