# UI_Window_Promotion_CrossPromotionWindow_663.luac
; fn @CrossPromotionWindow.lua  line 0-0 np=0 va=1 ms=3 code=25 consts=11 upvals=1 protos=5
;   K[0]='CrossPromotionWindow'
;   K[1]='setmetatable'
;   K[2]='canClickWindowMask'
;   K[3]=true
;   K[4]='BaseWindow'
;   K[5]='__index'
;   K[6]='Init'
;   K[7]='UpdatePerSecond'
;   K[8]='OnPlayClick'
;   K[9]='SetAcquireReward'
;   K[10]='OnCloseView'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  SETTABLE  R1[K2('canClickWindowMask')] = K3(true)
0003  GETTABUP  R2 = _ENV[K4('BaseWindow')]
0004  CALL      R0 = call(R0, 1 args, 2 rets)
0005  SETTABUP  _ENV[K0('CrossPromotionWindow')] = R0
0006  GETTABUP  R0 = _ENV[K0('CrossPromotionWindow')]
0007  GETTABUP  R1 = _ENV[K0('CrossPromotionWindow')]
0008  SETTABLE  R0[K5('__index')] = R1
0009  GETTABUP  R0 = _ENV[K0('CrossPromotionWindow')]
0010  CLOSURE   R1 = closure proto0
0011  SETTABLE  R0[K6('Init')] = R1
0012  GETTABUP  R0 = _ENV[K0('CrossPromotionWindow')]
0013  CLOSURE   R1 = closure proto1
0014  SETTABLE  R0[K7('UpdatePerSecond')] = R1
0015  GETTABUP  R0 = _ENV[K0('CrossPromotionWindow')]
0016  CLOSURE   R1 = closure proto2
0017  SETTABLE  R0[K8('OnPlayClick')] = R1
0018  GETTABUP  R0 = _ENV[K0('CrossPromotionWindow')]
0019  CLOSURE   R1 = closure proto3
0020  SETTABLE  R0[K9('SetAcquireReward')] = R1
0021  GETTABUP  R0 = _ENV[K0('CrossPromotionWindow')]
0022  CLOSURE   R1 = closure proto4
0023  SETTABLE  R0[K10('OnCloseView')] = R1
0024  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 8-30 np=1 va=0 ms=13 code=59 consts=30 upvals=1 protos=1
  ;   K[0]='m_bAcquireReward'
  ;   K[1]=false
  ;   K[2]='GM'
  ;   K[3]='CrossPromotionModel'
  ;   K[4]='GetTasks'
  ;   K[5]='ipairs'
  ;   K[6]='ResourceLoader'
  ;   K[7]='LoadPrefab'
  ;   K[8]='DataResource'
  ;   K[9]='UIPrefabConfig'
  ;   K[10]='GetConfig'
  ;   K[11]='UIPrefabConfigName'
  ;   K[12]='CPTaskCell'
  ;   K[13]='m_scrollRect'
  ;   K[14]='content'
  ;   K[15]='Vector3'
  ;   K[16]='zero'
  ;   K[17]='LoadImageFromBundleOrUrl'
  ;   K[18]='m_mainPicImage'
  ;   K[19]='mainPic'
  ;   K[20]='mainPicName'
  ;   K[21]='LogWindowAction'
  ;   K[22]='EBIType'
  ;   K[23]='UIActionType'
  ;   K[24]='Open'
  ;   K[25]='EBIReferType'
  ;   K[26]='UserClick'
  ;   K[27]='UpdatePerSecond'
  ;   K[28]='SetCPWinOpended'
  ;   K[29]='RefreshActivityButtonInNeed'
  ;   upvals: _ENV
  ;   locals: self(0-59), arrTaskEntities(5-59), (for generator)(8-28), (for state)(8-28), (for control)(8-28), index(9-26), taskEntity(9-26)
  0000  SETTABLE  R0[K0('m_bAcquireReward')] = K1(false)
  0001  GETTABUP  R1 = _ENV[K2('GM')]
  0002  GETTABLE  R1 = R1[K3('CrossPromotionModel')]
  0003  SELF      R2 = R1[K4('GetTasks')] (self)
  0004  CALL      R1 = call(R1, 1 args, 1 rets)
  0005  GETTABUP  R2 = _ENV[K5('ipairs')]
  0006  MOVE      R3 = R0
  0007  CALL      R2 = call(R2, 3 args, 1 rets)
  0008  JMP       (jump)   -> 26
  0009  GETTABUP  R7 = _ENV[K2('GM')]
  0010  GETTABLE  R7 = R7[K6('ResourceLoader')]
  0011  SELF      R8 = R7[K7('LoadPrefab')] (self)
  0012  GETTABUP  R9 = _ENV[K2('GM')]
  0013  GETTABLE  R9 = R9[K8('DataResource')]
  0014  GETTABLE  R9 = R9[K9('UIPrefabConfig')]
  0015  SELF      R10 = R9[K10('GetConfig')] (self)
  0016  GETTABUP  R11 = _ENV[K11('UIPrefabConfigName')]
  0017  GETTABLE  R11 = R11[K12('CPTaskCell')]
  0018  CALL      R9 = call(R9, 1 args, 2 rets)
  0019  GETTABLE  R10 = R0[K13('m_scrollRect')]
  0020  GETTABLE  R10 = R10[K14('content')]
  0021  GETTABUP  R11 = _ENV[K15('Vector3')]
  0022  GETTABLE  R11 = R11[K16('zero')]
  0023  CLOSURE   R12 = closure proto0
  0024  CALL      R7 = call(R7, 0 args, 5 rets)
  0025  JMP       (jump)   -> 26
  0026  TFORCALL  tforcall R2
  0027  TFORLOOP  tforloop R4(sBx=-19)   -> 9
  0028  GETTABUP  R2 = _ENV[K2('GM')]
  0029  GETTABLE  R2 = R2[K3('CrossPromotionModel')]
  0030  SELF      R3 = R2[K17('LoadImageFromBundleOrUrl')] (self)
  0031  GETTABLE  R4 = R0[K18('m_mainPicImage')]
  0032  GETTABUP  R5 = _ENV[K2('GM')]
  0033  GETTABLE  R5 = R5[K3('CrossPromotionModel')]
  0034  GETTABLE  R5 = R5[K19('mainPic')]
  0035  GETTABUP  R6 = _ENV[K2('GM')]
  0036  GETTABLE  R6 = R6[K3('CrossPromotionModel')]
  0037  GETTABLE  R6 = R6[K20('mainPicName')]
  0038  CALL      R2 = call(R2, 0 args, 4 rets)
  0039  SELF      R3 = R0[K21('LogWindowAction')] (self)
  0040  GETTABUP  R4 = _ENV[K22('EBIType')]
  0041  GETTABLE  R4 = R4[K23('UIActionType')]
  0042  GETTABLE  R4 = R4[K24('Open')]
  0043  NEWTABLE  R5 = {} (1 items)
  0044  GETTABUP  R6 = _ENV[K25('EBIReferType')]
  0045  GETTABLE  R6 = R6[K26('UserClick')]
  0046  SETLIST   setlist R5[B=1,C=1]
  0047  CALL      R2 = call(R2, 0 args, 3 rets)
  0048  SELF      R3 = R0[K27('UpdatePerSecond')] (self)
  0049  CALL      R2 = call(R2, 0 args, 1 rets)
  0050  GETTABUP  R2 = _ENV[K2('GM')]
  0051  GETTABLE  R2 = R2[K3('CrossPromotionModel')]
  0052  SELF      R3 = R2[K28('SetCPWinOpended')] (self)
  0053  CALL      R2 = call(R2, 0 args, 1 rets)
  0054  GETTABUP  R2 = _ENV[K2('GM')]
  0055  GETTABLE  R2 = R2[K3('CrossPromotionModel')]
  0056  SELF      R3 = R2[K29('RefreshActivityButtonInNeed')] (self)
  0057  CALL      R2 = call(R2, 0 args, 1 rets)
  0058  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 12-15 np=1 va=0 ms=6 code=7 consts=2 upvals=2 protos=0
    ;   K[0]='GetLuaTable'
    ;   K[1]='Init'
    ;   upvals: self, taskEntity
    ;   locals: go(0-7), tbTaskCell(2-7)
    0000  SELF      R2 = R0[K0('GetLuaTable')] (self)
    0001  CALL      R1 = call(R1, 1 args, 1 rets)
    0002  SELF      R3 = R1[K1('Init')] (self)
    0003  GETUPVAL  R4 = self
    0004  GETUPVAL  R5 = self
    0005  CALL      R2 = call(R2, 0 args, 3 rets)
    0006  RETURN    return R0..R-1
; ---------- proto1 [UpdatePerSecond] ----------
  ; fn ?  line 32-40 np=1 va=0 ms=6 code=26 consts=14 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='CrossPromotionModel'
  ;   K[2]='GetEndTime'
  ;   K[3]='GameModel'
  ;   K[4]='GetServerTime'
  ;   K[5]=0
  ;   K[6]='Close'
  ;   K[7]='TimeUtil'
  ;   K[8]='ParseTimeDescription'
  ;   K[9]='math'
  ;   K[10]='max'
  ;   K[11]=2
  ;   K[12]='m_timeText'
  ;   K[13]='text'
  ;   upvals: _ENV
  ;   locals: self(0-26), remainTime(9-26), timeStr(23-26)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('CrossPromotionModel')]
  0002  SELF      R2 = R1[K2('GetEndTime')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  GETTABUP  R2 = _ENV[K0('GM')]
  0005  GETTABLE  R2 = R2[K3('GameModel')]
  0006  SELF      R3 = R2[K4('GetServerTime')] (self)
  0007  CALL      R2 = call(R2, 1 args, 1 rets)
  0008  SUB       R1 = R2 sub R1
  0009  LE        if R0 le K5(0)   -> -130288
  0010  JMP       (jump)   -> 14
  0011  SELF      R3 = R0[K6('Close')] (self)
  0012  CALL      R2 = call(R2, 0 args, 1 rets)
  0013  RETURN    return R0..R-1
  0014  GETTABUP  R2 = _ENV[K7('TimeUtil')]
  0015  GETTABLE  R2 = R2[K8('ParseTimeDescription')]
  0016  GETTABUP  R3 = _ENV[K9('math')]
  0017  GETTABLE  R3 = R3[K10('max')]
  0018  LOADK     R4 = K5 0
  0019  MOVE      R5 = R0
  0020  CALL      R3 = call(R3, 1 args, 2 rets)
  0021  LOADK     R4 = K11 2
  0022  CALL      R2 = call(R2, 1 args, 2 rets)
  0023  GETTABLE  R3 = R0[K12('m_timeText')]
  0024  SETTABLE  R3[K13('text')] = R2
  0025  RETURN    return R0..R-1
; ---------- proto2 [OnPlayClick] ----------
  ; fn ?  line 42-45 np=1 va=0 ms=3 code=7 consts=4 upvals=1 protos=0
  ;   K[0]='Close'
  ;   K[1]='GM'
  ;   K[2]='CrossPromotionModel'
  ;   K[3]='Go2NewGame'
  ;   upvals: _ENV
  ;   locals: self(0-7)
  0000  SELF      R2 = R0[K0('Close')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  GETTABUP  R1 = _ENV[K1('GM')]
  0003  GETTABLE  R1 = R1[K2('CrossPromotionModel')]
  0004  SELF      R2 = R1[K3('Go2NewGame')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  RETURN    return R0..R-1
; ---------- proto3 [SetAcquireReward] ----------
  ; fn ?  line 47-49 np=1 va=0 ms=2 code=2 consts=2 upvals=0 protos=0
  ;   K[0]='m_bAcquireReward'
  ;   K[1]=true
  ;   locals: self(0-2)
  0000  SETTABLE  R0[K0('m_bAcquireReward')] = K1(true)
  0001  RETURN    return R0..R-1
; ---------- proto4 [OnCloseView] ----------
  ; fn ?  line 51-56 np=1 va=0 ms=3 code=12 consts=6 upvals=1 protos=0
  ;   K[0]='BaseWindow'
  ;   K[1]='OnCloseView'
  ;   K[2]='m_bAcquireReward'
  ;   K[3]='GM'
  ;   K[4]='SyncModel'
  ;   K[5]='CheckUpload'
  ;   upvals: _ENV
  ;   locals: self(0-12)
  0000  GETTABUP  R1 = _ENV[K0('BaseWindow')]
  0001  GETTABLE  R1 = R1[K1('OnCloseView')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABLE  R1 = R0[K2('m_bAcquireReward')]
  0005  TEST      if not R1 then   -> -131065
  0006  JMP       (jump)   -> 11
  0007  GETTABUP  R1 = _ENV[K3('GM')]
  0008  GETTABLE  R1 = R1[K4('SyncModel')]
  0009  SELF      R2 = R1[K5('CheckUpload')] (self)
  0010  CALL      R1 = call(R1, 0 args, 1 rets)
  0011  RETURN    return R0..R-1
