# RecipeCollectActivity_View_RecipeCollectActivityStageRewardWindow_1897.luac
; fn @RecipeCollectActivityStageRewardWindow.lua  line 0-0 np=0 va=1 ms=3 code=57 consts=18 upvals=1 protos=13
;   K[0]='RecipeCollectActivityStageRewardWindow'
;   K[1]='setmetatable'
;   K[2]='RewardWindow'
;   K[3]='__index'
;   K[4]='BeforeOpenCheck'
;   K[5]='_CanOpenWindow'
;   K[6]='Init'
;   K[7]='GetModel'
;   K[8]='_CanClaimReward'
;   K[9]='_ClaimRewards'
;   K[10]='_IsModelIdChanged'
;   K[11]='_IsActivityValid'
;   K[12]='OnCloseFinish'
;   K[13]='RecipeCollectActivityFinalRewardWindow'
;   K[14]='canClickWindowMask'
;   K[15]=false
;   K[16]='Init'
;   K[17]='_UpdateRewardContentLayout'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K2('RewardWindow')]
0003  CALL      R0 = call(R0, 1 args, 2 rets)
0004  SETTABUP  _ENV[K0('RecipeCollectActivityStageRewardWindow')] = R0
0005  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0006  GETTABUP  R1 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0009  CLOSURE   R1 = closure proto0
0010  SETTABLE  R0[K4('BeforeOpenCheck')] = R1
0011  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0012  CLOSURE   R1 = closure proto1
0013  SETTABLE  R0[K5('_CanOpenWindow')] = R1
0014  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0015  CLOSURE   R1 = closure proto2
0016  SETTABLE  R0[K6('Init')] = R1
0017  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0018  CLOSURE   R1 = closure proto3
0019  SETTABLE  R0[K7('GetModel')] = R1
0020  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0021  CLOSURE   R1 = closure proto4
0022  SETTABLE  R0[K8('_CanClaimReward')] = R1
0023  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0024  CLOSURE   R1 = closure proto5
0025  SETTABLE  R0[K9('_ClaimRewards')] = R1
0026  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0027  CLOSURE   R1 = closure proto6
0028  SETTABLE  R0[K10('_IsModelIdChanged')] = R1
0029  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0030  CLOSURE   R1 = closure proto7
0031  SETTABLE  R0[K11('_IsActivityValid')] = R1
0032  GETTABUP  R0 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0033  CLOSURE   R1 = closure proto8
0034  SETTABLE  R0[K12('OnCloseFinish')] = R1
0035  GETTABUP  R0 = _ENV[K1('setmetatable')]
0036  NEWTABLE  R1 = {} (0 items)
0037  SETTABLE  R1[K14('canClickWindowMask')] = K15(false)
0038  GETTABUP  R2 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
0039  CALL      R0 = call(R0, 1 args, 2 rets)
0040  SETTABUP  _ENV[K13('RecipeCollectActivityFinalRewardWindow')] = R0
0041  GETTABUP  R0 = _ENV[K13('RecipeCollectActivityFinalRewardWindow')]
0042  GETTABUP  R1 = _ENV[K13('RecipeCollectActivityFinalRewardWindow')]
0043  SETTABLE  R0[K3('__index')] = R1
0044  GETTABUP  R0 = _ENV[K13('RecipeCollectActivityFinalRewardWindow')]
0045  CLOSURE   R1 = closure proto9
0046  SETTABLE  R0[K16('Init')] = R1
0047  GETTABUP  R0 = _ENV[K13('RecipeCollectActivityFinalRewardWindow')]
0048  CLOSURE   R1 = closure proto10
0049  SETTABLE  R0[K8('_CanClaimReward')] = R1
0050  GETTABUP  R0 = _ENV[K13('RecipeCollectActivityFinalRewardWindow')]
0051  CLOSURE   R1 = closure proto11
0052  SETTABLE  R0[K9('_ClaimRewards')] = R1
0053  GETTABUP  R0 = _ENV[K13('RecipeCollectActivityFinalRewardWindow')]
0054  CLOSURE   R1 = closure proto12
0055  SETTABLE  R0[K17('_UpdateRewardContentLayout')] = R1
0056  RETURN    return R0..R-1
; ---------- proto0 [BeforeOpenCheck] ----------
  ; fn ?  line 8-12 np=3 va=0 ms=8 code=26 consts=8 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='ActivityManager'
  ;   K[2]='GetModel'
  ;   K[3]='GetState'
  ;   K[4]=nil
  ;   K[5]='_CanOpenWindow'
  ;   K[6]='GetId'
  ;   K[7]='_CanClaimReward'
  ;   upvals: _ENV
  ;   locals: self(0-26), activityType(0-26), id(0-26), model(5-26), state(7-26)
  0000  GETTABUP  R3 = _ENV[K0('GM')]
  0001  GETTABLE  R3 = R3[K1('ActivityManager')]
  0002  SELF      R4 = R3[K2('GetModel')] (self)
  0003  MOVE      R5 = R0
  0004  CALL      R3 = call(R3, 1 args, 2 rets)
  0005  SELF      R5 = R3[K3('GetState')] (self)
  0006  CALL      R4 = call(R4, 1 args, 1 rets)
  0007  EQ        if R1 eq K4(nil)   -> -129267
  0008  JMP       (jump)   -> 22
  0009  SELF      R6 = R0[K5('_CanOpenWindow')] (self)
  0010  MOVE      R7 = R0
  0011  CALL      R5 = call(R5, 1 args, 2 rets)
  0012  TEST      if not R5 then   -> -131058
  0013  JMP       (jump)   -> 24
  0014  SELF      R6 = R3[K6('GetId')] (self)
  0015  CALL      R5 = call(R5, 1 args, 1 rets)
  0016  EQ        if R0 eq R2   -> -128492
  0017  JMP       (jump)   -> 22
  0018  SELF      R6 = R0[K7('_CanClaimReward')] (self)
  0019  MOVE      R7 = R0
  0020  CALL      R5 = call(R5, 1 args, 2 rets)
  0021  JMP       (jump)   -> 24
  0022  LOADBOOL  R5 = false
  0023  LOADBOOL  R5 = true
  0024  RETURN    return R5..R4
  0025  RETURN    return R0..R-1
; ---------- proto1 [_CanOpenWindow] ----------
  ; fn ?  line 15-18 np=2 va=0 ms=4 code=14 consts=4 upvals=1 protos=0
  ;   K[0]='GetState'
  ;   K[1]='ActivityState'
  ;   K[2]='Started'
  ;   K[3]='Ended'
  ;   upvals: _ENV
  ;   locals: self(0-14), model(0-14), state(2-14)
  0000  SELF      R3 = R1[K0('GetState')] (self)
  0001  CALL      R2 = call(R2, 1 args, 1 rets)
  0002  GETTABUP  R3 = _ENV[K1('ActivityState')]
  0003  GETTABLE  R3 = R3[K2('Started')]
  0004  EQ        if R1 eq R3   -> -130039
  0005  JMP       (jump)   -> 11
  0006  GETTABUP  R3 = _ENV[K1('ActivityState')]
  0007  GETTABLE  R3 = R3[K3('Ended')]
  0008  EQ        if R1 eq R3   -> -130035
  0009  JMP       (jump)   -> 11
  0010  LOADBOOL  R3 = false
  0011  LOADBOOL  R3 = true
  0012  RETURN    return R3..R2
  0013  RETURN    return R0..R-1
; ---------- proto2 [Init] ----------
  ; fn ?  line 20-29 np=5 va=0 ms=16 code=28 consts=13 upvals=1 protos=0
  ;   K[0]='m_activityType'
  ;   K[1]='m_model'
  ;   K[2]='GM'
  ;   K[3]='ActivityManager'
  ;   K[4]='GetModel'
  ;   K[5]='m_id'
  ;   K[6]='m_activityDefinition'
  ;   K[7]='GetActivityDefinition'
  ;   K[8]='_ClaimRewards'
  ;   K[9]='RewardWindow'
  ;   K[10]='Init'
  ;   K[11]='ERewardScene'
  ;   K[12]='Other'
  ;   upvals: _ENV
  ;   locals: self(0-28), activityType(0-28), id(0-28), bAutoPop(0-28), closeCallback(0-28), arrRewards(14-28)
  0000  SETTABLE  R0[K0('m_activityType')] = R1
  0001  GETTABUP  R5 = _ENV[K2('GM')]
  0002  GETTABLE  R5 = R5[K3('ActivityManager')]
  0003  SELF      R6 = R5[K4('GetModel')] (self)
  0004  MOVE      R7 = R0
  0005  CALL      R5 = call(R5, 1 args, 2 rets)
  0006  SETTABLE  R0[K1('m_model')] = R5
  0007  SETTABLE  R0[K5('m_id')] = R2
  0008  GETTABLE  R5 = R0[K1('m_model')]
  0009  SELF      R6 = R5[K7('GetActivityDefinition')] (self)
  0010  CALL      R5 = call(R5, 1 args, 1 rets)
  0011  SETTABLE  R0[K6('m_activityDefinition')] = R5
  0012  SELF      R6 = R0[K8('_ClaimRewards')] (self)
  0013  CALL      R5 = call(R5, 1 args, 1 rets)
  0014  GETTABUP  R6 = _ENV[K9('RewardWindow')]
  0015  GETTABLE  R6 = R6[K10('Init')]
  0016  MOVE      R7 = R0
  0017  MOVE      R8 = R0
  0018  LOADNIL   R9..R9 = nil
  0019  LOADBOOL  R10 = true
  0020  GETTABUP  R11 = _ENV[K11('ERewardScene')]
  0021  GETTABLE  R11 = R11[K12('Other')]
  0022  LOADNIL   R12..R12 = nil
  0023  MOVE      R13 = R0
  0024  LOADNIL   R14..R14 = nil
  0025  LOADBOOL  R15 = true
  0026  CALL      R6 = call(R6, 0 args, 9 rets)
  0027  RETURN    return R0..R-1
; ---------- proto3 [GetModel] ----------
  ; fn ?  line 31-33 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_model'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_model')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto4 [_CanClaimReward] ----------
  ; fn ?  line 35-37 np=2 va=0 ms=4 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='CanClaimStageReward'
  ;   locals: self(0-4), model(0-4)
  0000  SELF      R3 = R1[K0('CanClaimStageReward')] (self)
  0001  TAILCALL  tailcall(R2, 0)
  0002  RETURN    return R2..R1
  0003  RETURN    return R0..R-1
; ---------- proto5 [_ClaimRewards] ----------
  ; fn ?  line 39-42 np=1 va=0 ms=5 code=11 consts=3 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='CanClaimStageReward'
  ;   K[2]='ClaimStageReward'
  ;   locals: self(0-11), stage(4-11)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('CanClaimStageReward')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  SELF      R3 = R0[K0('GetModel')] (self)
  0005  CALL      R2 = call(R2, 1 args, 1 rets)
  0006  SELF      R3 = R2[K2('ClaimStageReward')] (self)
  0007  MOVE      R4 = R0
  0008  TAILCALL  tailcall(R2, 0)
  0009  RETURN    return R2..R1
  0010  RETURN    return R0..R-1
; ---------- proto6 [_IsModelIdChanged] ----------
  ; fn ?  line 44-46 np=1 va=0 ms=4 code=11 consts=3 upvals=0 protos=0
  ;   K[0]='m_id'
  ;   K[1]='GetModel'
  ;   K[2]='GetId'
  ;   locals: self(0-11)
  0000  GETTABLE  R1 = R0[K0('m_id')]
  0001  SELF      R3 = R0[K1('GetModel')] (self)
  0002  CALL      R2 = call(R2, 1 args, 1 rets)
  0003  SELF      R3 = R2[K2('GetId')] (self)
  0004  CALL      R2 = call(R2, 1 args, 1 rets)
  0005  EQ        if R0 eq R2   -> -130551
  0006  JMP       (jump)   -> 8
  0007  LOADBOOL  R1 = false
  0008  LOADBOOL  R1 = true
  0009  RETURN    return R1..R0
  0010  RETURN    return R0..R-1
; ---------- proto7 [_IsActivityValid] ----------
  ; fn ?  line 49-51 np=1 va=0 ms=3 code=11 consts=3 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='IsActivityOpen'
  ;   K[2]='_IsModelIdChanged'
  ;   locals: self(0-11)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('IsActivityOpen')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  TEST      if not R1 then   -> -131066
  0005  JMP       (jump)   -> 9
  0006  SELF      R2 = R0[K2('_IsModelIdChanged')] (self)
  0007  CALL      R1 = call(R1, 1 args, 1 rets)
  0008  NOT       R1 = not R0
  0009  RETURN    return R1..R0
  0010  RETURN    return R0..R-1
; ---------- proto8 [OnCloseFinish] ----------
  ; fn ?  line 54-59 np=1 va=0 ms=3 code=13 consts=5 upvals=1 protos=0
  ;   K[0]='RewardWindow'
  ;   K[1]='OnCloseFinish'
  ;   K[2]='_IsModelIdChanged'
  ;   K[3]='GetModel'
  ;   K[4]='TryPopWindow'
  ;   upvals: _ENV
  ;   locals: self(0-13)
  0000  GETTABUP  R1 = _ENV[K0('RewardWindow')]
  0001  GETTABLE  R1 = R1[K1('OnCloseFinish')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  SELF      R2 = R0[K2('_IsModelIdChanged')] (self)
  0005  CALL      R1 = call(R1, 1 args, 1 rets)
  0006  TEST      if not R1 then   -> -131063
  0007  JMP       (jump)   -> 12
  0008  SELF      R2 = R0[K3('GetModel')] (self)
  0009  CALL      R1 = call(R1, 1 args, 1 rets)
  0010  SELF      R2 = R1[K4('TryPopWindow')] (self)
  0011  CALL      R1 = call(R1, 0 args, 1 rets)
  0012  RETURN    return R0..R-1
; ---------- proto9 [Init] ----------
  ; fn ?  line 70-73 np=5 va=0 ms=11 code=14 consts=4 upvals=1 protos=0
  ;   K[0]='RecipeCollectActivityStageRewardWindow'
  ;   K[1]='Init'
  ;   K[2]='m_tray'
  ;   K[3]='GetModel'
  ;   upvals: _ENV
  ;   locals: self(0-14), activityType(0-14), id(0-14), bAutoPop(0-14), closeCallback(0-14)
  0000  GETTABUP  R5 = _ENV[K0('RecipeCollectActivityStageRewardWindow')]
  0001  GETTABLE  R5 = R5[K1('Init')]
  0002  MOVE      R6 = R0
  0003  MOVE      R7 = R0
  0004  MOVE      R8 = R0
  0005  MOVE      R9 = R0
  0006  MOVE      R10 = R0
  0007  CALL      R5 = call(R5, 0 args, 5 rets)
  0008  GETTABLE  R5 = R0[K2('m_tray')]
  0009  SELF      R6 = R5[K1('Init')] (self)
  0010  SELF      R8 = R0[K3('GetModel')] (self)
  0011  CALL      R7 = call(R7, -1 args, 1 rets)
  0012  CALL      R5 = call(R5, 0 args, -1 rets)
  0013  RETURN    return R0..R-1
; ---------- proto10 [_CanClaimReward] ----------
  ; fn ?  line 76-78 np=2 va=0 ms=4 code=4 consts=1 upvals=0 protos=0
  ;   K[0]='CanClaimFinalReward'
  ;   locals: self(0-4), model(0-4)
  0000  SELF      R3 = R1[K0('CanClaimFinalReward')] (self)
  0001  TAILCALL  tailcall(R2, 0)
  0002  RETURN    return R2..R1
  0003  RETURN    return R0..R-1
; ---------- proto11 [_ClaimRewards] ----------
  ; fn ?  line 81-83 np=1 va=0 ms=3 code=6 consts=2 upvals=0 protos=0
  ;   K[0]='GetModel'
  ;   K[1]='TryClaimFinalReward'
  ;   locals: self(0-6)
  0000  SELF      R2 = R0[K0('GetModel')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R2 = R1[K1('TryClaimFinalReward')] (self)
  0003  TAILCALL  tailcall(R1, 0)
  0004  RETURN    return R1..R0
  0005  RETURN    return R0..R-1
; ---------- proto12 [_UpdateRewardContentLayout] ----------
  ; fn ?  line 86-88 np=1 va=0 ms=2 code=1 consts=0 upvals=0 protos=0
  ;   locals: self(0-1)
  0000  RETURN    return R0..R-1
