# UI_Button_TaskButton_322.luac
; fn @TaskButton.lua  line 0-0 np=0 va=1 ms=3 code=36 consts=14 upvals=1 protos=9
;   K[0]='TaskButton'
;   K[1]='setmetatable'
;   K[2]='HudGeneralButton'
;   K[3]='__index'
;   K[4]='Awake'
;   K[5]='_NeedDisplay'
;   K[6]='_OnMainTaskFinished'
;   K[7]='OnCloseView'
;   K[8]='OnClicked'
;   K[9]='TaskButton'
;   K[10]='UpdateContent'
;   K[11]='UpdateExclaimation'
;   K[12]='IconScaleAnimation'
;   K[13]='GetBoxPosAndScale'
;   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('TaskButton')] = R0
0005  GETTABUP  R0 = _ENV[K0('TaskButton')]
0006  GETTABUP  R1 = _ENV[K0('TaskButton')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  GETTABUP  R0 = _ENV[K0('TaskButton')]
0009  CLOSURE   R1 = closure proto0
0010  SETTABLE  R0[K4('Awake')] = R1
0011  GETTABUP  R0 = _ENV[K0('TaskButton')]
0012  CLOSURE   R1 = closure proto1
0013  SETTABLE  R0[K5('_NeedDisplay')] = R1
0014  GETTABUP  R0 = _ENV[K0('TaskButton')]
0015  CLOSURE   R1 = closure proto2
0016  SETTABLE  R0[K6('_OnMainTaskFinished')] = R1
0017  GETTABUP  R0 = _ENV[K0('TaskButton')]
0018  CLOSURE   R1 = closure proto3
0019  SETTABLE  R0[K7('OnCloseView')] = R1
0020  GETTABUP  R0 = _ENV[K0('TaskButton')]
0021  CLOSURE   R1 = closure proto4
0022  SETTABLE  R0[K8('OnClicked')] = R1
0023  GETTABUP  R0 = _ENV[K9('TaskButton')]
0024  CLOSURE   R1 = closure proto5
0025  SETTABLE  R0[K10('UpdateContent')] = R1
0026  GETTABUP  R0 = _ENV[K9('TaskButton')]
0027  CLOSURE   R1 = closure proto6
0028  SETTABLE  R0[K11('UpdateExclaimation')] = R1
0029  GETTABUP  R0 = _ENV[K9('TaskButton')]
0030  CLOSURE   R1 = closure proto7
0031  SETTABLE  R0[K12('IconScaleAnimation')] = R1
0032  GETTABUP  R0 = _ENV[K9('TaskButton')]
0033  CLOSURE   R1 = closure proto8
0034  SETTABLE  R0[K13('GetBoxPosAndScale')] = R1
0035  RETURN    return R0..R-1
; ---------- proto0 [Awake] ----------
  ; fn ?  line 4-14 np=1 va=0 ms=5 code=49 consts=16 upvals=1 protos=0
  ;   K[0]='HudGeneralButton'
  ;   K[1]='Awake'
  ;   K[2]='UpdateContent'
  ;   K[3]='EventDispatcher'
  ;   K[4]='AddListener'
  ;   K[5]='EEventType'
  ;   K[6]='ChapterChangeFinished'
  ;   K[7]='OnGameModeChanged'
  ;   K[8]='MainTaskFinished'
  ;   K[9]='_OnMainTaskFinished'
  ;   K[10]='CloseView'
  ;   K[11]='OnCloseView'
  ;   K[12]='PropertyConsumed'
  ;   K[13]='UpdateExclaimation'
  ;   K[14]='PropertyAcquired'
  ;   K[15]='NewTasksUnlocked'
  ;   upvals: _ENV
  ;   locals: self(0-49)
  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  SELF      R2 = R0[K2('UpdateContent')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  GETTABUP  R1 = _ENV[K3('EventDispatcher')]
  0007  GETTABLE  R1 = R1[K4('AddListener')]
  0008  GETTABUP  R2 = _ENV[K5('EEventType')]
  0009  GETTABLE  R2 = R2[K6('ChapterChangeFinished')]
  0010  MOVE      R3 = R0
  0011  GETTABLE  R4 = R0[K7('OnGameModeChanged')]
  0012  CALL      R1 = call(R1, 0 args, 3 rets)
  0013  GETTABUP  R1 = _ENV[K3('EventDispatcher')]
  0014  GETTABLE  R1 = R1[K4('AddListener')]
  0015  GETTABUP  R2 = _ENV[K5('EEventType')]
  0016  GETTABLE  R2 = R2[K8('MainTaskFinished')]
  0017  MOVE      R3 = R0
  0018  GETTABLE  R4 = R0[K9('_OnMainTaskFinished')]
  0019  CALL      R1 = call(R1, 0 args, 3 rets)
  0020  GETTABUP  R1 = _ENV[K3('EventDispatcher')]
  0021  GETTABLE  R1 = R1[K4('AddListener')]
  0022  GETTABUP  R2 = _ENV[K5('EEventType')]
  0023  GETTABLE  R2 = R2[K10('CloseView')]
  0024  MOVE      R3 = R0
  0025  GETTABLE  R4 = R0[K11('OnCloseView')]
  0026  CALL      R1 = call(R1, 0 args, 3 rets)
  0027  GETTABUP  R1 = _ENV[K3('EventDispatcher')]
  0028  GETTABLE  R1 = R1[K4('AddListener')]
  0029  GETTABUP  R2 = _ENV[K5('EEventType')]
  0030  GETTABLE  R2 = R2[K12('PropertyConsumed')]
  0031  MOVE      R3 = R0
  0032  GETTABLE  R4 = R0[K13('UpdateExclaimation')]
  0033  CALL      R1 = call(R1, 0 args, 3 rets)
  0034  GETTABUP  R1 = _ENV[K3('EventDispatcher')]
  0035  GETTABLE  R1 = R1[K4('AddListener')]
  0036  GETTABUP  R2 = _ENV[K5('EEventType')]
  0037  GETTABLE  R2 = R2[K14('PropertyAcquired')]
  0038  MOVE      R3 = R0
  0039  GETTABLE  R4 = R0[K13('UpdateExclaimation')]
  0040  CALL      R1 = call(R1, 0 args, 3 rets)
  0041  GETTABUP  R1 = _ENV[K3('EventDispatcher')]
  0042  GETTABLE  R1 = R1[K4('AddListener')]
  0043  GETTABUP  R2 = _ENV[K5('EEventType')]
  0044  GETTABLE  R2 = R2[K15('NewTasksUnlocked')]
  0045  MOVE      R3 = R0
  0046  GETTABLE  R4 = R0[K13('UpdateExclaimation')]
  0047  CALL      R1 = call(R1, 0 args, 3 rets)
  0048  RETURN    return R0..R-1
; ---------- proto1 [_NeedDisplay] ----------
  ; fn ?  line 16-23 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 [_OnMainTaskFinished] ----------
  ; fn ?  line 25-27 np=1 va=0 ms=3 code=9 consts=4 upvals=1 protos=0
  ;   K[0]='m_canClaimProgressReward'
  ;   K[1]='GM'
  ;   K[2]='TaskManager'
  ;   K[3]='CanClaimProgressReward'
  ;   upvals: _ENV
  ;   locals: self(0-9)
  0000  GETTABLE  R1 = R0[K0('m_canClaimProgressReward')]
  0001  TEST      if not R1 then   -> -131068
  0002  JMP       (jump)   -> 7
  0003  GETTABUP  R1 = _ENV[K1('GM')]
  0004  GETTABLE  R1 = R1[K2('TaskManager')]
  0005  SELF      R2 = R1[K3('CanClaimProgressReward')] (self)
  0006  CALL      R1 = call(R1, 1 args, 1 rets)
  0007  SETTABLE  R0[K0('m_canClaimProgressReward')] = R1
  0008  RETURN    return R0..R-1
; ---------- proto3 [OnCloseView] ----------
  ; fn ?  line 29-34 np=2 va=0 ms=4 code=11 consts=6 upvals=1 protos=0
  ;   K[0]='name'
  ;   K[1]='UIPrefabConfigName'
  ;   K[2]='TaskGroupFinishWindow'
  ;   K[3]='m_canClaimProgressReward'
  ;   K[4]=false
  ;   K[5]='UpdateContent'
  ;   upvals: _ENV
  ;   locals: self(0-11), msg(0-11)
  0000  TEST      if not R1 then   -> -131070
  0001  JMP       (jump)   -> 10
  0002  GETTABLE  R2 = R1[K0('name')]
  0003  GETTABUP  R3 = _ENV[K1('UIPrefabConfigName')]
  0004  GETTABLE  R3 = R3[K2('TaskGroupFinishWindow')]
  0005  EQ        if R0 eq R3   -> -130038
  0006  JMP       (jump)   -> 10
  0007  SETTABLE  R0[K3('m_canClaimProgressReward')] = K4(false)
  0008  SELF      R3 = R0[K5('UpdateContent')] (self)
  0009  CALL      R2 = call(R2, 0 args, 1 rets)
  0010  RETURN    return R0..R-1
; ---------- proto4 [OnClicked] ----------
  ; fn ?  line 36-47 np=1 va=0 ms=5 code=31 consts=11 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='TaskManager'
  ;   K[2]='IsAllFinished'
  ;   K[3]='UIManager'
  ;   K[4]='OpenView'
  ;   K[5]='UIPrefabConfigName'
  ;   K[6]='TaskClearWindow'
  ;   K[7]='IsViewExisting'
  ;   K[8]='TaskWindow'
  ;   K[9]='ETaskWindowRefer'
  ;   K[10]='TaskButton'
  ;   upvals: _ENV
  ;   locals: self(0-31)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('TaskManager')]
  0002  SELF      R2 = R1[K2('IsAllFinished')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131066
  0005  JMP       (jump)   -> 13
  0006  GETTABUP  R1 = _ENV[K0('GM')]
  0007  GETTABLE  R1 = R1[K3('UIManager')]
  0008  SELF      R2 = R1[K4('OpenView')] (self)
  0009  GETTABUP  R3 = _ENV[K5('UIPrefabConfigName')]
  0010  GETTABLE  R3 = R3[K6('TaskClearWindow')]
  0011  CALL      R1 = call(R1, 0 args, 2 rets)
  0012  RETURN    return R0..R-1
  0013  GETTABUP  R1 = _ENV[K0('GM')]
  0014  GETTABLE  R1 = R1[K3('UIManager')]
  0015  SELF      R2 = R1[K7('IsViewExisting')] (self)
  0016  GETTABUP  R3 = _ENV[K5('UIPrefabConfigName')]
  0017  GETTABLE  R3 = R3[K8('TaskWindow')]
  0018  CALL      R1 = call(R1, 1 args, 2 rets)
  0019  TEST      if not R1 then   -> -131051
  0020  JMP       (jump)   -> 22
  0021  RETURN    return R0..R-1
  0022  GETTABUP  R1 = _ENV[K0('GM')]
  0023  GETTABLE  R1 = R1[K3('UIManager')]
  0024  SELF      R2 = R1[K4('OpenView')] (self)
  0025  GETTABUP  R3 = _ENV[K5('UIPrefabConfigName')]
  0026  GETTABLE  R3 = R3[K8('TaskWindow')]
  0027  GETTABUP  R4 = _ENV[K9('ETaskWindowRefer')]
  0028  GETTABLE  R4 = R4[K10('TaskButton')]
  0029  CALL      R1 = call(R1, 0 args, 3 rets)
  0030  RETURN    return R0..R-1
; ---------- proto5 [UpdateContent] ----------
  ; fn ?  line 49-59 np=1 va=0 ms=8 code=33 consts=14 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='TaskManager'
  ;   K[2]='GetProgressRewardProgress'
  ;   K[3]='m_canClaimProgressReward'
  ;   K[4]='m_progressText'
  ;   K[5]='text'
  ;   K[6]='tostring'
  ;   K[7]='/'
  ;   K[8]=0
  ;   K[9]='MAX'
  ;   K[10]='m_slider'
  ;   K[11]='value'
  ;   K[12]=1
  ;   K[13]='UpdateExclaimation'
  ;   upvals: _ENV
  ;   locals: self(0-33), finished(4-33), total(4-33)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('TaskManager')]
  0002  SELF      R2 = R1[K2('GetProgressRewardProgress')] (self)
  0003  CALL      R1 = call(R1, 2 args, 1 rets)
  0004  GETTABLE  R3 = R0[K3('m_canClaimProgressReward')]
  0005  TEST      if not R3 then   -> -131065
  0006  JMP       (jump)   -> 8
  0007  MOVE      R1 = R0
  0008  GETTABLE  R3 = R0[K4('m_progressText')]
  0009  GETTABUP  R4 = _ENV[K6('tostring')]
  0010  MOVE      R5 = R0
  0011  CALL      R4 = call(R4, 1 args, 1 rets)
  0012  LOADK     R5 = K7 '/'
  0013  GETTABUP  R6 = _ENV[K6('tostring')]
  0014  LT        if R0 lt R2   -> 4114
  0015  JMP       (jump)   -> 18
  0016  TESTSET   if R1 then R7   -> -130029
  0017  JMP       (jump)   -> 19
  0018  LOADK     R7 = K9 'MAX'
  0019  CALL      R6 = call(R6, 1 args, 1 rets)
  0020  CONCAT    R4 = concat(R4..R4)
  0021  SETTABLE  R3[K5('text')] = R4
  0022  GETTABLE  R3 = R0[K10('m_slider')]
  0023  LT        if R0 lt R2   -> 4123
  0024  JMP       (jump)   -> 28
  0025  DIV       R4 = R2 div R1
  0026  TEST      if not R4 then   -> -131043
  0027  JMP       (jump)   -> 29
  0028  LOADK     R4 = K12 1
  0029  SETTABLE  R3[K11('value')] = R4
  0030  SELF      R4 = R0[K13('UpdateExclaimation')] (self)
  0031  CALL      R3 = call(R3, 0 args, 1 rets)
  0032  RETURN    return R0..R-1
; ---------- proto6 [UpdateExclaimation] ----------
  ; fn ?  line 61-63 np=1 va=0 ms=5 code=8 consts=5 upvals=1 protos=0
  ;   K[0]='m_exclamationGo'
  ;   K[1]='SetActive'
  ;   K[2]='GM'
  ;   K[3]='TaskManager'
  ;   K[4]='CanFinishOngoingTask'
  ;   upvals: _ENV
  ;   locals: self(0-8)
  0000  GETTABLE  R1 = R0[K0('m_exclamationGo')]
  0001  SELF      R2 = R1[K1('SetActive')] (self)
  0002  GETTABUP  R3 = _ENV[K2('GM')]
  0003  GETTABLE  R3 = R3[K3('TaskManager')]
  0004  SELF      R4 = R3[K4('CanFinishOngoingTask')] (self)
  0005  CALL      R3 = call(R3, -1 args, 1 rets)
  0006  CALL      R1 = call(R1, 0 args, -1 rets)
  0007  RETURN    return R0..R-1
; ---------- proto7 [IconScaleAnimation] ----------
  ; fn ?  line 65-69 np=1 va=1 ms=4 code=8 consts=3 upvals=1 protos=0
  ;   K[0]='HudGeneralButton'
  ;   K[1]='IconScaleAnimation'
  ;   K[2]='UpdateContent'
  ;   upvals: _ENV
  ;   locals: self(0-8)
  0000  GETTABUP  R1 = _ENV[K0('HudGeneralButton')]
  0001  GETTABLE  R1 = R1[K1('IconScaleAnimation')]
  0002  MOVE      R2 = R0
  0003  VARARG    R3 = vararg(0)
  0004  CALL      R1 = call(R1, 0 args, -1 rets)
  0005  SELF      R2 = R0[K2('UpdateContent')] (self)
  0006  CALL      R1 = call(R1, 0 args, 1 rets)
  0007  RETURN    return R0..R-1
; ---------- proto8 [GetBoxPosAndScale] ----------
  ; fn ?  line 71-73 np=1 va=0 ms=3 code=6 consts=4 upvals=0 protos=0
  ;   K[0]='m_boxImage'
  ;   K[1]='transform'
  ;   K[2]='position'
  ;   K[3]=0.4
  ;   locals: self(0-6)
  0000  GETTABLE  R1 = R0[K0('m_boxImage')]
  0001  GETTABLE  R1 = R1[K1('transform')]
  0002  GETTABLE  R1 = R1[K2('position')]
  0003  LOADK     R2 = K3 0.4
  0004  RETURN    return R1..R0
  0005  RETURN    return R0..R-1
