# SurpriseChestActivity_Model_SurpriseChestActivityModel_1042.luac
; fn @SurpriseChestActivityModel.lua  line 0-0 np=0 va=1 ms=5 code=56 consts=28 upvals=1 protos=13
;   K[0]='SurpriseChestActivityModel'
;   K[1]='setmetatable'
;   K[2]='BaseActivityModel'
;   K[3]='__index'
;   K[4]='OpeningSurpriseChest'
;   K[5]='op_s_c'
;   K[6]='TriggerEndTime'
;   K[7]='t_e_t'
;   K[8]='HasTriggerd'
;   K[9]='h_t'
;   K[10]='SurpriseChestDurationKey'
;   K[11]='duration'
;   K[12]='Init'
;   K[13]='_LoadOtherServerConfig'
;   K[14]='SurpriseChestActivityModel'
;   K[15]='HasConfig'
;   K[16]='GetCurrentConfig'
;   K[17]='GetLockDurationInSeconds'
;   K[18]='_OnStateChanged'
;   K[19]='_OnConfigUpdated'
;   K[20]='_CalculateState'
;   K[21]='CanTriggerSurpriseChest'
;   K[22]='DB_VALUE_KEY'
;   K[23]=1
;   K[24]='TriggerSurpriseChest'
;   K[25]='HasTriggeredSurpriseChest'
;   K[26]='LateInit'
;   K[27]='GetTriggerData'
;   upvals: _ENV
;   locals: DBKey(12-56), DB_VALUE_KEY(42-56), TRUE_VALUE(43-56)
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K2('BaseActivityModel')]
0003  CALL      R0 = call(R0, 1 args, 2 rets)
0004  SETTABUP  _ENV[K0('SurpriseChestActivityModel')] = R0
0005  GETTABUP  R0 = _ENV[K0('SurpriseChestActivityModel')]
0006  GETTABUP  R1 = _ENV[K0('SurpriseChestActivityModel')]
0007  SETTABLE  R0[K3('__index')] = R1
0008  NEWTABLE  R0 = {} (0 items)
0009  SETTABLE  R0[K4('OpeningSurpriseChest')] = K5('op_s_c')
0010  SETTABLE  R0[K6('TriggerEndTime')] = K7('t_e_t')
0011  SETTABLE  R0[K8('HasTriggerd')] = K9('h_t')
0012  GETTABUP  R1 = _ENV[K0('SurpriseChestActivityModel')]
0013  SETTABLE  R1[K10('SurpriseChestDurationKey')] = K11('duration')
0014  GETTABUP  R1 = _ENV[K0('SurpriseChestActivityModel')]
0015  CLOSURE   R2 = closure proto0
0016  SETTABLE  R1[K12('Init')] = R2
0017  GETTABUP  R1 = _ENV[K0('SurpriseChestActivityModel')]
0018  CLOSURE   R2 = closure proto1
0019  SETTABLE  R1[K13('_LoadOtherServerConfig')] = R2
0020  GETTABUP  R1 = _ENV[K14('SurpriseChestActivityModel')]
0021  CLOSURE   R2 = closure proto2
0022  SETTABLE  R1[K15('HasConfig')] = R2
0023  GETTABUP  R1 = _ENV[K14('SurpriseChestActivityModel')]
0024  CLOSURE   R2 = closure proto3
0025  SETTABLE  R1[K16('GetCurrentConfig')] = R2
0026  GETTABUP  R1 = _ENV[K14('SurpriseChestActivityModel')]
0027  CLOSURE   R2 = closure proto4
0028  SETTABLE  R1[K17('GetLockDurationInSeconds')] = R2
0029  GETTABUP  R1 = _ENV[K14('SurpriseChestActivityModel')]
0030  CLOSURE   R2 = closure proto5
0031  SETTABLE  R1[K18('_OnStateChanged')] = R2
0032  GETTABUP  R1 = _ENV[K14('SurpriseChestActivityModel')]
0033  CLOSURE   R2 = closure proto6
0034  SETTABLE  R1[K19('_OnConfigUpdated')] = R2
0035  GETTABUP  R1 = _ENV[K14('SurpriseChestActivityModel')]
0036  CLOSURE   R2 = closure proto7
0037  SETTABLE  R1[K20('_CalculateState')] = R2
0038  GETTABUP  R1 = _ENV[K14('SurpriseChestActivityModel')]
0039  CLOSURE   R2 = closure proto8
0040  SETTABLE  R1[K21('CanTriggerSurpriseChest')] = R2
0041  GETTABUP  R1 = _ENV[K22('DB_VALUE_KEY')]
0042  LOADK     R2 = K23 1
0043  GETTABUP  R3 = _ENV[K14('SurpriseChestActivityModel')]
0044  CLOSURE   R4 = closure proto9
0045  SETTABLE  R3[K24('TriggerSurpriseChest')] = R4
0046  GETTABUP  R3 = _ENV[K14('SurpriseChestActivityModel')]
0047  CLOSURE   R4 = closure proto10
0048  SETTABLE  R3[K25('HasTriggeredSurpriseChest')] = R4
0049  GETTABUP  R3 = _ENV[K14('SurpriseChestActivityModel')]
0050  CLOSURE   R4 = closure proto11
0051  SETTABLE  R3[K26('LateInit')] = R4
0052  GETTABUP  R3 = _ENV[K14('SurpriseChestActivityModel')]
0053  CLOSURE   R4 = closure proto12
0054  SETTABLE  R3[K27('GetTriggerData')] = R4
0055  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 17-20 np=3 va=0 ms=7 code=10 consts=4 upvals=1 protos=0
  ;   K[0]='m_activityDefinition'
  ;   K[1]='SurpriseChestActivityDefinition'
  ;   K[2]='BaseActivityModel'
  ;   K[3]='Init'
  ;   upvals: _ENV
  ;   locals: self(0-10), activityType(0-10), dbTable(0-10)
  0000  GETTABUP  R3 = _ENV[K1('SurpriseChestActivityDefinition')]
  0001  GETTABLE  R3 = R3[R1]
  0002  SETTABLE  R0[K0('m_activityDefinition')] = R3
  0003  GETTABUP  R3 = _ENV[K2('BaseActivityModel')]
  0004  GETTABLE  R3 = R3[K3('Init')]
  0005  MOVE      R4 = R0
  0006  MOVE      R5 = R0
  0007  MOVE      R6 = R0
  0008  CALL      R3 = call(R3, 0 args, 3 rets)
  0009  RETURN    return R0..R-1
; ---------- proto1 [_LoadOtherServerConfig] ----------
  ; fn ?  line 22-34 np=2 va=0 ms=12 code=43 consts=20 upvals=1 protos=0
  ;   K[0]='order_token_control'
  ;   K[1]='Table'
  ;   K[2]='Empty'
  ;   K[3]='m_currentConfig'
  ;   K[4]='ipairs'
  ;   K[5]='table'
  ;   K[6]='insert'
  ;   K[7]='SurpriseChestData'
  ;   K[8]='Create'
  ;   K[9]='m_duration'
  ;   K[10]='GetGeneralConfig'
  ;   K[11]='SurpriseChestActivityModel'
  ;   K[12]='SurpriseChestDurationKey'
  ;   K[13]='EConfigParamType'
  ;   K[14]='Int'
  ;   K[15]=0
  ;   K[16]='Log'
  ;   K[17]='Assert'
  ;   K[18]='问号宝箱活动的buff时间为0！'
  ;   K[19]='_OnConfigUpdated'
  ;   upvals: _ENV
  ;   locals: self(0-43), serverConfig(0-43), chestConfig(5-43), (for generator)(10-21), (for state)(10-21), (for control)(10-21), _(11-19), config(11-19)
  0000  GETTABLE  R2 = R1[K0('order_token_control')]
  0001  TEST      if not R2 then   -> -131068
  0002  JMP       (jump)   -> 5
  0003  GETTABUP  R2 = _ENV[K1('Table')]
  0004  GETTABLE  R2 = R2[K2('Empty')]
  0005  NEWTABLE  R3 = {} (0 items)
  0006  SETTABLE  R0[K3('m_currentConfig')] = R3
  0007  GETTABUP  R3 = _ENV[K4('ipairs')]
  0008  MOVE      R4 = R0
  0009  CALL      R3 = call(R3, 3 args, 1 rets)
  0010  JMP       (jump)   -> 19
  0011  GETTABUP  R8 = _ENV[K5('table')]
  0012  GETTABLE  R8 = R8[K6('insert')]
  0013  GETTABLE  R9 = R0[K3('m_currentConfig')]
  0014  GETTABUP  R10 = _ENV[K7('SurpriseChestData')]
  0015  GETTABLE  R10 = R10[K8('Create')]
  0016  MOVE      R11 = R0
  0017  CALL      R10 = call(R10, -1 args, 1 rets)
  0018  CALL      R8 = call(R8, 0 args, -1 rets)
  0019  TFORCALL  tforcall R3
  0020  TFORLOOP  tforloop R5(sBx=-10)   -> 11
  0021  SELF      R4 = R0[K10('GetGeneralConfig')] (self)
  0022  GETTABUP  R5 = _ENV[K11('SurpriseChestActivityModel')]
  0023  GETTABLE  R5 = R5[K12('SurpriseChestDurationKey')]
  0024  GETTABUP  R6 = _ENV[K13('EConfigParamType')]
  0025  GETTABLE  R6 = R6[K14('Int')]
  0026  CALL      R3 = call(R3, 1 args, 3 rets)
  0027  TEST      if not R3 then   -> -131042
  0028  JMP       (jump)   -> 30
  0029  LOADK     R3 = K15 0
  0030  SETTABLE  R0[K9('m_duration')] = R3
  0031  GETTABUP  R3 = _ENV[K16('Log')]
  0032  GETTABLE  R3 = R3[K17('Assert')]
  0033  GETTABLE  R4 = R0[K9('m_duration')]
  0034  LT        if R1 lt R4   -> 7720
  0035  JMP       (jump)   -> 37
  0036  LOADBOOL  R4 = false
  0037  LOADBOOL  R4 = true
  0038  LOADK     R5 = K18 '问号宝箱活动的buff时间为0！'
  0039  CALL      R3 = call(R3, 0 args, 2 rets)
  0040  SELF      R4 = R0[K19('_OnConfigUpdated')] (self)
  0041  CALL      R3 = call(R3, 0 args, 1 rets)
  0042  RETURN    return R0..R-1
; ---------- proto2 [HasConfig] ----------
  ; fn ?  line 36-38 np=1 va=0 ms=4 code=23 consts=7 upvals=1 protos=0
  ;   K[0]='Table'
  ;   K[1]='IsEmpty'
  ;   K[2]='GetCurrentConfig'
  ;   K[3]='GetState'
  ;   K[4]='ActivityState'
  ;   K[5]='Started'
  ;   K[6]='Ended'
  ;   upvals: _ENV
  ;   locals: self(0-23)
  0000  GETTABUP  R1 = _ENV[K0('Table')]
  0001  GETTABLE  R1 = R1[K1('IsEmpty')]
  0002  SELF      R3 = R0[K2('GetCurrentConfig')] (self)
  0003  CALL      R2 = call(R2, -1 args, 1 rets)
  0004  CALL      R1 = call(R1, 1 args, -1 rets)
  0005  TEST      if not R1 then   -> -131064
  0006  JMP       (jump)   -> 19
  0007  SELF      R2 = R0[K3('GetState')] (self)
  0008  CALL      R1 = call(R1, 1 args, 1 rets)
  0009  GETTABUP  R2 = _ENV[K4('ActivityState')]
  0010  GETTABLE  R2 = R2[K5('Started')]
  0011  EQ        if R1 eq R2   -> -130545
  0012  JMP       (jump)   -> 20
  0013  SELF      R2 = R0[K3('GetState')] (self)
  0014  CALL      R1 = call(R1, 1 args, 1 rets)
  0015  GETTABUP  R2 = _ENV[K4('ActivityState')]
  0016  GETTABLE  R2 = R2[K6('Ended')]
  0017  EQ        if R1 eq R2   -> -130539
  0018  JMP       (jump)   -> 20
  0019  LOADBOOL  R1 = false
  0020  LOADBOOL  R1 = true
  0021  RETURN    return R1..R0
  0022  RETURN    return R0..R-1
; ---------- proto3 [GetCurrentConfig] ----------
  ; fn ?  line 40-42 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_currentConfig'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_currentConfig')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto4 [GetLockDurationInSeconds] ----------
  ; fn ?  line 44-46 np=1 va=0 ms=2 code=3 consts=1 upvals=0 protos=0
  ;   K[0]='m_duration'
  ;   locals: self(0-3)
  0000  GETTABLE  R1 = R0[K0('m_duration')]
  0001  RETURN    return R1..R0
  0002  RETURN    return R0..R-1
; ---------- proto5 [_OnStateChanged] ----------
  ; fn ?  line 48-52 np=1 va=0 ms=3 code=12 consts=7 upvals=1 protos=0
  ;   K[0]='BaseActivityModel'
  ;   K[1]='_OnStateChanged'
  ;   K[2]='_OnConfigUpdated'
  ;   K[3]='EventDispatcher'
  ;   K[4]='DispatchEvent'
  ;   K[5]='m_activityDefinition'
  ;   K[6]='StateChangedEvent'
  ;   upvals: _ENV
  ;   locals: self(0-12)
  0000  GETTABUP  R1 = _ENV[K0('BaseActivityModel')]
  0001  GETTABLE  R1 = R1[K1('_OnStateChanged')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  SELF      R2 = R0[K2('_OnConfigUpdated')] (self)
  0005  CALL      R1 = call(R1, 0 args, 1 rets)
  0006  GETTABUP  R1 = _ENV[K3('EventDispatcher')]
  0007  GETTABLE  R1 = R1[K4('DispatchEvent')]
  0008  GETTABLE  R2 = R0[K5('m_activityDefinition')]
  0009  GETTABLE  R2 = R2[K6('StateChangedEvent')]
  0010  CALL      R1 = call(R1, 0 args, 1 rets)
  0011  RETURN    return R0..R-1
; ---------- proto6 [_OnConfigUpdated] ----------
  ; fn ?  line 54-59 np=1 va=0 ms=3 code=9 consts=4 upvals=1 protos=0
  ;   K[0]='HasConfig'
  ;   K[1]='GM'
  ;   K[2]='SurpriseChestManager'
  ;   K[3]='UpdateSurpriseChestDataInTriggerTime'
  ;   upvals: _ENV
  ;   locals: self(0-9)
  0000  SELF      R2 = R0[K0('HasConfig')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  TEST      if not R1 then   -> -131068
  0003  JMP       (jump)   -> 8
  0004  GETTABUP  R1 = _ENV[K1('GM')]
  0005  GETTABLE  R1 = R1[K2('SurpriseChestManager')]
  0006  SELF      R2 = R1[K3('UpdateSurpriseChestDataInTriggerTime')] (self)
  0007  CALL      R1 = call(R1, 0 args, 1 rets)
  0008  RETURN    return R0..R-1
; ---------- proto7 [_CalculateState] ----------
  ; fn ?  line 61-91 np=2 va=0 ms=8 code=97 consts=21 upvals=1 protos=0
  ;   K[0]='m_config'
  ;   K[1]=nil
  ;   K[2]='_CanStartActivity'
  ;   K[3]='ActivityState'
  ;   K[4]='Released'
  ;   K[5]='GM'
  ;   K[6]='GameModel'
  ;   K[7]='GetServerTime'
  ;   K[8]='GetEndTime'
  ;   K[9]='_IsExistConditionSatisfied'
  ;   K[10]='sTime'
  ;   K[11]='Preparing'
  ;   K[12]='HasTriggeredSurpriseChest'
  ;   K[13]='SurpriseChestManager'
  ;   K[14]='HasTriggerEndTime'
  ;   K[15]='Ended'
  ;   K[16]='rTime'
  ;   K[17]='IsInLockTime'
  ;   K[18]='HasWindowOpenedOnce'
  ;   K[19]='Started'
  ;   K[20]=-1
  ;   upvals: _ENV
  ;   locals: self(0-97), bIgnoreCondition(0-97), serverTime(17-97), bExistSatisfied(18-97), totalEndTime(21-97)
  0000  GETTABLE  R2 = R0[K0('m_config')]
  0001  EQ        if R1 eq K1(nil)   -> -129788
  0002  JMP       (jump)   -> 9
  0003  TEST      if not R1 then   -> -131066
  0004  JMP       (jump)   -> 13
  0005  SELF      R3 = R0[K2('_CanStartActivity')] (self)
  0006  CALL      R2 = call(R2, 1 args, 1 rets)
  0007  TEST      if not R2 then   -> -131062
  0008  JMP       (jump)   -> 13
  0009  GETTABUP  R2 = _ENV[K3('ActivityState')]
  0010  GETTABLE  R2 = R2[K4('Released')]
  0011  LOADNIL   R3..R3 = nil
  0012  RETURN    return R2..R1
  0013  GETTABUP  R2 = _ENV[K5('GM')]
  0014  GETTABLE  R2 = R2[K6('GameModel')]
  0015  SELF      R3 = R2[K7('GetServerTime')] (self)
  0016  CALL      R2 = call(R2, 1 args, 1 rets)
  0017  LOADBOOL  R3 = true
  0018  SELF      R5 = R0[K8('GetEndTime')] (self)
  0019  LOADBOOL  R6 = true
  0020  CALL      R4 = call(R4, 1 args, 2 rets)
  0021  TEST      if not R1 then   -> -131048
  0022  JMP       (jump)   -> 27
  0023  SELF      R6 = R0[K9('_IsExistConditionSatisfied')] (self)
  0024  CALL      R5 = call(R5, 2 args, 1 rets)
  0025  MOVE      R4 = R0
  0026  MOVE      R3 = R0
  0027  TEST      if not R3 then   -> -131043
  0028  JMP       (jump)   -> 39
  0029  GETTABLE  R5 = R0[K0('m_config')]
  0030  GETTABLE  R5 = R5[K10('sTime')]
  0031  LT        if R0 lt R5   -> -130010
  0032  JMP       (jump)   -> 39
  0033  GETTABUP  R5 = _ENV[K3('ActivityState')]
  0034  GETTABLE  R5 = R5[K11('Preparing')]
  0035  GETTABLE  R6 = R0[K0('m_config')]
  0036  GETTABLE  R6 = R6[K10('sTime')]
  0037  RETURN    return R5..R4
  0038  JMP       (jump)   -> 96
  0039  TEST      if not R3 then   -> -131031
  0040  JMP       (jump)   -> 78
  0041  LT        if R0 lt R4   -> -130001
  0042  JMP       (jump)   -> 78
  0043  SELF      R6 = R0[K12('HasTriggeredSurpriseChest')] (self)
  0044  CALL      R5 = call(R5, 1 args, 1 rets)
  0045  TEST      if not R5 then   -> -131025
  0046  JMP       (jump)   -> 58
  0047  GETTABUP  R5 = _ENV[K5('GM')]
  0048  GETTABLE  R5 = R5[K13('SurpriseChestManager')]
  0049  SELF      R6 = R5[K14('HasTriggerEndTime')] (self)
  0050  CALL      R5 = call(R5, 1 args, 1 rets)
  0051  TEST      if not R5 then   -> -131018
  0052  JMP       (jump)   -> 58
  0053  GETTABUP  R5 = _ENV[K3('ActivityState')]
  0054  GETTABLE  R5 = R5[K15('Ended')]
  0055  GETTABLE  R6 = R0[K0('m_config')]
  0056  GETTABLE  R6 = R6[K16('rTime')]
  0057  RETURN    return R5..R4
  0058  SELF      R6 = R0[K17('IsInLockTime')] (self)
  0059  CALL      R5 = call(R5, 1 args, 1 rets)
  0060  TEST      if not R5 then   -> -131010
  0061  JMP       (jump)   -> 73
  0062  SELF      R6 = R0[K18('HasWindowOpenedOnce')] (self)
  0063  GETTABUP  R7 = _ENV[K3('ActivityState')]
  0064  GETTABLE  R7 = R7[K19('Started')]
  0065  CALL      R5 = call(R5, 1 args, 2 rets)
  0066  TEST      if not R5 then   -> -131003
  0067  JMP       (jump)   -> 73
  0068  GETTABUP  R5 = _ENV[K3('ActivityState')]
  0069  GETTABLE  R5 = R5[K15('Ended')]
  0070  GETTABLE  R6 = R0[K0('m_config')]
  0071  GETTABLE  R6 = R6[K16('rTime')]
  0072  RETURN    return R5..R4
  0073  GETTABUP  R5 = _ENV[K3('ActivityState')]
  0074  GETTABLE  R5 = R5[K19('Started')]
  0075  MOVE      R6 = R0
  0076  RETURN    return R5..R4
  0077  JMP       (jump)   -> 96
  0078  GETTABLE  R5 = R0[K0('m_config')]
  0079  GETTABLE  R5 = R5[K16('rTime')]
  0080  TEST      if not R5 then   -> -130990
  0081  JMP       (jump)   -> 92
  0082  GETTABLE  R5 = R0[K0('m_config')]
  0083  GETTABLE  R5 = R5[K16('rTime')]
  0084  LT        if R0 lt R5   -> -129957
  0085  JMP       (jump)   -> 92
  0086  GETTABUP  R5 = _ENV[K3('ActivityState')]
  0087  GETTABLE  R5 = R5[K15('Ended')]
  0088  GETTABLE  R6 = R0[K0('m_config')]
  0089  GETTABLE  R6 = R6[K16('rTime')]
  0090  RETURN    return R5..R4
  0091  JMP       (jump)   -> 96
  0092  GETTABUP  R5 = _ENV[K3('ActivityState')]
  0093  GETTABLE  R5 = R5[K4('Released')]
  0094  LOADK     R6 = K20 -1
  0095  RETURN    return R5..R4
  0096  RETURN    return R0..R-1
; ---------- proto8 [CanTriggerSurpriseChest] ----------
  ; fn ?  line 93-126 np=1 va=0 ms=5 code=54 consts=14 upvals=1 protos=0
  ;   K[0]='GetState'
  ;   K[1]='ActivityState'
  ;   K[2]='Started'
  ;   K[3]='GM'
  ;   K[4]='SurpriseChestManager'
  ;   K[5]='CanTriggerSurpriseChest'
  ;   K[6]='HasConfig'
  ;   K[7]='HasTriggeredSurpriseChest'
  ;   K[8]='IsInLockTime'
  ;   K[9]='m_duration'
  ;   K[10]=0
  ;   K[11]='GameModel'
  ;   K[12]='GetServerTime'
  ;   K[13]='GetEndTime'
  ;   upvals: _ENV
  ;   locals: self(0-54), duration(34-54)
  0000  SELF      R2 = R0[K0('GetState')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  GETTABUP  R2 = _ENV[K1('ActivityState')]
  0003  GETTABLE  R2 = R2[K2('Started')]
  0004  EQ        if R1 eq R2   -> -130552
  0005  JMP       (jump)   -> 8
  0006  LOADBOOL  R1 = false
  0007  RETURN    return R1..R0
  0008  GETTABUP  R1 = _ENV[K3('GM')]
  0009  GETTABLE  R1 = R1[K4('SurpriseChestManager')]
  0010  SELF      R2 = R1[K5('CanTriggerSurpriseChest')] (self)
  0011  CALL      R1 = call(R1, 1 args, 1 rets)
  0012  TEST      if not R1 then   -> -131057
  0013  JMP       (jump)   -> 15
  0014  RETURN    return R0..R-1
  0015  SELF      R2 = R0[K6('HasConfig')] (self)
  0016  CALL      R1 = call(R1, 1 args, 1 rets)
  0017  TEST      if not R1 then   -> -131052
  0018  JMP       (jump)   -> 21
  0019  LOADBOOL  R1 = false
  0020  RETURN    return R1..R0
  0021  SELF      R2 = R0[K7('HasTriggeredSurpriseChest')] (self)
  0022  CALL      R1 = call(R1, 1 args, 1 rets)
  0023  TEST      if not R1 then   -> -131047
  0024  JMP       (jump)   -> 27
  0025  LOADBOOL  R1 = false
  0026  RETURN    return R1..R0
  0027  SELF      R2 = R0[K8('IsInLockTime')] (self)
  0028  CALL      R1 = call(R1, 1 args, 1 rets)
  0029  TEST      if not R1 then   -> -131041
  0030  JMP       (jump)   -> 33
  0031  LOADBOOL  R1 = false
  0032  RETURN    return R1..R0
  0033  GETTABLE  R1 = R0[K9('m_duration')]
  0034  TEST      if not R1 then   -> -131036
  0035  JMP       (jump)   -> 38
  0036  LE        if R0 le K10(0)   -> -130256
  0037  JMP       (jump)   -> 40
  0038  LOADBOOL  R2 = false
  0039  RETURN    return R2..R1
  0040  GETTABUP  R2 = _ENV[K3('GM')]
  0041  GETTABLE  R2 = R2[K11('GameModel')]
  0042  SELF      R3 = R2[K12('GetServerTime')] (self)
  0043  CALL      R2 = call(R2, 1 args, 1 rets)
  0044  ADD       R2 = R1 add R2
  0045  SELF      R4 = R0[K13('GetEndTime')] (self)
  0046  CALL      R3 = call(R3, 1 args, 1 rets)
  0047  LE        if R0 le R2   -> -129485
  0048  JMP       (jump)   -> 51
  0049  LOADBOOL  R2 = false
  0050  RETURN    return R2..R1
  0051  LOADBOOL  R2 = true
  0052  RETURN    return R2..R1
  0053  RETURN    return R0..R-1
; ---------- proto9 [TriggerSurpriseChest] ----------
  ; fn ?  line 132-135 np=1 va=0 ms=6 code=14 consts=8 upvals=4 protos=0
  ;   K[0]='GM'
  ;   K[1]='SurpriseChestManager'
  ;   K[2]='TriggerSurpriseChest'
  ;   K[3]='GetType'
  ;   K[4]='m_duration'
  ;   K[5]='m_dbTable'
  ;   K[6]='Set'
  ;   K[7]='HasTriggerd'
  ;   upvals: _ENV, DBKey, DB_VALUE_KEY, TRUE_VALUE
  ;   locals: self(0-14)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('SurpriseChestManager')]
  0002  SELF      R2 = R1[K2('TriggerSurpriseChest')] (self)
  0003  SELF      R4 = R0[K3('GetType')] (self)
  0004  CALL      R3 = call(R3, 1 args, 1 rets)
  0005  GETTABLE  R4 = R0[K4('m_duration')]
  0006  CALL      R1 = call(R1, 0 args, 3 rets)
  0007  GETTABLE  R1 = R0[K5('m_dbTable')]
  0008  SELF      R2 = R1[K6('Set')] (self)
  0009  GETTABUP  R3 = DBKey[K7('HasTriggerd')]
  0010  GETUPVAL  R4 = _ENV
  0011  GETUPVAL  R5 = _ENV
  0012  CALL      R1 = call(R1, 0 args, 4 rets)
  0013  RETURN    return R0..R-1
; ---------- proto10 [HasTriggeredSurpriseChest] ----------
  ; fn ?  line 138-140 np=1 va=0 ms=5 code=12 consts=3 upvals=3 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='GetInNumber'
  ;   K[2]='HasTriggerd'
  ;   upvals: DBKey, DB_VALUE_KEY, TRUE_VALUE
  ;   locals: self(0-12)
  0000  GETTABLE  R1 = R0[K0('m_dbTable')]
  0001  SELF      R2 = R1[K1('GetInNumber')] (self)
  0002  GETTABUP  R3 = DBKey[K2('HasTriggerd')]
  0003  GETUPVAL  R4 = DBKey
  0004  CALL      R1 = call(R1, 1 args, 3 rets)
  0005  GETUPVAL  R2 = DBKey
  0006  EQ        if R1 eq R2   -> -130550
  0007  JMP       (jump)   -> 9
  0008  LOADBOOL  R1 = false
  0009  LOADBOOL  R1 = true
  0010  RETURN    return R1..R0
  0011  RETURN    return R0..R-1
; ---------- proto11 [LateInit] ----------
  ; fn ?  line 144-166 np=1 va=0 ms=13 code=49 consts=16 upvals=4 protos=0
  ;   K[0]='OpeningSurpriseChest'
  ;   K[1]='EMiscKey'
  ;   K[2]='SurpriseChestOpeningData'
  ;   K[3]='TriggerEndTime'
  ;   K[4]='SurpriseChestTriggerEndTime'
  ;   K[5]='pairs'
  ;   K[6]='m_dbTable'
  ;   K[7]='GetValue'
  ;   K[8]=nil
  ;   K[9]='Remove'
  ;   K[10]='GM'
  ;   K[11]='MiscModel'
  ;   K[12]='Set'
  ;   K[13]='HasTriggerd'
  ;   K[14]='SurpriseChestManager'
  ;   K[15]='OnSyncDataFinished'
  ;   upvals: DBKey, _ENV, DB_VALUE_KEY, TRUE_VALUE
  ;   locals: self(0-49), mapDBKey2MiscKey(9-49), bHasData(10-49), value(11-49), (for generator)(14-36), (for state)(14-36), (for control)(14-36), dbKey(15-34), eMiscKey(15-34)
  0000  NEWTABLE  R1 = {} (0 items)
  0001  GETTABUP  R2 = DBKey[K0('OpeningSurpriseChest')]
  0002  GETTABUP  R3 = _ENV[K1('EMiscKey')]
  0003  GETTABLE  R3 = R3[K2('SurpriseChestOpeningData')]
  0004  SETTABLE  R1[R2] = R3
  0005  GETTABUP  R2 = DBKey[K3('TriggerEndTime')]
  0006  GETTABUP  R3 = _ENV[K1('EMiscKey')]
  0007  GETTABLE  R3 = R3[K4('SurpriseChestTriggerEndTime')]
  0008  SETTABLE  R1[R2] = R3
  0009  LOADBOOL  R2 = false
  0010  LOADNIL   R3..R3 = nil
  0011  GETTABUP  R4 = _ENV[K5('pairs')]
  0012  MOVE      R5 = R0
  0013  CALL      R4 = call(R4, 3 args, 1 rets)
  0014  JMP       (jump)   -> 34
  0015  GETTABLE  R9 = R0[K6('m_dbTable')]
  0016  SELF      R10 = R9[K7('GetValue')] (self)
  0017  MOVE      R11 = R0
  0018  GETUPVAL  R12 = DBKey
  0019  CALL      R9 = call(R9, 1 args, 3 rets)
  0020  MOVE      R3 = R0
  0021  EQ        if R1 eq K8(nil)   -> -129249
  0022  JMP       (jump)   -> 34
  0023  LOADBOOL  R2 = true
  0024  GETTABLE  R9 = R0[K6('m_dbTable')]
  0025  SELF      R10 = R9[K9('Remove')] (self)
  0026  MOVE      R11 = R0
  0027  CALL      R9 = call(R9, 0 args, 2 rets)
  0028  GETTABUP  R9 = _ENV[K10('GM')]
  0029  GETTABLE  R9 = R9[K11('MiscModel')]
  0030  SELF      R10 = R9[K12('Set')] (self)
  0031  MOVE      R11 = R0
  0032  MOVE      R12 = R0
  0033  CALL      R9 = call(R9, 0 args, 3 rets)
  0034  TFORCALL  tforcall R4
  0035  TFORLOOP  tforloop R6(sBx=-21)   -> 15
  0036  TEST      if not R2 then   -> -131034
  0037  JMP       (jump)   -> 48
  0038  GETTABLE  R4 = R0[K6('m_dbTable')]
  0039  SELF      R5 = R4[K12('Set')] (self)
  0040  GETTABUP  R6 = DBKey[K13('HasTriggerd')]
  0041  GETUPVAL  R7 = DBKey
  0042  GETUPVAL  R8 = DBKey
  0043  CALL      R4 = call(R4, 0 args, 4 rets)
  0044  GETTABUP  R4 = _ENV[K10('GM')]
  0045  GETTABLE  R4 = R4[K14('SurpriseChestManager')]
  0046  SELF      R5 = R4[K15('OnSyncDataFinished')] (self)
  0047  CALL      R4 = call(R4, 0 args, 1 rets)
  0048  RETURN    return R0..R-1
; ---------- proto12 [GetTriggerData] ----------
  ; fn ?  line 168-176 np=1 va=0 ms=10 code=14 consts=6 upvals=1 protos=2
  ;   K[0]='SurpriseChestTriggerData'
  ;   K[1]='Create'
  ;   K[2]='ESurpriseChestTriggerType'
  ;   K[3]='Activity'
  ;   K[4]='m_duration'
  ;   K[5]='GetType'
  ;   upvals: _ENV
  ;   locals: self(0-14), funcCanTrigger(1-14), funcTrigger(2-14)
  0000  CLOSURE   R1 = closure proto0
  0001  CLOSURE   R2 = closure proto1
  0002  GETTABUP  R3 = _ENV[K0('SurpriseChestTriggerData')]
  0003  GETTABLE  R3 = R3[K1('Create')]
  0004  GETTABUP  R4 = _ENV[K2('ESurpriseChestTriggerType')]
  0005  GETTABLE  R4 = R4[K3('Activity')]
  0006  GETTABLE  R5 = R0[K4('m_duration')]
  0007  MOVE      R6 = R0
  0008  MOVE      R7 = R0
  0009  SELF      R9 = R0[K5('GetType')] (self)
  0010  CALL      R8 = call(R8, -1 args, 1 rets)
  0011  TAILCALL  tailcall(R3, 0)
  0012  RETURN    return R3..R2
  0013  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 169-171 np=0 va=0 ms=2 code=5 consts=1 upvals=1 protos=0
    ;   K[0]='CanTriggerSurpriseChest'
    ;   upvals: self
    0000  GETUPVAL  R0 = self
    0001  SELF      R1 = R0[K0('CanTriggerSurpriseChest')] (self)
    0002  TAILCALL  tailcall(R0, 0)
    0003  RETURN    return R0..R-1
    0004  RETURN    return R0..R-1
  ; ---------- proto1 [] ----------
    ; fn ?  line 172-174 np=0 va=0 ms=2 code=4 consts=1 upvals=1 protos=0
    ;   K[0]='TriggerSurpriseChest'
    ;   upvals: self
    0000  GETUPVAL  R0 = self
    0001  SELF      R1 = R0[K0('TriggerSurpriseChest')] (self)
    0002  CALL      R0 = call(R0, 0 args, 1 rets)
    0003  RETURN    return R0..R-1
