# LuckyDay_View_LuckyDayPopupHelper_1251.luac
; fn @LuckyDayPopupHelper.lua  line 0-0 np=0 va=1 ms=4 code=26 consts=13 upvals=1 protos=4
;   K[0]='LuckyDayPopupHelper'
;   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]='LuckyDayPopupHelper'
;   K[10]='Init'
;   K[11]='_OnStateChanged'
;   K[12]='CheckPopup'
;   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('LuckyDayPopupHelper')] = R0
0010  GETTABUP  R0 = _ENV[K0('LuckyDayPopupHelper')]
0011  GETTABUP  R1 = _ENV[K0('LuckyDayPopupHelper')]
0012  SETTABLE  R0[K7('__index')] = R1
0013  GETTABUP  R0 = _ENV[K0('LuckyDayPopupHelper')]
0014  CLOSURE   R1 = closure proto0
0015  SETTABLE  R0[K8('Create')] = R1
0016  GETTABUP  R0 = _ENV[K9('LuckyDayPopupHelper')]
0017  CLOSURE   R1 = closure proto1
0018  SETTABLE  R0[K10('Init')] = R1
0019  GETTABUP  R0 = _ENV[K9('LuckyDayPopupHelper')]
0020  CLOSURE   R1 = closure proto2
0021  SETTABLE  R0[K11('_OnStateChanged')] = R1
0022  GETTABUP  R0 = _ENV[K9('LuckyDayPopupHelper')]
0023  CLOSURE   R1 = closure proto3
0024  SETTABLE  R0[K12('CheckPopup')] = R1
0025  RETURN    return R0..R-1
; ---------- proto0 [Create] ----------
  ; fn ?  line 10-14 np=0 va=0 ms=3 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='setmetatable'
  ;   K[1]='LuckyDayPopupHelper'
  ;   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('LuckyDayPopupHelper')]
  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 16-27 np=1 va=0 ms=10 code=51 consts=14 upvals=1 protos=0
  ;   K[0]='BasePopupHelper'
  ;   K[1]='Init'
  ;   K[2]='pairs'
  ;   K[3]='LuckyDayDefinition'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='StateChangedEvent'
  ;   K[7]='_OnStateChanged'
  ;   K[8]='OrderStateChangedEvent'
  ;   K[9]='EEventType'
  ;   K[10]='ServerDayChanged'
  ;   K[11]='ChangeGameMode'
  ;   K[12]='OrderGroupRefreshed'
  ;   K[13]='OnMainOrderCreated'
  ;   upvals: _ENV
  ;   locals: self(0-51), (for generator)(7-22), (for state)(7-22), (for control)(7-22), _(8-20), definition(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('LuckyDayDefinition')]
  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('OrderStateChangedEvent')]
  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('ServerDayChanged')]
  0026  MOVE      R3 = R0
  0027  GETTABLE  R4 = R0[K7('_OnStateChanged')]
  0028  CALL      R1 = call(R1, 0 args, 3 rets)
  0029  GETTABUP  R1 = _ENV[K4('EventDispatcher')]
  0030  GETTABLE  R1 = R1[K5('AddListener')]
  0031  GETTABUP  R2 = _ENV[K9('EEventType')]
  0032  GETTABLE  R2 = R2[K11('ChangeGameMode')]
  0033  MOVE      R3 = R0
  0034  GETTABLE  R4 = R0[K7('_OnStateChanged')]
  0035  CALL      R1 = call(R1, 0 args, 3 rets)
  0036  GETTABUP  R1 = _ENV[K4('EventDispatcher')]
  0037  GETTABLE  R1 = R1[K5('AddListener')]
  0038  GETTABUP  R2 = _ENV[K9('EEventType')]
  0039  GETTABLE  R2 = R2[K12('OrderGroupRefreshed')]
  0040  MOVE      R3 = R0
  0041  GETTABLE  R4 = R0[K7('_OnStateChanged')]
  0042  CALL      R1 = call(R1, 0 args, 3 rets)
  0043  GETTABUP  R1 = _ENV[K4('EventDispatcher')]
  0044  GETTABLE  R1 = R1[K5('AddListener')]
  0045  GETTABUP  R2 = _ENV[K9('EEventType')]
  0046  GETTABLE  R2 = R2[K13('OnMainOrderCreated')]
  0047  MOVE      R3 = R0
  0048  GETTABLE  R4 = R0[K7('_OnStateChanged')]
  0049  CALL      R1 = call(R1, 0 args, 3 rets)
  0050  RETURN    return R0..R-1
; ---------- proto2 [_OnStateChanged] ----------
  ; fn ?  line 29-32 np=1 va=0 ms=4 code=5 consts=3 upvals=0 protos=0
  ;   K[0]='SetNeedCheckPopup'
  ;   K[1]='m_skipPopup'
  ;   K[2]=false
  ;   locals: self(0-5)
  0000  SELF      R2 = R0[K0('SetNeedCheckPopup')] (self)
  0001  LOADBOOL  R3 = true
  0002  CALL      R1 = call(R1, 0 args, 2 rets)
  0003  SETTABLE  R0[K1('m_skipPopup')] = K2(false)
  0004  RETURN    return R0..R-1
; ---------- proto3 [CheckPopup] ----------
  ; fn ?  line 46-78 np=1 va=0 ms=16 code=62 consts=19 upvals=1 protos=0
  ;   K[0]='m_skipPopup'
  ;   K[1]=false
  ;   K[2]='pairs'
  ;   K[3]='LuckyDayDefinition'
  ;   K[4]='GM'
  ;   K[5]='ActivityManager'
  ;   K[6]='GetModel'
  ;   K[7]='ShouldPopWindow'
  ;   K[8]='GetFinishCount'
  ;   K[9]=0
  ;   K[10]='Log'
  ;   K[11]='Error'
  ;   K[12]='幸运日弹窗逻辑错误'
  ;   K[13]=1
  ;   K[14]='SetNeedCheckPopup'
  ;   K[15]='MainWindowPrefabName'
  ;   K[16]='CanTrigger'
  ;   K[17]='TryTrigger'
  ;   K[18]='SetWindowSkipped'
  ;   upvals: _ENV
  ;   locals: self(0-62), bSkipPoup(1-62), (for generator)(5-61), (for state)(5-61), (for control)(5-61), activityType(6-59), definition(6-59), model(11-59), canPop(13-59), canClaim(13-59), finishCount(17-37)
  0000  GETTABLE  R1 = R0[K0('m_skipPopup')]
  0001  SETTABLE  R0[K0('m_skipPopup')] = K1(false)
  0002  GETTABUP  R2 = _ENV[K2('pairs')]
  0003  GETTABUP  R3 = _ENV[K3('LuckyDayDefinition')]
  0004  CALL      R2 = call(R2, 3 args, 1 rets)
  0005  JMP       (jump)   -> 59
  0006  GETTABUP  R7 = _ENV[K4('GM')]
  0007  GETTABLE  R7 = R7[K5('ActivityManager')]
  0008  SELF      R8 = R7[K6('GetModel')] (self)
  0009  MOVE      R9 = R0
  0010  CALL      R7 = call(R7, 1 args, 2 rets)
  0011  SELF      R9 = R7[K7('ShouldPopWindow')] (self)
  0012  CALL      R8 = call(R8, 2 args, 1 rets)
  0013  TEST      if not R8 then   -> -131057
  0014  JMP       (jump)   -> 38
  0015  SELF      R11 = R7[K8('GetFinishCount')] (self)
  0016  CALL      R10 = call(R10, 1 args, 1 rets)
  0017  LE        if R0 le K9(0)   -> -125668
  0018  JMP       (jump)   -> 24
  0019  GETTABUP  R11 = _ENV[K10('Log')]
  0020  GETTABLE  R11 = R11[K11('Error')]
  0021  LOADK     R12 = K12 '幸运日弹窗逻辑错误'
  0022  CALL      R11 = call(R11, 0 args, 1 rets)
  0023  JMP       (jump)   -> 25
  0024  SUB       R10 = K13(1) sub R10
  0025  TEST      if not R9 then   -> -131045
  0026  JMP       (jump)   -> 30
  0027  SELF      R12 = R0[K14('SetNeedCheckPopup')] (self)
  0028  LOADBOOL  R13 = true
  0029  CALL      R11 = call(R11, 0 args, 2 rets)
  0030  GETTABLE  R11 = R6[K15('MainWindowPrefabName')]
  0031  NEWTABLE  R12 = {} (3 items)
  0032  MOVE      R13 = R0
  0033  LOADBOOL  R14 = true
  0034  MOVE      R15 = R0
  0035  SETLIST   setlist R12[B=1,C=3]
  0036  RETURN    return R11..R10
  0037  JMP       (jump)   -> 59
  0038  SELF      R11 = R7[K16('CanTrigger')] (self)
  0039  CALL      R10 = call(R10, 1 args, 1 rets)
  0040  TEST      if not R10 then   -> -131030
  0041  JMP       (jump)   -> 59
  0042  TEST      if not R1 then   -> -131028
  0043  JMP       (jump)   -> 53
  0044  SELF      R11 = R7[K17('TryTrigger')] (self)
  0045  CALL      R10 = call(R10, 1 args, 1 rets)
  0046  TEST      if not R10 then   -> -131024
  0047  JMP       (jump)   -> 51
  0048  SELF      R11 = R7[K18('SetWindowSkipped')] (self)
  0049  LOADBOOL  R12 = true
  0050  CALL      R10 = call(R10, 0 args, 2 rets)
  0051  LOADNIL   R10..R10 = nil
  0052  RETURN    return R10..R9
  0053  GETTABLE  R10 = R6[K15('MainWindowPrefabName')]
  0054  NEWTABLE  R11 = {} (2 items)
  0055  MOVE      R12 = R0
  0056  LOADBOOL  R13 = true
  0057  SETLIST   setlist R11[B=1,C=2]
  0058  RETURN    return R10..R9
  0059  TFORCALL  tforcall R2
  0060  TFORLOOP  tforloop R4(sBx=-55)   -> 6
  0061  RETURN    return R0..R-1
