# UI_Button_ShopButton_302.luac
; fn @ShopButton.lua  line 0-0 np=0 va=1 ms=3 code=27 consts=12 upvals=1 protos=6
;   K[0]='ShopButton'
;   K[1]='setmetatable'
;   K[2]='HudGeneralButton'
;   K[3]='__index'
;   K[4]='Awake'
;   K[5]='OnBtnClicked'
;   K[6]='OnOpenView'
;   K[7]='ShopButton'
;   K[8]='_CheckOpen'
;   K[9]='_OnShopRefreshed'
;   K[10]='ShopButton'
;   K[11]='UpdateContent'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K2('HudGeneralButton')]
0003  CALL      R0 = call(R0, 1 args, 2 rets)
0004  SETTABUP  _ENV[K0('ShopButton')] = R0
0005  GETTABUP  R0 = _ENV[K0('ShopButton')]
0006  GETTABUP  R1 = _ENV[K0('ShopButton')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  GETTABUP  R0 = _ENV[K0('ShopButton')]
0009  CLOSURE   R1 = closure proto0
0010  SETTABLE  R0[K4('Awake')] = R1
0011  GETTABUP  R0 = _ENV[K0('ShopButton')]
0012  CLOSURE   R1 = closure proto1
0013  SETTABLE  R0[K5('OnBtnClicked')] = R1
0014  GETTABUP  R0 = _ENV[K0('ShopButton')]
0015  CLOSURE   R1 = closure proto2
0016  SETTABLE  R0[K6('OnOpenView')] = R1
0017  GETTABUP  R0 = _ENV[K7('ShopButton')]
0018  CLOSURE   R1 = closure proto3
0019  SETTABLE  R0[K8('_CheckOpen')] = R1
0020  GETTABUP  R0 = _ENV[K7('ShopButton')]
0021  CLOSURE   R1 = closure proto4
0022  SETTABLE  R0[K9('_OnShopRefreshed')] = R1
0023  GETTABUP  R0 = _ENV[K10('ShopButton')]
0024  CLOSURE   R1 = closure proto5
0025  SETTABLE  R0[K11('UpdateContent')] = R1
0026  RETURN    return R0..R-1
; ---------- proto0 [Awake] ----------
  ; fn ?  line 4-14 np=1 va=0 ms=5 code=44 consts=14 upvals=1 protos=0
  ;   K[0]='HudGeneralButton'
  ;   K[1]='Awake'
  ;   K[2]='EventDispatcher'
  ;   K[3]='AddListener'
  ;   K[4]='EEventType'
  ;   K[5]='OpenView'
  ;   K[6]='OnOpenView'
  ;   K[7]='MainTaskFinished'
  ;   K[8]='UpdateContent'
  ;   K[9]='NewChapterUnlocked'
  ;   K[10]='FunctionOpen'
  ;   K[11]='_CheckOpen'
  ;   K[12]='ShopRefreshed'
  ;   K[13]='_OnShopRefreshed'
  ;   upvals: _ENV
  ;   locals: self(0-44)
  0000  GETTABUP  R1 = _ENV[K0('HudGeneralButton')]
  0001  GETTABLE  R1 = R1[K1('Awake')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0005  GETTABLE  R1 = R1[K3('AddListener')]
  0006  GETTABUP  R2 = _ENV[K4('EEventType')]
  0007  GETTABLE  R2 = R2[K5('OpenView')]
  0008  MOVE      R3 = R0
  0009  GETTABLE  R4 = R0[K6('OnOpenView')]
  0010  CALL      R1 = call(R1, 0 args, 3 rets)
  0011  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0012  GETTABLE  R1 = R1[K3('AddListener')]
  0013  GETTABUP  R2 = _ENV[K4('EEventType')]
  0014  GETTABLE  R2 = R2[K7('MainTaskFinished')]
  0015  MOVE      R3 = R0
  0016  GETTABLE  R4 = R0[K8('UpdateContent')]
  0017  CALL      R1 = call(R1, 0 args, 3 rets)
  0018  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0019  GETTABLE  R1 = R1[K3('AddListener')]
  0020  GETTABUP  R2 = _ENV[K4('EEventType')]
  0021  GETTABLE  R2 = R2[K9('NewChapterUnlocked')]
  0022  MOVE      R3 = R0
  0023  GETTABLE  R4 = R0[K8('UpdateContent')]
  0024  CALL      R1 = call(R1, 0 args, 3 rets)
  0025  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0026  GETTABLE  R1 = R1[K3('AddListener')]
  0027  GETTABUP  R2 = _ENV[K4('EEventType')]
  0028  GETTABLE  R2 = R2[K10('FunctionOpen')]
  0029  MOVE      R3 = R0
  0030  GETTABLE  R4 = R0[K11('_CheckOpen')]
  0031  CALL      R1 = call(R1, 0 args, 3 rets)
  0032  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0033  GETTABLE  R1 = R1[K3('AddListener')]
  0034  GETTABUP  R2 = _ENV[K4('EEventType')]
  0035  GETTABLE  R2 = R2[K12('ShopRefreshed')]
  0036  MOVE      R3 = R0
  0037  GETTABLE  R4 = R0[K13('_OnShopRefreshed')]
  0038  CALL      R1 = call(R1, 0 args, 3 rets)
  0039  SELF      R2 = R0[K11('_CheckOpen')] (self)
  0040  CALL      R1 = call(R1, 0 args, 1 rets)
  0041  SELF      R2 = R0[K8('UpdateContent')] (self)
  0042  CALL      R1 = call(R1, 0 args, 1 rets)
  0043  RETURN    return R0..R-1
; ---------- proto1 [OnBtnClicked] ----------
  ; fn ?  line 16-18 np=1 va=0 ms=6 code=9 consts=5 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='UIManager'
  ;   K[2]='OpenView'
  ;   K[3]='UIPrefabConfigName'
  ;   K[4]='ShopWindow'
  ;   upvals: _ENV
  ;   locals: self(0-9)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('UIManager')]
  0002  SELF      R2 = R1[K2('OpenView')] (self)
  0003  GETTABUP  R3 = _ENV[K3('UIPrefabConfigName')]
  0004  GETTABLE  R3 = R3[K4('ShopWindow')]
  0005  LOADNIL   R4..R4 = nil
  0006  LOADBOOL  R5 = false
  0007  CALL      R1 = call(R1, 0 args, 4 rets)
  0008  RETURN    return R0..R-1
; ---------- proto2 [OnOpenView] ----------
  ; fn ?  line 20-25 np=2 va=0 ms=4 code=14 consts=9 upvals=1 protos=0
  ;   K[0]='name'
  ;   K[1]='UIPrefabConfigName'
  ;   K[2]='ShopWindow'
  ;   K[3]='gameObject'
  ;   K[4]='activeSelf'
  ;   K[5]='ShopButton'
  ;   K[6]='ShopWindowOpened'
  ;   K[7]=true
  ;   K[8]='UpdateContent'
  ;   upvals: _ENV
  ;   locals: self(0-14), msg(0-14)
  0000  GETTABLE  R2 = R1[K0('name')]
  0001  GETTABUP  R3 = _ENV[K1('UIPrefabConfigName')]
  0002  GETTABLE  R3 = R3[K2('ShopWindow')]
  0003  EQ        if R0 eq R3   -> -130040
  0004  JMP       (jump)   -> 13
  0005  GETTABLE  R2 = R0[K3('gameObject')]
  0006  GETTABLE  R2 = R2[K4('activeSelf')]
  0007  TEST      if not R2 then   -> -131063
  0008  JMP       (jump)   -> 13
  0009  GETTABUP  R2 = _ENV[K5('ShopButton')]
  0010  SETTABLE  R2[K6('ShopWindowOpened')] = K7(true)
  0011  SELF      R3 = R0[K8('UpdateContent')] (self)
  0012  CALL      R2 = call(R2, 0 args, 1 rets)
  0013  RETURN    return R0..R-1
; ---------- proto3 [_CheckOpen] ----------
  ; fn ?  line 27-33 np=1 va=0 ms=5 code=17 consts=9 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='OpenFunctionModel'
  ;   K[2]='IsFunctionOpen'
  ;   K[3]='EFunction'
  ;   K[4]='Shop'
  ;   K[5]='gameObject'
  ;   K[6]='activeSelf'
  ;   K[7]='SetActive'
  ;   K[8]='UpdateContent'
  ;   upvals: _ENV
  ;   locals: self(0-17), open(6-17)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('OpenFunctionModel')]
  0002  SELF      R2 = R1[K2('IsFunctionOpen')] (self)
  0003  GETTABUP  R3 = _ENV[K3('EFunction')]
  0004  GETTABLE  R3 = R3[K4('Shop')]
  0005  CALL      R1 = call(R1, 1 args, 2 rets)
  0006  GETTABLE  R2 = R0[K5('gameObject')]
  0007  GETTABLE  R2 = R2[K6('activeSelf')]
  0008  EQ        if R1 eq R1   -> -130037
  0009  JMP       (jump)   -> 16
  0010  GETTABLE  R2 = R0[K5('gameObject')]
  0011  SELF      R3 = R2[K7('SetActive')] (self)
  0012  MOVE      R4 = R0
  0013  CALL      R2 = call(R2, 0 args, 2 rets)
  0014  SELF      R3 = R0[K8('UpdateContent')] (self)
  0015  CALL      R2 = call(R2, 0 args, 1 rets)
  0016  RETURN    return R0..R-1
; ---------- proto4 [_OnShopRefreshed] ----------
  ; fn ?  line 35-43 np=2 va=0 ms=5 code=20 consts=12 upvals=1 protos=0
  ;   K[0]='shopType'
  ;   K[1]='EShopType'
  ;   K[2]='DailyDeals'
  ;   K[3]='GM'
  ;   K[4]='UIManager'
  ;   K[5]='IsViewExisting'
  ;   K[6]='UIPrefabConfigName'
  ;   K[7]='ShopWindow'
  ;   K[8]='ShopButton'
  ;   K[9]='ShopWindowOpened'
  ;   K[10]=false
  ;   K[11]='UpdateContent'
  ;   upvals: _ENV
  ;   locals: self(0-20), msg(0-20)
  0000  TEST      if not R1 then   -> -131070
  0001  JMP       (jump)   -> 19
  0002  GETTABLE  R2 = R1[K0('shopType')]
  0003  GETTABUP  R3 = _ENV[K1('EShopType')]
  0004  GETTABLE  R3 = R3[K2('DailyDeals')]
  0005  EQ        if R0 eq R3   -> -130038
  0006  JMP       (jump)   -> 19
  0007  GETTABUP  R2 = _ENV[K3('GM')]
  0008  GETTABLE  R2 = R2[K4('UIManager')]
  0009  SELF      R3 = R2[K5('IsViewExisting')] (self)
  0010  GETTABUP  R4 = _ENV[K6('UIPrefabConfigName')]
  0011  GETTABLE  R4 = R4[K7('ShopWindow')]
  0012  CALL      R2 = call(R2, 1 args, 2 rets)
  0013  TEST      if not R2 then   -> -131056
  0014  JMP       (jump)   -> 17
  0015  GETTABUP  R2 = _ENV[K8('ShopButton')]
  0016  SETTABLE  R2[K9('ShopWindowOpened')] = K10(false)
  0017  SELF      R3 = R0[K11('UpdateContent')] (self)
  0018  CALL      R2 = call(R2, 0 args, 1 rets)
  0019  RETURN    return R0..R-1
; ---------- proto5 [UpdateContent] ----------
  ; fn ?  line 45-56 np=1 va=0 ms=5 code=21 consts=8 upvals=1 protos=0
  ;   K[0]='ShopButton'
  ;   K[1]='ShopWindowOpened'
  ;   K[2]='GM'
  ;   K[3]='ShopModel'
  ;   K[4]='HasFreeDailyDeals'
  ;   K[5]='m_exclamationGo'
  ;   K[6]='activeSelf'
  ;   K[7]='SetActive'
  ;   upvals: _ENV
  ;   locals: self(0-21), needExclamation(1-21)
  0000  LOADBOOL  R1 = false
  0001  GETTABUP  R2 = _ENV[K0('ShopButton')]
  0002  GETTABLE  R2 = R2[K1('ShopWindowOpened')]
  0003  TEST      if not R2 then   -> -131066
  0004  JMP       (jump)   -> 12
  0005  GETTABUP  R2 = _ENV[K2('GM')]
  0006  GETTABLE  R2 = R2[K3('ShopModel')]
  0007  SELF      R3 = R2[K4('HasFreeDailyDeals')] (self)
  0008  CALL      R2 = call(R2, 1 args, 1 rets)
  0009  TEST      if not R2 then   -> -131061
  0010  JMP       (jump)   -> 12
  0011  LOADBOOL  R1 = true
  0012  GETTABLE  R2 = R0[K5('m_exclamationGo')]
  0013  GETTABLE  R2 = R2[K6('activeSelf')]
  0014  EQ        if R1 eq R2   -> -130542
  0015  JMP       (jump)   -> 20
  0016  GETTABLE  R2 = R0[K5('m_exclamationGo')]
  0017  SELF      R3 = R2[K7('SetActive')] (self)
  0018  MOVE      R4 = R0
  0019  CALL      R2 = call(R2, 0 args, 2 rets)
  0020  RETURN    return R0..R-1
