# LuckyDay_Model_BaseLimitOrderRewardActivityModel_1245.luac
; fn @BaseLimitOrderRewardActivityModel.lua  line 0-0 np=0 va=1 ms=5 code=122 consts=51 upvals=1 protos=35
;   K[0]='TriggerDay'
;   K[1]='trigger_day'
;   K[2]='TriggerEndTime'
;   K[3]='end_time'
;   K[4]='FinishCount'
;   K[5]='finish_c'
;   K[6]='CurrentOrderId'
;   K[7]='order_id'
;   K[8]='DurationInSeconds'
;   K[9]='duration'
;   K[10]='BaseLimitOrderRewardActivityModel'
;   K[11]='setmetatable'
;   K[12]='bDailyTriggerOnce'
;   K[13]=true
;   K[14]='BaseActivityModel'
;   K[15]='__index'
;   K[16]='Init'
;   K[17]='_GetDefinition'
;   K[18]='GetMaxOrderNum'
;   K[19]='_LoadOtherServerConfig'
;   K[20]='_OnStateChanged'
;   K[21]='GetResourceLabels'
;   K[22]='GetConfigDurationInSeconds'
;   K[23]='GetTriggerDay'
;   K[24]='SetTriggerDay'
;   K[25]='GetTriggerEndTime'
;   K[26]='SetTriggerEndTime'
;   K[27]='GetFinishCount'
;   K[28]='SetFinishCount'
;   K[29]='GetCurrentOrderId'
;   K[30]='SetCurrentOrderId'
;   K[31]='UpdatePerSecond'
;   K[32]='IsInDuration'
;   K[33]='GetLeftDuration'
;   K[34]='CanTrigger'
;   K[35]='IsInProtectTime'
;   K[36]='TryTrigger'
;   K[37]='_OnTriggerSuccess'
;   K[38]='CanRefreshOrder'
;   K[39]='RefreshOrder'
;   K[40]='_OnRefreshOrderFinished'
;   K[41]='TryRefreshOrder'
;   K[42]='GetNextOrderId'
;   K[43]='_FilterNextOrder'
;   K[44]='_OnOrderFinished'
;   K[45]='_OnCurOrderFinished'
;   K[46]='_OnOrderGroupRefreshed'
;   K[47]='_OnBakeOutStateChanged'
;   K[48]='TryReplaceInvalidOrder'
;   K[49]='LogActivityRankUp'
;   K[50]='LogStarted'
;   upvals: _ENV
;   locals: DBKey(5-122), GeneralActivityKey(7-122)
0000  NEWTABLE  R0 = {} (0 items)
0001  SETTABLE  R0[K0('TriggerDay')] = K1('trigger_day')
0002  SETTABLE  R0[K2('TriggerEndTime')] = K3('end_time')
0003  SETTABLE  R0[K4('FinishCount')] = K5('finish_c')
0004  SETTABLE  R0[K6('CurrentOrderId')] = K7('order_id')
0005  NEWTABLE  R1 = {} (0 items)
0006  SETTABLE  R1[K8('DurationInSeconds')] = K9('duration')
0007  GETTABUP  R2 = _ENV[K11('setmetatable')]
0008  NEWTABLE  R3 = {} (0 items)
0009  SETTABLE  R3[K12('bDailyTriggerOnce')] = K13(true)
0010  GETTABUP  R4 = _ENV[K14('BaseActivityModel')]
0011  CALL      R2 = call(R2, 1 args, 2 rets)
0012  SETTABUP  _ENV[K10('BaseLimitOrderRewardActivityModel')] = R2
0013  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0014  GETTABUP  R3 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0015  SETTABLE  R2[K15('__index')] = R3
0016  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0017  CLOSURE   R3 = closure proto0
0018  SETTABLE  R2[K16('Init')] = R3
0019  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0020  CLOSURE   R3 = closure proto1
0021  SETTABLE  R2[K17('_GetDefinition')] = R3
0022  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0023  CLOSURE   R3 = closure proto2
0024  SETTABLE  R2[K18('GetMaxOrderNum')] = R3
0025  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0026  CLOSURE   R3 = closure proto3
0027  SETTABLE  R2[K19('_LoadOtherServerConfig')] = R3
0028  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0029  CLOSURE   R3 = closure proto4
0030  SETTABLE  R2[K20('_OnStateChanged')] = R3
0031  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0032  CLOSURE   R3 = closure proto5
0033  SETTABLE  R2[K21('GetResourceLabels')] = R3
0034  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0035  CLOSURE   R3 = closure proto6
0036  SETTABLE  R2[K22('GetConfigDurationInSeconds')] = R3
0037  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0038  CLOSURE   R3 = closure proto7
0039  SETTABLE  R2[K23('GetTriggerDay')] = R3
0040  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0041  CLOSURE   R3 = closure proto8
0042  SETTABLE  R2[K24('SetTriggerDay')] = R3
0043  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0044  CLOSURE   R3 = closure proto9
0045  SETTABLE  R2[K25('GetTriggerEndTime')] = R3
0046  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0047  CLOSURE   R3 = closure proto10
0048  SETTABLE  R2[K26('SetTriggerEndTime')] = R3
0049  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0050  CLOSURE   R3 = closure proto11
0051  SETTABLE  R2[K27('GetFinishCount')] = R3
0052  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0053  CLOSURE   R3 = closure proto12
0054  SETTABLE  R2[K28('SetFinishCount')] = R3
0055  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0056  CLOSURE   R3 = closure proto13
0057  SETTABLE  R2[K29('GetCurrentOrderId')] = R3
0058  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0059  CLOSURE   R3 = closure proto14
0060  SETTABLE  R2[K30('SetCurrentOrderId')] = R3
0061  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0062  CLOSURE   R3 = closure proto15
0063  SETTABLE  R2[K31('UpdatePerSecond')] = R3
0064  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0065  CLOSURE   R3 = closure proto16
0066  SETTABLE  R2[K32('IsInDuration')] = R3
0067  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0068  CLOSURE   R3 = closure proto17
0069  SETTABLE  R2[K33('GetLeftDuration')] = R3
0070  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0071  CLOSURE   R3 = closure proto18
0072  SETTABLE  R2[K34('CanTrigger')] = R3
0073  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0074  CLOSURE   R3 = closure proto19
0075  SETTABLE  R2[K35('IsInProtectTime')] = R3
0076  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0077  CLOSURE   R3 = closure proto20
0078  SETTABLE  R2[K36('TryTrigger')] = R3
0079  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0080  CLOSURE   R3 = closure proto21
0081  SETTABLE  R2[K37('_OnTriggerSuccess')] = R3
0082  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0083  CLOSURE   R3 = closure proto22
0084  SETTABLE  R2[K38('CanRefreshOrder')] = R3
0085  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0086  CLOSURE   R3 = closure proto23
0087  SETTABLE  R2[K39('RefreshOrder')] = R3
0088  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0089  CLOSURE   R3 = closure proto24
0090  SETTABLE  R2[K40('_OnRefreshOrderFinished')] = R3
0091  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0092  CLOSURE   R3 = closure proto25
0093  SETTABLE  R2[K41('TryRefreshOrder')] = R3
0094  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0095  CLOSURE   R3 = closure proto26
0096  SETTABLE  R2[K42('GetNextOrderId')] = R3
0097  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0098  CLOSURE   R3 = closure proto27
0099  SETTABLE  R2[K43('_FilterNextOrder')] = R3
0100  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0101  CLOSURE   R3 = closure proto28
0102  SETTABLE  R2[K44('_OnOrderFinished')] = R3
0103  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0104  CLOSURE   R3 = closure proto29
0105  SETTABLE  R2[K45('_OnCurOrderFinished')] = R3
0106  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0107  CLOSURE   R3 = closure proto30
0108  SETTABLE  R2[K46('_OnOrderGroupRefreshed')] = R3
0109  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0110  CLOSURE   R3 = closure proto31
0111  SETTABLE  R2[K47('_OnBakeOutStateChanged')] = R3
0112  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0113  CLOSURE   R3 = closure proto32
0114  SETTABLE  R2[K48('TryReplaceInvalidOrder')] = R3
0115  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0116  CLOSURE   R3 = closure proto33
0117  SETTABLE  R2[K49('LogActivityRankUp')] = R3
0118  GETTABUP  R2 = _ENV[K10('BaseLimitOrderRewardActivityModel')]
0119  CLOSURE   R3 = closure proto34
0120  SETTABLE  R2[K50('LogStarted')] = R3
0121  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 24-37 np=3 va=0 ms=7 code=60 consts=17 upvals=1 protos=0
  ;   K[0]='m_activityDefinition'
  ;   K[1]='_GetDefinition'
  ;   K[2]='BaseActivityModel'
  ;   K[3]='Init'
  ;   K[4]='EventDispatcher'
  ;   K[5]='AddListener'
  ;   K[6]='EEventType'
  ;   K[7]='OrderFinished'
  ;   K[8]='_OnOrderFinished'
  ;   K[9]='OrderGroupRefreshed'
  ;   K[10]='_OnOrderGroupRefreshed'
  ;   K[11]='ShowNewOrders'
  ;   K[12]='NewReleasedOrderGroupUnlocked'
  ;   K[13]='OnMainOrderCreated'
  ;   K[14]='BakeOutStateChanged'
  ;   K[15]='_OnBakeOutStateChanged'
  ;   K[16]='BakeOutModeChanged'
  ;   upvals: _ENV
  ;   locals: self(0-60), activityType(0-60), virtualDBTable(0-60)
  0000  SELF      R4 = R0[K1('_GetDefinition')] (self)
  0001  MOVE      R5 = R0
  0002  CALL      R3 = call(R3, 1 args, 2 rets)
  0003  SETTABLE  R0[K0('m_activityDefinition')] = R3
  0004  GETTABUP  R3 = _ENV[K2('BaseActivityModel')]
  0005  GETTABLE  R3 = R3[K3('Init')]
  0006  MOVE      R4 = R0
  0007  MOVE      R5 = R0
  0008  MOVE      R6 = R0
  0009  CALL      R3 = call(R3, 0 args, 3 rets)
  0010  GETTABUP  R3 = _ENV[K4('EventDispatcher')]
  0011  GETTABLE  R3 = R3[K5('AddListener')]
  0012  GETTABUP  R4 = _ENV[K6('EEventType')]
  0013  GETTABLE  R4 = R4[K7('OrderFinished')]
  0014  MOVE      R5 = R0
  0015  GETTABLE  R6 = R0[K8('_OnOrderFinished')]
  0016  CALL      R3 = call(R3, 0 args, 3 rets)
  0017  GETTABUP  R3 = _ENV[K4('EventDispatcher')]
  0018  GETTABLE  R3 = R3[K5('AddListener')]
  0019  GETTABUP  R4 = _ENV[K6('EEventType')]
  0020  GETTABLE  R4 = R4[K9('OrderGroupRefreshed')]
  0021  MOVE      R5 = R0
  0022  GETTABLE  R6 = R0[K10('_OnOrderGroupRefreshed')]
  0023  CALL      R3 = call(R3, 0 args, 3 rets)
  0024  GETTABUP  R3 = _ENV[K4('EventDispatcher')]
  0025  GETTABLE  R3 = R3[K5('AddListener')]
  0026  GETTABUP  R4 = _ENV[K6('EEventType')]
  0027  GETTABLE  R4 = R4[K11('ShowNewOrders')]
  0028  MOVE      R5 = R0
  0029  GETTABLE  R6 = R0[K10('_OnOrderGroupRefreshed')]
  0030  CALL      R3 = call(R3, 0 args, 3 rets)
  0031  GETTABUP  R3 = _ENV[K4('EventDispatcher')]
  0032  GETTABLE  R3 = R3[K5('AddListener')]
  0033  GETTABUP  R4 = _ENV[K6('EEventType')]
  0034  GETTABLE  R4 = R4[K12('NewReleasedOrderGroupUnlocked')]
  0035  MOVE      R5 = R0
  0036  GETTABLE  R6 = R0[K10('_OnOrderGroupRefreshed')]
  0037  CALL      R3 = call(R3, 0 args, 3 rets)
  0038  GETTABUP  R3 = _ENV[K4('EventDispatcher')]
  0039  GETTABLE  R3 = R3[K5('AddListener')]
  0040  GETTABUP  R4 = _ENV[K6('EEventType')]
  0041  GETTABLE  R4 = R4[K13('OnMainOrderCreated')]
  0042  MOVE      R5 = R0
  0043  GETTABLE  R6 = R0[K10('_OnOrderGroupRefreshed')]
  0044  CALL      R3 = call(R3, 0 args, 3 rets)
  0045  GETTABUP  R3 = _ENV[K4('EventDispatcher')]
  0046  GETTABLE  R3 = R3[K5('AddListener')]
  0047  GETTABUP  R4 = _ENV[K6('EEventType')]
  0048  GETTABLE  R4 = R4[K14('BakeOutStateChanged')]
  0049  MOVE      R5 = R0
  0050  GETTABLE  R6 = R0[K15('_OnBakeOutStateChanged')]
  0051  CALL      R3 = call(R3, 0 args, 3 rets)
  0052  GETTABUP  R3 = _ENV[K4('EventDispatcher')]
  0053  GETTABLE  R3 = R3[K5('AddListener')]
  0054  GETTABUP  R4 = _ENV[K6('EEventType')]
  0055  GETTABLE  R4 = R4[K16('BakeOutModeChanged')]
  0056  MOVE      R5 = R0
  0057  GETTABLE  R6 = R0[K15('_OnBakeOutStateChanged')]
  0058  CALL      R3 = call(R3, 0 args, 3 rets)
  0059  RETURN    return R0..R-1
; ---------- proto1 [_GetDefinition] ----------
  ; fn ?  line 39-41 np=2 va=0 ms=4 code=5 consts=3 upvals=1 protos=0
  ;   K[0]='Log'
  ;   K[1]='Error'
  ;   K[2]='[BaseLimitOrderRewardActivityModel] _GetDefinition 必须重写此接口'
  ;   upvals: _ENV
  ;   locals: self(0-5), activityType(0-5)
  0000  GETTABUP  R2 = _ENV[K0('Log')]
  0001  GETTABLE  R2 = R2[K1('Error')]
  0002  LOADK     R3 = K2 '[BaseLimitOrderRewardActivityModel] _GetDefinition 必须重写此接口'
  0003  CALL      R2 = call(R2, 0 args, 1 rets)
  0004  RETURN    return R0..R-1
; ---------- proto2 [GetMaxOrderNum] ----------
  ; fn ?  line 43-46 np=1 va=0 ms=3 code=7 consts=4 upvals=1 protos=0
  ;   K[0]='Log'
  ;   K[1]='Error'
  ;   K[2]='[BaseLimitOrderRewardActivityModel] GetMaxOrderNum 必须重写此接口'
  ;   K[3]=0
  ;   upvals: _ENV
  ;   locals: self(0-7)
  0000  GETTABUP  R1 = _ENV[K0('Log')]
  0001  GETTABLE  R1 = R1[K1('Error')]
  0002  LOADK     R2 = K2 '[BaseLimitOrderRewardActivityModel] GetMaxOrderNum 必须重写此接口'
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  LOADK     R1 = K3 0
  0005  RETURN    return R1..R0
  0006  RETURN    return R0..R-1
; ---------- proto3 [_LoadOtherServerConfig] ----------
  ; fn ?  line 48-49 np=2 va=0 ms=2 code=1 consts=0 upvals=0 protos=0
  ;   locals: self(0-1), config(0-1)
  0000  RETURN    return R0..R-1
; ---------- proto4 [_OnStateChanged] ----------
  ; fn ?  line 51-55 np=1 va=0 ms=3 code=10 consts=6 upvals=1 protos=0
  ;   K[0]='BaseActivityModel'
  ;   K[1]='_OnStateChanged'
  ;   K[2]='EventDispatcher'
  ;   K[3]='DispatchEvent'
  ;   K[4]='m_activityDefinition'
  ;   K[5]='StateChangedEvent'
  ;   upvals: _ENV
  ;   locals: self(0-10)
  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  GETTABUP  R1 = _ENV[K2('EventDispatcher')]
  0005  GETTABLE  R1 = R1[K3('DispatchEvent')]
  0006  GETTABLE  R2 = R0[K4('m_activityDefinition')]
  0007  GETTABLE  R2 = R2[K5('StateChangedEvent')]
  0008  CALL      R1 = call(R1, 0 args, 1 rets)
  0009  RETURN    return R0..R-1
; ---------- proto5 [GetResourceLabels] ----------
  ; fn ?  line 57-59 np=1 va=0 ms=2 code=4 consts=2 upvals=0 protos=0
  ;   K[0]='m_activityDefinition'
  ;   K[1]='ResourceLabels'
  ;   locals: self(0-4)
  0000  GETTABLE  R1 = R0[K0('m_activityDefinition')]
  0001  GETTABLE  R1 = R1[K1('ResourceLabels')]
  0002  RETURN    return R1..R0
  0003  RETURN    return R0..R-1
; ---------- proto6 [GetConfigDurationInSeconds] ----------
  ; fn ?  line 62-64 np=1 va=0 ms=5 code=10 consts=5 upvals=2 protos=0
  ;   K[0]='GetGeneralConfig'
  ;   K[1]='DurationInSeconds'
  ;   K[2]='EConfigParamType'
  ;   K[3]='Int'
  ;   K[4]=3600
  ;   upvals: GeneralActivityKey, _ENV
  ;   locals: self(0-10)
  0000  SELF      R2 = R0[K0('GetGeneralConfig')] (self)
  0001  GETTABUP  R3 = GeneralActivityKey[K1('DurationInSeconds')]
  0002  GETTABUP  R4 = _ENV[K2('EConfigParamType')]
  0003  GETTABLE  R4 = R4[K3('Int')]
  0004  CALL      R1 = call(R1, 1 args, 3 rets)
  0005  TEST      if not R1 then   -> -131064
  0006  JMP       (jump)   -> 8
  0007  LOADK     R1 = K4 3600
  0008  RETURN    return R1..R0
  0009  RETURN    return R0..R-1
; ---------- proto7 [GetTriggerDay] ----------
  ; fn ?  line 68-70 np=1 va=0 ms=6 code=12 consts=6 upvals=2 protos=0
  ;   K[0]='tonumber'
  ;   K[1]='m_dbTable'
  ;   K[2]='GetValue'
  ;   K[3]='TriggerDay'
  ;   K[4]='DB_VALUE_KEY'
  ;   K[5]=0
  ;   upvals: _ENV, DBKey
  ;   locals: self(0-12)
  0000  GETTABUP  R1 = _ENV[K0('tonumber')]
  0001  GETTABLE  R2 = R0[K1('m_dbTable')]
  0002  SELF      R3 = R2[K2('GetValue')] (self)
  0003  GETTABUP  R4 = DBKey[K3('TriggerDay')]
  0004  GETTABUP  R5 = _ENV[K4('DB_VALUE_KEY')]
  0005  CALL      R2 = call(R2, -1 args, 3 rets)
  0006  CALL      R1 = call(R1, 1 args, -1 rets)
  0007  TEST      if not R1 then   -> -131062
  0008  JMP       (jump)   -> 10
  0009  LOADK     R1 = K5 0
  0010  RETURN    return R1..R0
  0011  RETURN    return R0..R-1
; ---------- proto8 [SetTriggerDay] ----------
  ; fn ?  line 72-74 np=2 va=0 ms=7 code=7 consts=4 upvals=2 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='Set'
  ;   K[2]='TriggerDay'
  ;   K[3]='DB_VALUE_KEY'
  ;   upvals: DBKey, _ENV
  ;   locals: self(0-7), triggerDay(0-7)
  0000  GETTABLE  R2 = R0[K0('m_dbTable')]
  0001  SELF      R3 = R2[K1('Set')] (self)
  0002  GETTABUP  R4 = DBKey[K2('TriggerDay')]
  0003  GETTABUP  R5 = _ENV[K3('DB_VALUE_KEY')]
  0004  MOVE      R6 = R0
  0005  CALL      R2 = call(R2, 0 args, 4 rets)
  0006  RETURN    return R0..R-1
; ---------- proto9 [GetTriggerEndTime] ----------
  ; fn ?  line 76-78 np=1 va=0 ms=6 code=12 consts=6 upvals=2 protos=0
  ;   K[0]='tonumber'
  ;   K[1]='m_dbTable'
  ;   K[2]='GetValue'
  ;   K[3]='TriggerEndTime'
  ;   K[4]='DB_VALUE_KEY'
  ;   K[5]=0
  ;   upvals: _ENV, DBKey
  ;   locals: self(0-12)
  0000  GETTABUP  R1 = _ENV[K0('tonumber')]
  0001  GETTABLE  R2 = R0[K1('m_dbTable')]
  0002  SELF      R3 = R2[K2('GetValue')] (self)
  0003  GETTABUP  R4 = DBKey[K3('TriggerEndTime')]
  0004  GETTABUP  R5 = _ENV[K4('DB_VALUE_KEY')]
  0005  CALL      R2 = call(R2, -1 args, 3 rets)
  0006  CALL      R1 = call(R1, 1 args, -1 rets)
  0007  TEST      if not R1 then   -> -131062
  0008  JMP       (jump)   -> 10
  0009  LOADK     R1 = K5 0
  0010  RETURN    return R1..R0
  0011  RETURN    return R0..R-1
; ---------- proto10 [SetTriggerEndTime] ----------
  ; fn ?  line 80-82 np=2 va=0 ms=7 code=7 consts=4 upvals=2 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='Set'
  ;   K[2]='TriggerEndTime'
  ;   K[3]='DB_VALUE_KEY'
  ;   upvals: DBKey, _ENV
  ;   locals: self(0-7), triggerEndTime(0-7)
  0000  GETTABLE  R2 = R0[K0('m_dbTable')]
  0001  SELF      R3 = R2[K1('Set')] (self)
  0002  GETTABUP  R4 = DBKey[K2('TriggerEndTime')]
  0003  GETTABUP  R5 = _ENV[K3('DB_VALUE_KEY')]
  0004  MOVE      R6 = R0
  0005  CALL      R2 = call(R2, 0 args, 4 rets)
  0006  RETURN    return R0..R-1
; ---------- proto11 [GetFinishCount] ----------
  ; fn ?  line 84-86 np=1 va=0 ms=6 code=12 consts=6 upvals=2 protos=0
  ;   K[0]='tonumber'
  ;   K[1]='m_dbTable'
  ;   K[2]='GetValue'
  ;   K[3]='FinishCount'
  ;   K[4]='DB_VALUE_KEY'
  ;   K[5]=0
  ;   upvals: _ENV, DBKey
  ;   locals: self(0-12)
  0000  GETTABUP  R1 = _ENV[K0('tonumber')]
  0001  GETTABLE  R2 = R0[K1('m_dbTable')]
  0002  SELF      R3 = R2[K2('GetValue')] (self)
  0003  GETTABUP  R4 = DBKey[K3('FinishCount')]
  0004  GETTABUP  R5 = _ENV[K4('DB_VALUE_KEY')]
  0005  CALL      R2 = call(R2, -1 args, 3 rets)
  0006  CALL      R1 = call(R1, 1 args, -1 rets)
  0007  TEST      if not R1 then   -> -131062
  0008  JMP       (jump)   -> 10
  0009  LOADK     R1 = K5 0
  0010  RETURN    return R1..R0
  0011  RETURN    return R0..R-1
; ---------- proto12 [SetFinishCount] ----------
  ; fn ?  line 88-90 np=2 va=0 ms=7 code=7 consts=4 upvals=2 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='Set'
  ;   K[2]='FinishCount'
  ;   K[3]='DB_VALUE_KEY'
  ;   upvals: DBKey, _ENV
  ;   locals: self(0-7), finishCount(0-7)
  0000  GETTABLE  R2 = R0[K0('m_dbTable')]
  0001  SELF      R3 = R2[K1('Set')] (self)
  0002  GETTABUP  R4 = DBKey[K2('FinishCount')]
  0003  GETTABUP  R5 = _ENV[K3('DB_VALUE_KEY')]
  0004  MOVE      R6 = R0
  0005  CALL      R2 = call(R2, 0 args, 4 rets)
  0006  RETURN    return R0..R-1
; ---------- proto13 [GetCurrentOrderId] ----------
  ; fn ?  line 92-98 np=1 va=0 ms=5 code=15 consts=7 upvals=2 protos=0
  ;   K[0]='GetFinishCount'
  ;   K[1]='GetMaxOrderNum'
  ;   K[2]=''
  ;   K[3]='m_dbTable'
  ;   K[4]='GetValue'
  ;   K[5]='CurrentOrderId'
  ;   K[6]='DB_VALUE_KEY'
  ;   upvals: DBKey, _ENV
  ;   locals: self(0-15)
  0000  SELF      R2 = R0[K0('GetFinishCount')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  SELF      R3 = R0[K1('GetMaxOrderNum')] (self)
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  LE        if R0 le R1   -> -130041
  0005  JMP       (jump)   -> 8
  0006  LOADK     R1 = K2 ''
  0007  RETURN    return R1..R0
  0008  GETTABLE  R1 = R0[K3('m_dbTable')]
  0009  SELF      R2 = R1[K4('GetValue')] (self)
  0010  GETTABUP  R3 = DBKey[K5('CurrentOrderId')]
  0011  GETTABUP  R4 = _ENV[K6('DB_VALUE_KEY')]
  0012  TAILCALL  tailcall(R1, 0)
  0013  RETURN    return R1..R0
  0014  RETURN    return R0..R-1
; ---------- proto14 [SetCurrentOrderId] ----------
  ; fn ?  line 100-102 np=2 va=0 ms=7 code=7 consts=4 upvals=2 protos=0
  ;   K[0]='m_dbTable'
  ;   K[1]='Set'
  ;   K[2]='CurrentOrderId'
  ;   K[3]='DB_VALUE_KEY'
  ;   upvals: DBKey, _ENV
  ;   locals: self(0-7), currentOrderId(0-7)
  0000  GETTABLE  R2 = R0[K0('m_dbTable')]
  0001  SELF      R3 = R2[K1('Set')] (self)
  0002  GETTABUP  R4 = DBKey[K2('CurrentOrderId')]
  0003  GETTABUP  R5 = _ENV[K3('DB_VALUE_KEY')]
  0004  MOVE      R6 = R0
  0005  CALL      R2 = call(R2, 0 args, 4 rets)
  0006  RETURN    return R0..R-1
; ---------- proto15 [UpdatePerSecond] ----------
  ; fn ?  line 105-113 np=1 va=0 ms=4 code=16 consts=8 upvals=1 protos=0
  ;   K[0]='BaseActivityModel'
  ;   K[1]='UpdatePerSecond'
  ;   K[2]='IsInDuration'
  ;   K[3]='m_bInDuration'
  ;   K[4]='EventDispatcher'
  ;   K[5]='DispatchEvent'
  ;   K[6]='m_activityDefinition'
  ;   K[7]='OrderStateChangedEvent'
  ;   upvals: _ENV
  ;   locals: self(0-16), bInDuration(6-16)
  0000  GETTABUP  R1 = _ENV[K0('BaseActivityModel')]
  0001  GETTABLE  R1 = R1[K1('UpdatePerSecond')]
  0002  MOVE      R2 = R0
  0003  CALL      R1 = call(R1, 0 args, 1 rets)
  0004  SELF      R2 = R0[K2('IsInDuration')] (self)
  0005  CALL      R1 = call(R1, 1 args, 1 rets)
  0006  GETTABLE  R2 = R0[K3('m_bInDuration')]
  0007  EQ        if R1 eq R1   -> -130038
  0008  JMP       (jump)   -> 15
  0009  SETTABLE  R0[K3('m_bInDuration')] = R1
  0010  GETTABUP  R2 = _ENV[K4('EventDispatcher')]
  0011  GETTABLE  R2 = R2[K5('DispatchEvent')]
  0012  GETTABLE  R3 = R0[K6('m_activityDefinition')]
  0013  GETTABLE  R3 = R3[K7('OrderStateChangedEvent')]
  0014  CALL      R2 = call(R2, 0 args, 1 rets)
  0015  RETURN    return R0..R-1
; ---------- proto16 [IsInDuration] ----------
  ; fn ?  line 116-118 np=1 va=0 ms=3 code=8 consts=2 upvals=0 protos=0
  ;   K[0]='GetLeftDuration'
  ;   K[1]=0
  ;   locals: self(0-8)
  0000  SELF      R2 = R0[K0('GetLeftDuration')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  LT        if R1 lt R1   -> 517
  0003  JMP       (jump)   -> 5
  0004  LOADBOOL  R1 = false
  0005  LOADBOOL  R1 = true
  0006  RETURN    return R1..R0
  0007  RETURN    return R0..R-1
; ---------- proto17 [GetLeftDuration] ----------
  ; fn ?  line 121-125 np=1 va=0 ms=6 code=13 consts=7 upvals=1 protos=0
  ;   K[0]='GM'
  ;   K[1]='GameModel'
  ;   K[2]='GetServerTime'
  ;   K[3]='GetTriggerEndTime'
  ;   K[4]='math'
  ;   K[5]='max'
  ;   K[6]=0
  ;   upvals: _ENV
  ;   locals: self(0-13), serverTime(4-13), triggerEndTime(6-13)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('GameModel')]
  0002  SELF      R2 = R1[K2('GetServerTime')] (self)
  0003  CALL      R1 = call(R1, 1 args, 1 rets)
  0004  SELF      R3 = R0[K3('GetTriggerEndTime')] (self)
  0005  CALL      R2 = call(R2, 1 args, 1 rets)
  0006  GETTABUP  R3 = _ENV[K4('math')]
  0007  GETTABLE  R3 = R3[K5('max')]
  0008  SUB       R4 = R1 sub R2
  0009  LOADK     R5 = K6 0
  0010  TAILCALL  tailcall(R3, 0)
  0011  RETURN    return R3..R2
  0012  RETURN    return R0..R-1
; ---------- proto18 [CanTrigger] ----------
  ; fn ?  line 128-157 np=1 va=0 ms=5 code=46 consts=13 upvals=1 protos=0
  ;   K[0]='GetState'
  ;   K[1]='ActivityState'
  ;   K[2]='Started'
  ;   K[3]='Ended'
  ;   K[4]='IsInDuration'
  ;   K[5]='bDailyTriggerOnce'
  ;   K[6]='GM'
  ;   K[7]='GameModel'
  ;   K[8]='GetServerDay'
  ;   K[9]='GetTriggerDay'
  ;   K[10]='GetNextOrderId'
  ;   K[11]=nil
  ;   K[12]='IsInProtectTime'
  ;   upvals: _ENV
  ;   locals: self(0-46), state(2-46), serverDay(25-31)
  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)   -> 12
  0006  GETTABUP  R2 = _ENV[K1('ActivityState')]
  0007  GETTABLE  R2 = R2[K3('Ended')]
  0008  EQ        if R1 eq R2   -> -130548
  0009  JMP       (jump)   -> 12
  0010  LOADBOOL  R2 = false
  0011  RETURN    return R2..R1
  0012  SELF      R3 = R0[K4('IsInDuration')] (self)
  0013  CALL      R2 = call(R2, 1 args, 1 rets)
  0014  TEST      if not R2 then   -> -131056
  0015  JMP       (jump)   -> 18
  0016  LOADBOOL  R2 = false
  0017  RETURN    return R2..R1
  0018  GETTABLE  R2 = R0[K5('bDailyTriggerOnce')]
  0019  TEST      if not R2 then   -> -131051
  0020  JMP       (jump)   -> 31
  0021  GETTABUP  R2 = _ENV[K6('GM')]
  0022  GETTABLE  R2 = R2[K7('GameModel')]
  0023  SELF      R3 = R2[K8('GetServerDay')] (self)
  0024  CALL      R2 = call(R2, 1 args, 1 rets)
  0025  SELF      R4 = R0[K9('GetTriggerDay')] (self)
  0026  CALL      R3 = call(R3, 1 args, 1 rets)
  0027  LE        if R0 le R3   -> -130016
  0028  JMP       (jump)   -> 31
  0029  LOADBOOL  R3 = false
  0030  RETURN    return R3..R2
  0031  SELF      R3 = R0[K10('GetNextOrderId')] (self)
  0032  CALL      R2 = call(R2, 1 args, 1 rets)
  0033  EQ        if R0 eq K11(nil)   -> -129746
  0034  JMP       (jump)   -> 37
  0035  LOADBOOL  R2 = false
  0036  RETURN    return R2..R1
  0037  SELF      R3 = R0[K12('IsInProtectTime')] (self)
  0038  CALL      R2 = call(R2, 1 args, 1 rets)
  0039  TEST      if not R2 then   -> -131031
  0040  JMP       (jump)   -> 43
  0041  LOADBOOL  R2 = false
  0042  RETURN    return R2..R1
  0043  LOADBOOL  R2 = true
  0044  RETURN    return R2..R1
  0045  RETURN    return R0..R-1
; ---------- proto19 [IsInProtectTime] ----------
  ; fn ?  line 159-162 np=1 va=0 ms=4 code=15 consts=5 upvals=1 protos=0
  ;   K[0]='GetEndTime'
  ;   K[1]='GM'
  ;   K[2]='GameModel'
  ;   K[3]='GetServerTime'
  ;   K[4]='GetConfigDurationInSeconds'
  ;   upvals: _ENV
  ;   locals: self(0-15)
  0000  SELF      R2 = R0[K0('GetEndTime')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  GETTABUP  R2 = _ENV[K1('GM')]
  0003  GETTABLE  R2 = R2[K2('GameModel')]
  0004  SELF      R3 = R2[K3('GetServerTime')] (self)
  0005  CALL      R2 = call(R2, 1 args, 1 rets)
  0006  SUB       R1 = R2 sub R1
  0007  SELF      R3 = R0[K4('GetConfigDurationInSeconds')] (self)
  0008  CALL      R2 = call(R2, 1 args, 1 rets)
  0009  LT        if R1 lt R2   -> -130547
  0010  JMP       (jump)   -> 12
  0011  LOADBOOL  R1 = false
  0012  LOADBOOL  R1 = true
  0013  RETURN    return R1..R0
  0014  RETURN    return R0..R-1
; ---------- proto20 [TryTrigger] ----------
  ; fn ?  line 165-189 np=2 va=0 ms=7 code=47 consts=22 upvals=1 protos=0
  ;   K[0]='CanTrigger'
  ;   K[1]='bDailyTriggerOnce'
  ;   K[2]='SetTriggerDay'
  ;   K[3]='GM'
  ;   K[4]='GameModel'
  ;   K[5]='GetServerDay'
  ;   K[6]='SetTriggerEndTime'
  ;   K[7]='GetServerTime'
  ;   K[8]='GetConfigDurationInSeconds'
  ;   K[9]='SetFinishCount'
  ;   K[10]=0
  ;   K[11]='m_bInDuration'
  ;   K[12]=true
  ;   K[13]='m_lastShowFinishCount'
  ;   K[14]=nil
  ;   K[15]='RefreshOrder'
  ;   K[16]='_OnTriggerSuccess'
  ;   K[17]='LogActivityRankUp'
  ;   K[18]='EventDispatcher'
  ;   K[19]='DispatchEvent'
  ;   K[20]='m_activityDefinition'
  ;   K[21]='OrderStateChangedEvent'
  ;   upvals: _ENV
  ;   locals: self(0-47), successCallback(0-47)
  0000  SELF      R3 = R0[K0('CanTrigger')] (self)
  0001  CALL      R2 = call(R2, 1 args, 1 rets)
  0002  TEST      if not R2 then   -> -131067
  0003  JMP       (jump)   -> 6
  0004  LOADBOOL  R2 = false
  0005  RETURN    return R2..R1
  0006  GETTABLE  R2 = R0[K1('bDailyTriggerOnce')]
  0007  TEST      if not R2 then   -> -131063
  0008  JMP       (jump)   -> 15
  0009  SELF      R3 = R0[K2('SetTriggerDay')] (self)
  0010  GETTABUP  R4 = _ENV[K3('GM')]
  0011  GETTABLE  R4 = R4[K4('GameModel')]
  0012  SELF      R5 = R4[K5('GetServerDay')] (self)
  0013  CALL      R4 = call(R4, -1 args, 1 rets)
  0014  CALL      R2 = call(R2, 0 args, -1 rets)
  0015  SELF      R3 = R0[K6('SetTriggerEndTime')] (self)
  0016  GETTABUP  R4 = _ENV[K3('GM')]
  0017  GETTABLE  R4 = R4[K4('GameModel')]
  0018  SELF      R5 = R4[K7('GetServerTime')] (self)
  0019  CALL      R4 = call(R4, 1 args, 1 rets)
  0020  SELF      R6 = R0[K8('GetConfigDurationInSeconds')] (self)
  0021  CALL      R5 = call(R5, 1 args, 1 rets)
  0022  ADD       R4 = R5 add R4
  0023  CALL      R2 = call(R2, 0 args, 2 rets)
  0024  SELF      R3 = R0[K9('SetFinishCount')] (self)
  0025  LOADK     R4 = K10 0
  0026  CALL      R2 = call(R2, 0 args, 2 rets)
  0027  SETTABLE  R0[K11('m_bInDuration')] = K12(true)
  0028  SETTABLE  R0[K13('m_lastShowFinishCount')] = K14(nil)
  0029  SELF      R3 = R0[K15('RefreshOrder')] (self)
  0030  CALL      R2 = call(R2, 0 args, 1 rets)
  0031  SELF      R3 = R0[K16('_OnTriggerSuccess')] (self)
  0032  CALL      R2 = call(R2, 0 args, 1 rets)
  0033  SELF      R3 = R0[K17('LogActivityRankUp')] (self)
  0034  CALL      R2 = call(R2, 0 args, 1 rets)
  0035  EQ        if R1 eq K14(nil)   -> -130253
  0036  JMP       (jump)   -> 39
  0037  MOVE      R2 = R0
  0038  CALL      R2 = call(R2, 0 args, 0 rets)
  0039  GETTABUP  R2 = _ENV[K18('EventDispatcher')]
  0040  GETTABLE  R2 = R2[K19('DispatchEvent')]
  0041  GETTABLE  R3 = R0[K20('m_activityDefinition')]
  0042  GETTABLE  R3 = R3[K21('OrderStateChangedEvent')]
  0043  CALL      R2 = call(R2, 0 args, 1 rets)
  0044  LOADBOOL  R2 = true
  0045  RETURN    return R2..R1
  0046  RETURN    return R0..R-1
; ---------- proto21 [_OnTriggerSuccess] ----------
  ; fn ?  line 191-192 np=1 va=0 ms=2 code=1 consts=0 upvals=0 protos=0
  ;   locals: self(0-1)
  0000  RETURN    return R0..R-1
; ---------- proto22 [CanRefreshOrder] ----------
  ; fn ?  line 194-200 np=1 va=0 ms=4 code=28 consts=10 upvals=1 protos=0
  ;   K[0]='GetState'
  ;   K[1]='ActivityState'
  ;   K[2]='Started'
  ;   K[3]='IsInDuration'
  ;   K[4]='GetCurrentOrderId'
  ;   K[5]=''
  ;   K[6]='GetNextOrderId'
  ;   K[7]=nil
  ;   K[8]='GetFinishCount'
  ;   K[9]='GetMaxOrderNum'
  ;   upvals: _ENV
  ;   locals: self(0-28)
  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 R0 eq R2   -> -130552
  0005  JMP       (jump)   -> 24
  0006  SELF      R2 = R0[K3('IsInDuration')] (self)
  0007  CALL      R1 = call(R1, 1 args, 1 rets)
  0008  TEST      if not R1 then   -> -131062
  0009  JMP       (jump)   -> 26
  0010  SELF      R2 = R0[K4('GetCurrentOrderId')] (self)
  0011  CALL      R1 = call(R1, 1 args, 1 rets)
  0012  EQ        if R0 eq K5('')   -> -130285
  0013  JMP       (jump)   -> 24
  0014  SELF      R2 = R0[K6('GetNextOrderId')] (self)
  0015  CALL      R1 = call(R1, 1 args, 1 rets)
  0016  EQ        if R1 eq K7(nil)   -> -130279
  0017  JMP       (jump)   -> 24
  0018  SELF      R2 = R0[K8('GetFinishCount')] (self)
  0019  CALL      R1 = call(R1, 1 args, 1 rets)
  0020  SELF      R3 = R0[K9('GetMaxOrderNum')] (self)
  0021  CALL      R2 = call(R2, 1 args, 1 rets)
  0022  LT        if R1 lt R2   -> -130534
  0023  JMP       (jump)   -> 25
  0024  LOADBOOL  R1 = false
  0025  LOADBOOL  R1 = true
  0026  RETURN    return R1..R0
  0027  RETURN    return R0..R-1
; ---------- proto23 [RefreshOrder] ----------
  ; fn ?  line 202-213 np=1 va=0 ms=5 code=16 consts=4 upvals=0 protos=0
  ;   K[0]='GetNextOrderId'
  ;   K[1]=''
  ;   K[2]='SetCurrentOrderId'
  ;   K[3]='_OnRefreshOrderFinished'
  ;   locals: self(0-16), nextOrderId(2-16)
  0000  SELF      R2 = R0[K0('GetNextOrderId')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  TEST      if not R1 then   -> -131067
  0003  JMP       (jump)   -> 5
  0004  LOADK     R1 = K1 ''
  0005  SELF      R3 = R0[K2('SetCurrentOrderId')] (self)
  0006  MOVE      R4 = R0
  0007  CALL      R2 = call(R2, 0 args, 2 rets)
  0008  SELF      R3 = R0[K3('_OnRefreshOrderFinished')] (self)
  0009  CALL      R2 = call(R2, 0 args, 1 rets)
  0010  EQ        if R0 eq K1('')   -> -130291
  0011  JMP       (jump)   -> 13
  0012  LOADBOOL  R2 = false
  0013  LOADBOOL  R2 = true
  0014  RETURN    return R2..R1
  0015  RETURN    return R0..R-1
; ---------- proto24 [_OnRefreshOrderFinished] ----------
  ; fn ?  line 216-217 np=1 va=0 ms=2 code=1 consts=0 upvals=0 protos=0
  ;   locals: self(0-1)
  0000  RETURN    return R0..R-1
; ---------- proto25 [TryRefreshOrder] ----------
  ; fn ?  line 219-232 np=2 va=0 ms=5 code=21 consts=7 upvals=1 protos=0
  ;   K[0]='CanRefreshOrder'
  ;   K[1]='RefreshOrder'
  ;   K[2]=nil
  ;   K[3]='EventDispatcher'
  ;   K[4]='DispatchEvent'
  ;   K[5]='m_activityDefinition'
  ;   K[6]='OrderStateChangedEvent'
  ;   upvals: _ENV
  ;   locals: self(0-21), successCallback(0-21), bSuccess(6-18)
  0000  SELF      R3 = R0[K0('CanRefreshOrder')] (self)
  0001  CALL      R2 = call(R2, 1 args, 1 rets)
  0002  TEST      if not R2 then   -> -131068
  0003  JMP       (jump)   -> 18
  0004  SELF      R3 = R0[K1('RefreshOrder')] (self)
  0005  CALL      R2 = call(R2, 1 args, 1 rets)
  0006  TEST      if not R2 then   -> -131064
  0007  JMP       (jump)   -> 17
  0008  EQ        if R1 eq K2(nil)   -> -130292
  0009  JMP       (jump)   -> 12
  0010  MOVE      R3 = R0
  0011  CALL      R3 = call(R3, 0 args, 0 rets)
  0012  GETTABUP  R3 = _ENV[K3('EventDispatcher')]
  0013  GETTABLE  R3 = R3[K4('DispatchEvent')]
  0014  GETTABLE  R4 = R0[K5('m_activityDefinition')]
  0015  GETTABLE  R4 = R4[K6('OrderStateChangedEvent')]
  0016  CALL      R3 = call(R3, 0 args, 1 rets)
  0017  RETURN    return R2..R1
  0018  LOADBOOL  R2 = false
  0019  RETURN    return R2..R1
  0020  RETURN    return R0..R-1
; ---------- proto26 [GetNextOrderId] ----------
  ; fn ?  line 238-243 np=1 va=0 ms=4 code=14 consts=4 upvals=1 protos=1
  ;   K[0]='GM'
  ;   K[1]='MainBoardModel'
  ;   K[2]='GetNextEnergyDiffOrder'
  ;   K[3]='GetId'
  ;   upvals: _ENV
  ;   locals: self(0-14), nextOrder(5-14)
  0000  GETTABUP  R1 = _ENV[K0('GM')]
  0001  GETTABLE  R1 = R1[K1('MainBoardModel')]
  0002  SELF      R2 = R1[K2('GetNextEnergyDiffOrder')] (self)
  0003  CLOSURE   R3 = closure proto0
  0004  CALL      R1 = call(R1, 1 args, 2 rets)
  0005  TEST      if not R1 then   -> -131065
  0006  JMP       (jump)   -> 11
  0007  SELF      R3 = R1[K3('GetId')] (self)
  0008  CALL      R2 = call(R2, 1 args, 1 rets)
  0009  TEST      if not R2 then   -> -131060
  0010  JMP       (jump)   -> 12
  0011  LOADNIL   R2..R2 = nil
  0012  RETURN    return R2..R1
  0013  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 239-241 np=1 va=0 ms=4 code=6 consts=1 upvals=1 protos=0
    ;   K[0]='_FilterNextOrder'
    ;   upvals: self
    ;   locals: order(0-6)
    0000  GETUPVAL  R1 = self
    0001  SELF      R2 = R1[K0('_FilterNextOrder')] (self)
    0002  MOVE      R3 = R0
    0003  TAILCALL  tailcall(R1, 0)
    0004  RETURN    return R1..R0
    0005  RETURN    return R0..R-1
; ---------- proto27 [_FilterNextOrder] ----------
  ; fn ?  line 245-259 np=2 va=0 ms=9 code=28 consts=8 upvals=1 protos=0
  ;   K[0]='GetState'
  ;   K[1]='OrderState'
  ;   K[2]='CanDeliver'
  ;   K[3]='ipairs'
  ;   K[4]='GetRequirementFillStates'
  ;   K[5]='ERequirementFillState'
  ;   K[6]='Cooked'
  ;   K[7]='Filled'
  ;   upvals: _ENV
  ;   locals: self(0-28), order(0-28), allReady(9-28), (for generator)(13-25), (for state)(13-25), (for control)(13-25), _(14-23), eFillState(14-23)
  0000  SELF      R3 = R1[K0('GetState')] (self)
  0001  CALL      R2 = call(R2, 1 args, 1 rets)
  0002  GETTABUP  R3 = _ENV[K1('OrderState')]
  0003  GETTABLE  R3 = R3[K2('CanDeliver')]
  0004  LE        if R0 le R2   -> -129528
  0005  JMP       (jump)   -> 8
  0006  LOADBOOL  R2 = false
  0007  RETURN    return R2..R1
  0008  LOADBOOL  R2 = true
  0009  GETTABUP  R3 = _ENV[K3('ipairs')]
  0010  SELF      R5 = R1[K4('GetRequirementFillStates')] (self)
  0011  CALL      R4 = call(R4, -1 args, 1 rets)
  0012  CALL      R3 = call(R3, 3 args, -1 rets)
  0013  JMP       (jump)   -> 23
  0014  GETTABUP  R8 = _ENV[K5('ERequirementFillState')]
  0015  GETTABLE  R8 = R8[K6('Cooked')]
  0016  EQ        if R1 eq R8   -> -127462
  0017  JMP       (jump)   -> 23
  0018  GETTABUP  R8 = _ENV[K5('ERequirementFillState')]
  0019  GETTABLE  R8 = R8[K7('Filled')]
  0020  EQ        if R1 eq R8   -> -127458
  0021  JMP       (jump)   -> 23
  0022  LOADBOOL  R2 = false
  0023  TFORCALL  tforcall R3
  0024  TFORLOOP  tforloop R5(sBx=-11)   -> 14
  0025  NOT       R3 = not R0
  0026  RETURN    return R3..R2
  0027  RETURN    return R0..R-1
; ---------- proto28 [_OnOrderFinished] ----------
  ; fn ?  line 262-281 np=2 va=0 ms=7 code=38 consts=15 upvals=1 protos=0
  ;   K[0]='order'
  ;   K[1]='IsInDuration'
  ;   K[2]='GetCurrentOrderId'
  ;   K[3]='GetId'
  ;   K[4]='GetFinishCount'
  ;   K[5]=1
  ;   K[6]='SetFinishCount'
  ;   K[7]='SetCurrentOrderId'
  ;   K[8]=''
  ;   K[9]='LogActivityRankUp'
  ;   K[10]='_OnCurOrderFinished'
  ;   K[11]='EventDispatcher'
  ;   K[12]='DispatchEvent'
  ;   K[13]='m_activityDefinition'
  ;   K[14]='OrderStateChangedEvent'
  ;   upvals: _ENV
  ;   locals: self(0-38), msg(0-38), orderId(13-38), finishCount(21-37)
  0000  TEST      if not R1 then   -> -131070
  0001  JMP       (jump)   -> 5
  0002  GETTABLE  R2 = R1[K0('order')]
  0003  TEST      if not R2 then   -> -131066
  0004  JMP       (jump)   -> 6
  0005  RETURN    return R0..R-1
  0006  SELF      R3 = R0[K1('IsInDuration')] (self)
  0007  CALL      R2 = call(R2, 1 args, 1 rets)
  0008  TEST      if not R2 then   -> -131061
  0009  JMP       (jump)   -> 11
  0010  RETURN    return R0..R-1
  0011  SELF      R3 = R0[K2('GetCurrentOrderId')] (self)
  0012  CALL      R2 = call(R2, 1 args, 1 rets)
  0013  GETTABLE  R3 = R1[K0('order')]
  0014  SELF      R4 = R3[K3('GetId')] (self)
  0015  CALL      R3 = call(R3, 1 args, 1 rets)
  0016  EQ        if R0 eq R2   -> -129516
  0017  JMP       (jump)   -> 37
  0018  SELF      R4 = R0[K4('GetFinishCount')] (self)
  0019  CALL      R3 = call(R3, 1 args, 1 rets)
  0020  ADD       R3 = K5(1) add R3
  0021  SELF      R5 = R0[K6('SetFinishCount')] (self)
  0022  MOVE      R6 = R0
  0023  CALL      R4 = call(R4, 0 args, 2 rets)
  0024  SELF      R5 = R0[K7('SetCurrentOrderId')] (self)
  0025  LOADK     R6 = K8 ''
  0026  CALL      R4 = call(R4, 0 args, 2 rets)
  0027  SELF      R5 = R0[K9('LogActivityRankUp')] (self)
  0028  CALL      R4 = call(R4, 0 args, 1 rets)
  0029  SELF      R5 = R0[K10('_OnCurOrderFinished')] (self)
  0030  MOVE      R6 = R0
  0031  CALL      R4 = call(R4, 0 args, 2 rets)
  0032  GETTABUP  R4 = _ENV[K11('EventDispatcher')]
  0033  GETTABLE  R4 = R4[K12('DispatchEvent')]
  0034  GETTABLE  R5 = R0[K13('m_activityDefinition')]
  0035  GETTABLE  R5 = R5[K14('OrderStateChangedEvent')]
  0036  CALL      R4 = call(R4, 0 args, 1 rets)
  0037  RETURN    return R0..R-1
; ---------- proto29 [_OnCurOrderFinished] ----------
  ; fn ?  line 284-285 np=1 va=0 ms=2 code=1 consts=0 upvals=0 protos=0
  ;   locals: self(0-1)
  0000  RETURN    return R0..R-1
; ---------- proto30 [_OnOrderGroupRefreshed] ----------
  ; fn ?  line 288-289 np=1 va=0 ms=2 code=1 consts=0 upvals=0 protos=0
  ;   locals: self(0-1)
  0000  RETURN    return R0..R-1
; ---------- proto31 [_OnBakeOutStateChanged] ----------
  ; fn ?  line 292-293 np=1 va=0 ms=2 code=1 consts=0 upvals=0 protos=0
  ;   locals: self(0-1)
  0000  RETURN    return R0..R-1
; ---------- proto32 [TryReplaceInvalidOrder] ----------
  ; fn ?  line 296-318 np=2 va=0 ms=11 code=39 consts=12 upvals=1 protos=0
  ;   K[0]='GetCurrentOrderId'
  ;   K[1]=''
  ;   K[2]='GM'
  ;   K[3]='MainBoardModel'
  ;   K[4]='GetOrders'
  ;   K[5]='pairs'
  ;   K[6]='RefreshOrder'
  ;   K[7]=nil
  ;   K[8]='EventDispatcher'
  ;   K[9]='DispatchEvent'
  ;   K[10]='m_activityDefinition'
  ;   K[11]='OrderStateChangedEvent'
  ;   upvals: _ENV
  ;   locals: self(0-39), successCallback(0-39), currentOrderId(2-39), found(5-36), orders(9-36), (for generator)(12-19), (for state)(12-19), (for control)(12-19), orderId(13-17), _(13-17), bSuccess(23-36)
  0000  SELF      R3 = R0[K0('GetCurrentOrderId')] (self)
  0001  CALL      R2 = call(R2, 1 args, 1 rets)
  0002  EQ        if R1 eq K1('')   -> -129787
  0003  JMP       (jump)   -> 36
  0004  LOADBOOL  R3 = false
  0005  GETTABUP  R4 = _ENV[K2('GM')]
  0006  GETTABLE  R4 = R4[K3('MainBoardModel')]
  0007  SELF      R5 = R4[K4('GetOrders')] (self)
  0008  CALL      R4 = call(R4, 1 args, 1 rets)
  0009  GETTABUP  R5 = _ENV[K5('pairs')]
  0010  MOVE      R6 = R0
  0011  CALL      R5 = call(R5, 3 args, 1 rets)
  0012  JMP       (jump)   -> 17
  0013  EQ        if R0 eq R2   -> -126959
  0014  JMP       (jump)   -> 17
  0015  LOADBOOL  R3 = true
  0016  JMP       (jump)   -> 19
  0017  TFORCALL  tforcall R5
  0018  TFORLOOP  tforloop R7(sBx=-6)   -> 13
  0019  TEST      if not R3 then   -> -131050
  0020  JMP       (jump)   -> 36
  0021  SELF      R6 = R0[K6('RefreshOrder')] (self)
  0022  CALL      R5 = call(R5, 1 args, 1 rets)
  0023  TEST      if not R5 then   -> -131047
  0024  JMP       (jump)   -> 29
  0025  EQ        if R1 eq K7(nil)   -> -130270
  0026  JMP       (jump)   -> 29
  0027  MOVE      R6 = R0
  0028  CALL      R6 = call(R6, 0 args, 0 rets)
  0029  GETTABUP  R6 = _ENV[K8('EventDispatcher')]
  0030  GETTABLE  R6 = R6[K9('DispatchEvent')]
  0031  GETTABLE  R7 = R0[K10('m_activityDefinition')]
  0032  GETTABLE  R7 = R7[K11('OrderStateChangedEvent')]
  0033  CALL      R6 = call(R6, 0 args, 1 rets)
  0034  LOADBOOL  R6 = true
  0035  RETURN    return R6..R5
  0036  LOADBOOL  R3 = false
  0037  RETURN    return R3..R2
  0038  RETURN    return R0..R-1
; ---------- proto33 [LogActivityRankUp] ----------
  ; fn ?  line 323-335 np=1 va=0 ms=12 code=30 consts=15 upvals=1 protos=0
  ;   K[0]='GetStartTime'
  ;   K[1]=nil
  ;   K[2]='IsInDuration'
  ;   K[3]='GetTriggerDay'
  ;   K[4]=86400
  ;   K[5]='GetId'
  ;   K[6]='_'
  ;   K[7]=1
  ;   K[8]='GetFinishCount'
  ;   K[9]='GM'
  ;   K[10]='BIManager'
  ;   K[11]='LogActivity'
  ;   K[12]='m_type'
  ;   K[13]='EBIType'
  ;   K[14]='ActivityRankUp'
  ;   upvals: _ENV
  ;   locals: self(0-30), sTime(2-30), curDay(11-30), sDay(12-30), id(18-30), finishCount(20-30)
  0000  SELF      R2 = R0[K0('GetStartTime')] (self)
  0001  CALL      R1 = call(R1, 1 args, 1 rets)
  0002  EQ        if R1 eq K1(nil)   -> -130299
  0003  JMP       (jump)   -> 8
  0004  SELF      R3 = R0[K2('IsInDuration')] (self)
  0005  CALL      R2 = call(R2, 1 args, 1 rets)
  0006  TEST      if not R2 then   -> -131063
  0007  JMP       (jump)   -> 9
  0008  RETURN    return R0..R-1
  0009  SELF      R3 = R0[K3('GetTriggerDay')] (self)
  0010  CALL      R2 = call(R2, 1 args, 1 rets)
  0011  IDIV      R3 = K4(86400) idiv R1
  0012  SELF      R5 = R0[K5('GetId')] (self)
  0013  CALL      R4 = call(R4, 1 args, 1 rets)
  0014  LOADK     R5 = K6 '_'
  0015  SUB       R6 = R3 sub R2
  0016  ADD       R6 = K7(1) add R6
  0017  CONCAT    R4 = concat(R4..R4)
  0018  SELF      R6 = R0[K8('GetFinishCount')] (self)
  0019  CALL      R5 = call(R5, 1 args, 1 rets)
  0020  GETTABUP  R6 = _ENV[K9('GM')]
  0021  GETTABLE  R6 = R6[K10('BIManager')]
  0022  SELF      R7 = R6[K11('LogActivity')] (self)
  0023  GETTABLE  R8 = R0[K12('m_type')]
  0024  MOVE      R9 = R0
  0025  GETTABUP  R10 = _ENV[K13('EBIType')]
  0026  GETTABLE  R10 = R10[K14('ActivityRankUp')]
  0027  MOVE      R11 = R0
  0028  CALL      R6 = call(R6, 0 args, 5 rets)
  0029  RETURN    return R0..R-1
; ---------- proto34 [LogStarted] ----------
  ; fn ?  line 337-339 np=1 va=0 ms=5 code=6 consts=4 upvals=1 protos=0
  ;   K[0]='LogActivity'
  ;   K[1]='EBIType'
  ;   K[2]='ActivityStarted'
  ;   K[3]=''
  ;   upvals: _ENV
  ;   locals: self(0-6)
  0000  SELF      R2 = R0[K0('LogActivity')] (self)
  0001  GETTABUP  R3 = _ENV[K1('EBIType')]
  0002  GETTABLE  R3 = R3[K2('ActivityStarted')]
  0003  LOADK     R4 = K3 ''
  0004  CALL      R1 = call(R1, 0 args, 3 rets)
  0005  RETURN    return R0..R-1
