# UI_Button_DiscoveriesButton_317.luac
; fn @DiscoveriesButton.lua  line 0-0 np=0 va=1 ms=3 code=27 consts=11 upvals=1 protos=6
;   K[0]='DiscoveriesButton'
;   K[1]='setmetatable'
;   K[2]='HudGeneralButton'
;   K[3]='__index'
;   K[4]='Awake'
;   K[5]='DiscoveriesButton'
;   K[6]='_NeedDisplay'
;   K[7]='_OnDisplay'
;   K[8]='_CheckOpen'
;   K[9]='_UpdateRedPoint'
;   K[10]='OnClicked'
;   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('DiscoveriesButton')] = R0
0005  GETTABUP  R0 = _ENV[K0('DiscoveriesButton')]
0006  GETTABUP  R1 = _ENV[K0('DiscoveriesButton')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  GETTABUP  R0 = _ENV[K0('DiscoveriesButton')]
0009  CLOSURE   R1 = closure proto0
0010  SETTABLE  R0[K4('Awake')] = R1
0011  GETTABUP  R0 = _ENV[K5('DiscoveriesButton')]
0012  CLOSURE   R1 = closure proto1
0013  SETTABLE  R0[K6('_NeedDisplay')] = R1
0014  GETTABUP  R0 = _ENV[K5('DiscoveriesButton')]
0015  CLOSURE   R1 = closure proto2
0016  SETTABLE  R0[K7('_OnDisplay')] = R1
0017  GETTABUP  R0 = _ENV[K5('DiscoveriesButton')]
0018  CLOSURE   R1 = closure proto3
0019  SETTABLE  R0[K8('_CheckOpen')] = R1
0020  GETTABUP  R0 = _ENV[K5('DiscoveriesButton')]
0021  CLOSURE   R1 = closure proto4
0022  SETTABLE  R0[K9('_UpdateRedPoint')] = R1
0023  GETTABUP  R0 = _ENV[K5('DiscoveriesButton')]
0024  CLOSURE   R1 = closure proto5
0025  SETTABLE  R0[K10('OnClicked')] = R1
0026  RETURN    return R0..R-1
; ---------- proto0 [Awake] ----------
  ; fn ?  line 6-17 np=1 va=0 ms=7 code=38 consts=15 upvals=1 protos=0
  ;   K[0]='HudGeneralButton'
  ;   K[1]='Awake'
  ;   K[2]='EventDispatcher'
  ;   K[3]='AddListener'
  ;   K[4]='EEventType'
  ;   K[5]='FunctionOpen'
  ;   K[6]='_CheckOpen'
  ;   K[7]='DiscoveriesUpdate'
  ;   K[8]='_UpdateRedPoint'
  ;   K[9]='ChapterChangeFinished'
  ;   K[10]='OnGameModeChanged'
  ;   K[11]='EUILoaderConfigName'
  ;   K[12]='DiscoveriesButton'
  ;   K[13]='m_activityEntryLoader'
  ;   K[14]='Init'
  ;   upvals: _ENV
  ;   locals: self(0-38), getEntryConfigName(31-38)
  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('FunctionOpen')]
  0008  MOVE      R3 = R0
  0009  GETTABLE  R4 = R0[K6('_CheckOpen')]
  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('DiscoveriesUpdate')]
  0015  MOVE      R3 = R0
  0016  GETTABLE  R4 = R0[K8('_UpdateRedPoint')]
  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('ChapterChangeFinished')]
  0022  MOVE      R3 = R0
  0023  GETTABLE  R4 = R0[K10('OnGameModeChanged')]
  0024  CALL      R1 = call(R1, 0 args, 3 rets)
  0025  SELF      R2 = R0[K6('_CheckOpen')] (self)
  0026  CALL      R1 = call(R1, 0 args, 1 rets)
  0027  SELF      R2 = R0[K8('_UpdateRedPoint')] (self)
  0028  CALL      R1 = call(R1, 0 args, 1 rets)
  0029  GETTABUP  R1 = _ENV[K11('EUILoaderConfigName')]
  0030  GETTABLE  R1 = R1[K12('DiscoveriesButton')]
  0031  GETTABLE  R2 = R0[K13('m_activityEntryLoader')]
  0032  SELF      R3 = R2[K14('Init')] (self)
  0033  MOVE      R4 = R0
  0034  LOADNIL   R5..R5 = nil
  0035  MOVE      R6 = R0
  0036  CALL      R2 = call(R2, 0 args, 4 rets)
  0037  RETURN    return R0..R-1
; ---------- proto1 [_NeedDisplay] ----------
  ; fn ?  line 19-26 np=1 va=0 ms=4 code=23 consts=7 upvals=1 protos=0
  ;   K[0]='HudGeneralButton'
  ;   K[1]='_NeedDisplay'
  ;   K[2]='GM'
  ;   K[3]='ChapterManager'
  ;   K[4]='curActiveChapterName'
  ;   K[5]='TaskManager'
  ;   K[6]='GetOngoingChapterName'
  ;   upvals: _ENV
  ;   locals: self(0-23), curActiveChapterName(11-23)
  0000  GETTABUP  R1 = _ENV[K0('HudGeneralButton')]
  0001  GETTABLE  R1 = R1[K1('_NeedDisplay')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131065
  0005  JMP       (jump)   -> 8
  0006  LOADBOOL  R1 = false
  0007  RETURN    return R1..R0
  0008  GETTABUP  R1 = _ENV[K2('GM')]
  0009  GETTABLE  R1 = R1[K3('ChapterManager')]
  0010  GETTABLE  R1 = R1[K4('curActiveChapterName')]
  0011  TESTSET   if R0 then R2   -> -130547
  0012  JMP       (jump)   -> 21
  0013  GETTABUP  R2 = _ENV[K2('GM')]
  0014  GETTABLE  R2 = R2[K5('TaskManager')]
  0015  SELF      R3 = R2[K6('GetOngoingChapterName')] (self)
  0016  CALL      R2 = call(R2, 1 args, 1 rets)
  0017  EQ        if R1 eq R2   -> -130539
  0018  JMP       (jump)   -> 20
  0019  LOADBOOL  R2 = false
  0020  LOADBOOL  R2 = true
  0021  RETURN    return R2..R1
  0022  RETURN    return R0..R-1
; ---------- proto2 [_OnDisplay] ----------
  ; fn ?  line 28-31 np=1 va=0 ms=3 code=7 consts=3 upvals=1 protos=0
  ;   K[0]='HudGeneralButton'
  ;   K[1]='_OnDisplay'
  ;   K[2]='_UpdateRedPoint'
  ;   upvals: _ENV
  ;   locals: self(0-7)
  0000  GETTABUP  R1 = _ENV[K0('HudGeneralButton')]
  0001  GETTABLE  R1 = R1[K1('_OnDisplay')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  SELF      R2 = R0[K2('_UpdateRedPoint')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  RETURN    return R0..R-1
; ---------- proto3 [_CheckOpen] ----------
  ; fn ?  line 33-39 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]='Discoveries'
  ;   K[5]='gameObject'
  ;   K[6]='activeSelf'
  ;   K[7]='SetActive'
  ;   K[8]='_UpdateRedPoint'
  ;   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('Discoveries')]
  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('_UpdateRedPoint')] (self)
  0015  CALL      R2 = call(R2, 0 args, 1 rets)
  0016  RETURN    return R0..R-1
; ---------- proto4 [_UpdateRedPoint] ----------
  ; fn ?  line 41-51 np=1 va=0 ms=6 code=35 consts=15 upvals=1 protos=0
  ;   K[0]='m_bDisplay'
  ;   K[1]='gameObject'
  ;   K[2]='activeSelf'
  ;   K[3]='GM'
  ;   K[4]='ItemDataModel'
  ;   K[5]='GetDiscoveriesCanRewardCount'
  ;   K[6]='m_tipGo'
  ;   K[7]='SetActive'
  ;   K[8]=0
  ;   K[9]='m_numText'
  ;   K[10]='text'
  ;   K[11]='UIUtil'
  ;   K[12]='m_exclamationGo'
  ;   K[13]='ConfigModel'
  ;   K[14]='CanShowBookByRoomTip'
  ;   upvals: _ENV
  ;   locals: self(0-35), count(12-35)
  0000  GETTABLE  R1 = R0[K0('m_bDisplay')]
  0001  TEST      if not R1 then   -> -131069
  0002  JMP       (jump)   -> 7
  0003  GETTABLE  R1 = R0[K1('gameObject')]
  0004  GETTABLE  R1 = R1[K2('activeSelf')]
  0005  TEST      if not R1 then   -> -131064
  0006  JMP       (jump)   -> 8
  0007  RETURN    return R0..R-1
  0008  GETTABUP  R1 = _ENV[K3('GM')]
  0009  GETTABLE  R1 = R1[K4('ItemDataModel')]
  0010  SELF      R2 = R1[K5('GetDiscoveriesCanRewardCount')] (self)
  0011  CALL      R1 = call(R1, 1 args, 1 rets)
  0012  GETTABLE  R2 = R0[K6('m_tipGo')]
  0013  SELF      R3 = R2[K7('SetActive')] (self)
  0014  LT        if R1 lt R1   -> 4113
  0015  JMP       (jump)   -> 17
  0016  LOADBOOL  R4 = false
  0017  LOADBOOL  R4 = true
  0018  CALL      R2 = call(R2, 0 args, 2 rets)
  0019  GETTABLE  R2 = R0[K9('m_numText')]
  0020  SETTABLE  R2[K10('text')] = R1
  0021  GETTABUP  R2 = _ENV[K11('UIUtil')]
  0022  GETTABLE  R2 = R2[K7('SetActive')]
  0023  GETTABLE  R3 = R0[K12('m_exclamationGo')]
  0024  LE        if R0 le K8(0)   -> -130270
  0025  JMP       (jump)   -> 31
  0026  GETTABUP  R4 = _ENV[K3('GM')]
  0027  GETTABLE  R4 = R4[K13('ConfigModel')]
  0028  SELF      R5 = R4[K14('CanShowBookByRoomTip')] (self)
  0029  CALL      R4 = call(R4, 1 args, 1 rets)
  0030  JMP       (jump)   -> 33
  0031  LOADBOOL  R4 = false
  0032  LOADBOOL  R4 = true
  0033  CALL      R2 = call(R2, 0 args, 2 rets)
  0034  RETURN    return R0..R-1
; ---------- proto5 [OnClicked] ----------
  ; fn ?  line 53-55 np=1 va=0 ms=4 code=7 consts=5 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='UIManager'
  ;   K[2]='OpenView'
  ;   K[3]='UIPrefabConfigName'
  ;   K[4]='DiscoveriesWindow'
  ;   upvals: _ENV
  ;   locals: self(0-7)
  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('DiscoveriesWindow')]
  0005  CALL      R1 = call(R1, 0 args, 2 rets)
  0006  RETURN    return R0..R-1
