# ExtraBoardBp_View_ExtraBoardBpActivityBuyTicketWindow_1604.luac
; fn @ExtraBoardBpActivityBuyTicketWindow.lua  line 0-0 np=0 va=1 ms=3 code=19 consts=9 upvals=1 protos=3
;   K[0]='ExtraBoardBpActivityBuyTicketWindow'
;   K[1]='setmetatable'
;   K[2]='m_bCloseWhenBuyTicketSuccess'
;   K[3]=true
;   K[4]='ExtraBoardBpActivityBaseWindow'
;   K[5]='__index'
;   K[6]='Init'
;   K[7]='_InitView'
;   K[8]='OnIAPBtnClicked'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  SETTABLE  R1[K2('m_bCloseWhenBuyTicketSuccess')] = K3(true)
0003  GETTABUP  R2 = _ENV[K4('ExtraBoardBpActivityBaseWindow')]
0004  CALL      R0 = call(R0, 1 args, 2 rets)
0005  SETTABUP  _ENV[K0('ExtraBoardBpActivityBuyTicketWindow')] = R0
0006  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityBuyTicketWindow')]
0007  GETTABUP  R1 = _ENV[K0('ExtraBoardBpActivityBuyTicketWindow')]
0008  SETTABLE  R0[K5('__index')] = R1
0009  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityBuyTicketWindow')]
0010  CLOSURE   R1 = closure proto0
0011  SETTABLE  R0[K6('Init')] = R1
0012  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityBuyTicketWindow')]
0013  CLOSURE   R1 = closure proto1
0014  SETTABLE  R0[K7('_InitView')] = R1
0015  GETTABUP  R0 = _ENV[K0('ExtraBoardBpActivityBuyTicketWindow')]
0016  CLOSURE   R1 = closure proto2
0017  SETTABLE  R0[K8('OnIAPBtnClicked')] = R1
0018  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 13-19 np=4 va=0 ms=9 code=14 consts=5 upvals=1 protos=0
  ;   K[0]='ExtraBoardBpActivityBaseWindow'
  ;   K[1]='Init'
  ;   K[2]='_InitView'
  ;   K[3]='GetModel'
  ;   K[4]='OnBuyTicketWindowOpened'
  ;   upvals: _ENV
  ;   locals: self(0-14), activityType(0-14), id(0-14), bAutoPop(0-14)
  0000  GETTABUP  R4 = _ENV[K0('ExtraBoardBpActivityBaseWindow')]
  0001  GETTABLE  R4 = R4[K1('Init')]
  0002  MOVE      R5 = R0
  0003  MOVE      R6 = R0
  0004  MOVE      R7 = R0
  0005  MOVE      R8 = R0
  0006  CALL      R4 = call(R4, 0 args, 4 rets)
  0007  SELF      R5 = R0[K2('_InitView')] (self)
  0008  CALL      R4 = call(R4, 0 args, 1 rets)
  0009  SELF      R5 = R0[K3('GetModel')] (self)
  0010  CALL      R4 = call(R4, 1 args, 1 rets)
  0011  SELF      R5 = R4[K4('OnBuyTicketWindowOpened')] (self)
  0012  CALL      R4 = call(R4, 0 args, 1 rets)
  0013  RETURN    return R0..R-1
; ---------- proto1 [_InitView] ----------
  ; fn ?  line 21-33 np=1 va=0 ms=13 code=30 consts=14 upvals=1 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='GetQuestHelper'
  ;   K[2]='ipairs'
  ;   K[3]='GetAllCompletedQuests'
  ;   K[4]='RewardApi'
  ;   K[5]='MergeRewards'
  ;   K[6]='GetPaidRewards'
  ;   K[7]='m_rewardContent'
  ;   K[8]='Init'
  ;   K[9]='ERewardScene'
  ;   K[10]='Other'
  ;   K[11]='m_IAPButtonText'
  ;   K[12]='text'
  ;   K[13]='GetLocalizedPrice'
  ;   upvals: _ENV
  ;   locals: self(0-30), model(2-30), questHelper(4-30), rewards(5-30), (for generator)(9-19), (for state)(9-19), (for control)(9-19), _(10-17), questEntity(10-17)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R3 = R1[K1('GetQuestHelper')] (self)
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  NEWTABLE  R3 = {} (0 items)
  0005  GETTABUP  R4 = _ENV[K2('ipairs')]
  0006  SELF      R6 = R2[K3('GetAllCompletedQuests')] (self)
  0007  CALL      R5 = call(R5, -1 args, 1 rets)
  0008  CALL      R4 = call(R4, 3 args, -1 rets)
  0009  JMP       (jump)   -> 17
  0010  GETTABUP  R9 = _ENV[K4('RewardApi')]
  0011  GETTABLE  R9 = R9[K5('MergeRewards')]
  0012  MOVE      R10 = R0
  0013  SELF      R12 = R8[K6('GetPaidRewards')] (self)
  0014  CALL      R11 = call(R11, -1 args, 1 rets)
  0015  CALL      R9 = call(R9, 1 args, -1 rets)
  0016  MOVE      R3 = R0
  0017  TFORCALL  tforcall R4
  0018  TFORLOOP  tforloop R6(sBx=-9)   -> 10
  0019  GETTABLE  R4 = R0[K7('m_rewardContent')]
  0020  SELF      R5 = R4[K8('Init')] (self)
  0021  MOVE      R6 = R0
  0022  GETTABUP  R7 = _ENV[K9('ERewardScene')]
  0023  GETTABLE  R7 = R7[K10('Other')]
  0024  CALL      R4 = call(R4, 0 args, 3 rets)
  0025  GETTABLE  R4 = R0[K11('m_IAPButtonText')]
  0026  SELF      R6 = R1[K13('GetLocalizedPrice')] (self)
  0027  CALL      R5 = call(R5, 1 args, 1 rets)
  0028  SETTABLE  R4[K12('text')] = R5
  0029  RETURN    return R0..R-1
; ---------- proto2 [OnIAPBtnClicked] ----------
  ; fn ?  line 35-37 np=1 va=0 ms=3 code=5 consts=2 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='StartPurchase'
  ;   locals: self(0-5)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('StartPurchase')] (self)
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  RETURN    return R0..R-1
