# AlbumActivity_View_AlbumJokerExchangeConfirmWindow_1148.luac
; fn @AlbumJokerExchangeConfirmWindow.lua  line 0-0 np=0 va=1 ms=3 code=22 consts=10 upvals=1 protos=4
;   K[0]='AlbumJokerExchangeConfirmWindow'
;   K[1]='setmetatable'
;   K[2]='bCloseWhenLimitAlbumStateChanged'
;   K[3]=true
;   K[4]='AlbumActivityBaseWindow'
;   K[5]='__index'
;   K[6]='Init'
;   K[7]='OnCloseFinish'
;   K[8]='OnConfirmClicked'
;   K[9]='OnCloseBtnClick'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  SETTABLE  R1[K2('bCloseWhenLimitAlbumStateChanged')] = K3(true)
0003  GETTABUP  R2 = _ENV[K4('AlbumActivityBaseWindow')]
0004  CALL      R0 = call(R0, 1 args, 2 rets)
0005  SETTABUP  _ENV[K0('AlbumJokerExchangeConfirmWindow')] = R0
0006  GETTABUP  R0 = _ENV[K0('AlbumJokerExchangeConfirmWindow')]
0007  GETTABUP  R1 = _ENV[K0('AlbumJokerExchangeConfirmWindow')]
0008  SETTABLE  R0[K5('__index')] = R1
0009  GETTABUP  R0 = _ENV[K0('AlbumJokerExchangeConfirmWindow')]
0010  CLOSURE   R1 = closure proto0
0011  SETTABLE  R0[K6('Init')] = R1
0012  GETTABUP  R0 = _ENV[K0('AlbumJokerExchangeConfirmWindow')]
0013  CLOSURE   R1 = closure proto1
0014  SETTABLE  R0[K7('OnCloseFinish')] = R1
0015  GETTABUP  R0 = _ENV[K0('AlbumJokerExchangeConfirmWindow')]
0016  CLOSURE   R1 = closure proto2
0017  SETTABLE  R0[K8('OnConfirmClicked')] = R1
0018  GETTABUP  R0 = _ENV[K0('AlbumJokerExchangeConfirmWindow')]
0019  CLOSURE   R1 = closure proto3
0020  SETTABLE  R0[K9('OnCloseBtnClick')] = R1
0021  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 15-34 np=4 va=0 ms=16 code=52 consts=20 upvals=1 protos=0
  ;   K[0]='AlbumActivityBaseWindow'
  ;   K[1]='Init'
  ;   K[2]='m_cardId'
  ;   K[3]='m_bShowOnlyNone'
  ;   K[4]='_GetModelByCardId'
  ;   K[5]='m_bHasCard'
  ;   K[6]='GetCardCount'
  ;   K[7]=0
  ;   K[8]='joker_card_choose_confirm_desc2'
  ;   K[9]='joker_card_choose_confirm_desc'
  ;   K[10]='m_descText'
  ;   K[11]='text'
  ;   K[12]='GM'
  ;   K[13]='GameTextModel'
  ;   K[14]='GetText'
  ;   K[15]='GetCardInfo'
  ;   K[16]='GetSetCollectProgress'
  ;   K[17]='setId'
  ;   K[18]=1
  ;   K[19]='m_exchangeCardLuaTable'
  ;   upvals: _ENV
  ;   locals: self(0-52), activityType(0-52), cardId(0-52), bShowOnlyNone(0-52), targetModel(11-52), descKey(26-52), cardInfo(36-52), cur(39-52), max(39-52), bOnlyOne(44-52)
  0000  GETTABUP  R4 = _ENV[K0('AlbumActivityBaseWindow')]
  0001  GETTABLE  R4 = R4[K1('Init')]
  0002  MOVE      R5 = R0
  0003  MOVE      R6 = R0
  0004  LOADBOOL  R7 = true
  0005  CALL      R4 = call(R4, 0 args, 3 rets)
  0006  SETTABLE  R0[K2('m_cardId')] = R2
  0007  SETTABLE  R0[K3('m_bShowOnlyNone')] = R3
  0008  SELF      R5 = R0[K4('_GetModelByCardId')] (self)
  0009  MOVE      R6 = R0
  0010  CALL      R4 = call(R4, 1 args, 2 rets)
  0011  SELF      R6 = R4[K6('GetCardCount')] (self)
  0012  MOVE      R7 = R0
  0013  CALL      R5 = call(R5, 1 args, 2 rets)
  0014  LT        if R1 lt R5   -> 3605
  0015  JMP       (jump)   -> 17
  0016  LOADBOOL  R5 = false
  0017  LOADBOOL  R5 = true
  0018  SETTABLE  R0[K5('m_bHasCard')] = R5
  0019  GETTABLE  R5 = R0[K5('m_bHasCard')]
  0020  TEST      if not R5 then   -> -131050
  0021  JMP       (jump)   -> 25
  0022  LOADK     R5 = K8 'joker_card_choose_confirm_desc2'
  0023  TEST      if not R5 then   -> -131046
  0024  JMP       (jump)   -> 26
  0025  LOADK     R5 = K9 'joker_card_choose_confirm_desc'
  0026  GETTABLE  R6 = R0[K10('m_descText')]
  0027  GETTABUP  R7 = _ENV[K12('GM')]
  0028  GETTABLE  R7 = R7[K13('GameTextModel')]
  0029  SELF      R8 = R7[K14('GetText')] (self)
  0030  MOVE      R9 = R0
  0031  CALL      R7 = call(R7, 1 args, 2 rets)
  0032  SETTABLE  R6[K11('text')] = R7
  0033  SELF      R7 = R4[K15('GetCardInfo')] (self)
  0034  MOVE      R8 = R0
  0035  CALL      R6 = call(R6, 1 args, 2 rets)
  0036  SELF      R8 = R4[K16('GetSetCollectProgress')] (self)
  0037  GETTABLE  R9 = R6[K17('setId')]
  0038  CALL      R7 = call(R7, 2 args, 2 rets)
  0039  SUB       R9 = R7 sub R8
  0040  EQ        if R1 eq K18(1)   -> -126148
  0041  JMP       (jump)   -> 43
  0042  LOADBOOL  R9 = false
  0043  LOADBOOL  R9 = true
  0044  GETTABLE  R10 = R0[K19('m_exchangeCardLuaTable')]
  0045  SELF      R11 = R10[K1('Init')] (self)
  0046  MOVE      R12 = R0
  0047  MOVE      R13 = R0
  0048  LOADBOOL  R14 = false
  0049  MOVE      R15 = R0
  0050  CALL      R10 = call(R10, 0 args, 5 rets)
  0051  RETURN    return R0..R-1
; ---------- proto1 [OnCloseFinish] ----------
  ; fn ?  line 36-46 np=1 va=0 ms=9 code=43 consts=14 upvals=1 protos=0
  ;   K[0]='BaseWindow'
  ;   K[1]='OnCloseFinish'
  ;   K[2]='m_openPrefabName'
  ;   K[3]='UIPrefabConfigName'
  ;   K[4]='AlbumJokerExchangeCompleteWindow'
  ;   K[5]='_GetModelByCardId'
  ;   K[6]='m_cardId'
  ;   K[7]='LimitAlbumJokerExchangeCompleteWindow'
  ;   K[8]='GM'
  ;   K[9]='UIManager'
  ;   K[10]='OpenView'
  ;   K[11]='m_activityType'
  ;   K[12]='AlbumJokerExchangeWindow'
  ;   K[13]='m_bShowOnlyNone'
  ;   upvals: _ENV
  ;   locals: self(0-43), _(12-27), bLimit(12-27), prefab(20-27)
  0000  GETTABUP  R1 = _ENV[K0('BaseWindow')]
  0001  GETTABLE  R1 = R1[K1('OnCloseFinish')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABLE  R1 = R0[K2('m_openPrefabName')]
  0005  GETTABUP  R2 = _ENV[K3('UIPrefabConfigName')]
  0006  GETTABLE  R2 = R2[K4('AlbumJokerExchangeCompleteWindow')]
  0007  EQ        if R0 eq R2   -> -130549
  0008  JMP       (jump)   -> 28
  0009  SELF      R2 = R0[K5('_GetModelByCardId')] (self)
  0010  GETTABLE  R3 = R0[K6('m_cardId')]
  0011  CALL      R1 = call(R1, 2 args, 2 rets)
  0012  TEST      if not R2 then   -> -131058
  0013  JMP       (jump)   -> 18
  0014  GETTABUP  R3 = _ENV[K3('UIPrefabConfigName')]
  0015  GETTABLE  R3 = R3[K7('LimitAlbumJokerExchangeCompleteWindow')]
  0016  TEST      if not R3 then   -> -131053
  0017  JMP       (jump)   -> 20
  0018  GETTABUP  R3 = _ENV[K3('UIPrefabConfigName')]
  0019  GETTABLE  R3 = R3[K4('AlbumJokerExchangeCompleteWindow')]
  0020  GETTABUP  R4 = _ENV[K8('GM')]
  0021  GETTABLE  R4 = R4[K9('UIManager')]
  0022  SELF      R5 = R4[K10('OpenView')] (self)
  0023  MOVE      R6 = R0
  0024  GETTABLE  R7 = R0[K11('m_activityType')]
  0025  GETTABLE  R8 = R0[K6('m_cardId')]
  0026  CALL      R4 = call(R4, 0 args, 4 rets)
  0027  JMP       (jump)   -> 42
  0028  GETTABLE  R1 = R0[K2('m_openPrefabName')]
  0029  GETTABUP  R2 = _ENV[K3('UIPrefabConfigName')]
  0030  GETTABLE  R2 = R2[K12('AlbumJokerExchangeWindow')]
  0031  EQ        if R0 eq R2   -> -130525
  0032  JMP       (jump)   -> 42
  0033  GETTABUP  R1 = _ENV[K8('GM')]
  0034  GETTABLE  R1 = R1[K9('UIManager')]
  0035  SELF      R2 = R1[K10('OpenView')] (self)
  0036  GETTABUP  R3 = _ENV[K3('UIPrefabConfigName')]
  0037  GETTABLE  R3 = R3[K12('AlbumJokerExchangeWindow')]
  0038  GETTABLE  R4 = R0[K11('m_activityType')]
  0039  LOADBOOL  R5 = false
  0040  GETTABLE  R6 = R0[K13('m_bShowOnlyNone')]
  0041  CALL      R1 = call(R1, 0 args, 5 rets)
  0042  RETURN    return R0..R-1
; ---------- proto2 [OnConfirmClicked] ----------
  ; fn ?  line 49-54 np=1 va=0 ms=4 code=14 consts=9 upvals=1 protos=0
  ;   K[0]='m_isGoldenJoker'
  ;   K[1]='m_model'
  ;   K[2]='IsGoldenJokerCardInUse'
  ;   K[3]='JokerExchange'
  ;   K[4]='m_cardId'
  ;   K[5]='Close'
  ;   K[6]='m_openPrefabName'
  ;   K[7]='UIPrefabConfigName'
  ;   K[8]='AlbumJokerExchangeCompleteWindow'
  ;   upvals: _ENV
  ;   locals: self(0-14), bSuc(8-14)
  0000  GETTABLE  R1 = R0[K1('m_model')]
  0001  SELF      R2 = R1[K2('IsGoldenJokerCardInUse')] (self)
  0002  CALL      R1 = call(R1, 1 args, 1 rets)
  0003  SETTABLE  R0[K0('m_isGoldenJoker')] = R1
  0004  GETTABLE  R1 = R0[K1('m_model')]
  0005  SELF      R2 = R1[K3('JokerExchange')] (self)
  0006  GETTABLE  R3 = R0[K4('m_cardId')]
  0007  CALL      R1 = call(R1, 1 args, 2 rets)
  0008  SELF      R3 = R0[K5('Close')] (self)
  0009  CALL      R2 = call(R2, 0 args, 1 rets)
  0010  GETTABUP  R2 = _ENV[K7('UIPrefabConfigName')]
  0011  GETTABLE  R2 = R2[K8('AlbumJokerExchangeCompleteWindow')]
  0012  SETTABLE  R0[K6('m_openPrefabName')] = R2
  0013  RETURN    return R0..R-1
; ---------- proto3 [OnCloseBtnClick] ----------
  ; fn ?  line 56-59 np=1 va=0 ms=3 code=6 consts=4 upvals=1 protos=0
  ;   K[0]='Close'
  ;   K[1]='m_openPrefabName'
  ;   K[2]='UIPrefabConfigName'
  ;   K[3]='AlbumJokerExchangeWindow'
  ;   upvals: _ENV
  ;   locals: self(0-6)
  0000  SELF      R2 = R0[K0('Close')] (self)
  0001  CALL      R1 = call(R1, 0 args, 1 rets)
  0002  GETTABUP  R1 = _ENV[K2('UIPrefabConfigName')]
  0003  GETTABLE  R1 = R1[K3('AlbumJokerExchangeWindow')]
  0004  SETTABLE  R0[K1('m_openPrefabName')] = R1
  0005  RETURN    return R0..R-1
