# AdventureBoardActivity_Model_AdventureBoardActivityModel_1379.luac
; fn @AdventureBoardActivityModel.lua  line 0-0 np=0 va=1 ms=3 code=40 consts=26 upvals=1 protos=7
;   K[0]='AdventureBoardActivityModel'
;   K[1]='setmetatable'
;   K[2]='BoardModelClass'
;   K[3]='AdventureBoardActivityBoardModel'
;   K[4]='BoardConfigName'
;   K[5]='Data.Config.AdventureBoardActivityBoardConfig'
;   K[6]='CommonItemPrefix'
;   K[7]='ItemCodePrefix'
;   K[8]='AdventureBoardCommon'
;   K[9]='CommonTokenType'
;   K[10]='advbt_token'
;   K[11]='FogConfigName'
;   K[12]='Data.Config.AdventureBoardFogConfig'
;   K[13]='FixedHorizontalTiles'
;   K[14]=6
;   K[15]='FixedVerticalTiles'
;   K[16]=8
;   K[17]='ExtraBoardActivityModel'
;   K[18]='__index'
;   K[19]='Init'
;   K[20]='GetBoardViewPrefabName'
;   K[21]='GetActivityDefinitionByType'
;   K[22]='GetActiveModel'
;   K[23]='GetButtonTarget'
;   K[24]='SelectProduceConfig'
;   K[25]='GetFogKeyItemByLevel'
;   upvals: _ENV
0000  GETTABUP  R0 = _ENV[K1('setmetatable')]
0001  NEWTABLE  R1 = {} (0 items)
0002  GETTABUP  R2 = _ENV[K3('AdventureBoardActivityBoardModel')]
0003  SETTABLE  R1[K2('BoardModelClass')] = R2
0004  SETTABLE  R1[K4('BoardConfigName')] = K5('Data.Config.AdventureBoardActivityBoardConfig')
0005  GETTABUP  R2 = _ENV[K7('ItemCodePrefix')]
0006  GETTABLE  R2 = R2[K8('AdventureBoardCommon')]
0007  SETTABLE  R1[K6('CommonItemPrefix')] = R2
0008  SETTABLE  R1[K9('CommonTokenType')] = K10('advbt_token')
0009  SETTABLE  R1[K11('FogConfigName')] = K12('Data.Config.AdventureBoardFogConfig')
0010  SETTABLE  R1[K13('FixedHorizontalTiles')] = K14(6)
0011  SETTABLE  R1[K15('FixedVerticalTiles')] = K16(8)
0012  GETTABUP  R2 = _ENV[K17('ExtraBoardActivityModel')]
0013  CALL      R0 = call(R0, 1 args, 2 rets)
0014  SETTABUP  _ENV[K0('AdventureBoardActivityModel')] = R0
0015  GETTABUP  R0 = _ENV[K0('AdventureBoardActivityModel')]
0016  GETTABUP  R1 = _ENV[K0('AdventureBoardActivityModel')]
0017  SETTABLE  R0[K18('__index')] = R1
0018  GETTABUP  R0 = _ENV[K0('AdventureBoardActivityModel')]
0019  CLOSURE   R1 = closure proto0
0020  SETTABLE  R0[K19('Init')] = R1
0021  GETTABUP  R0 = _ENV[K0('AdventureBoardActivityModel')]
0022  CLOSURE   R1 = closure proto1
0023  SETTABLE  R0[K20('GetBoardViewPrefabName')] = R1
0024  GETTABUP  R0 = _ENV[K0('AdventureBoardActivityModel')]
0025  CLOSURE   R1 = closure proto2
0026  SETTABLE  R0[K21('GetActivityDefinitionByType')] = R1
0027  GETTABUP  R0 = _ENV[K0('AdventureBoardActivityModel')]
0028  CLOSURE   R1 = closure proto3
0029  SETTABLE  R0[K22('GetActiveModel')] = R1
0030  GETTABUP  R0 = _ENV[K0('AdventureBoardActivityModel')]
0031  CLOSURE   R1 = closure proto4
0032  SETTABLE  R0[K23('GetButtonTarget')] = R1
0033  GETTABUP  R0 = _ENV[K0('AdventureBoardActivityModel')]
0034  CLOSURE   R1 = closure proto5
0035  SETTABLE  R0[K24('SelectProduceConfig')] = R1
0036  GETTABUP  R0 = _ENV[K0('AdventureBoardActivityModel')]
0037  CLOSURE   R1 = closure proto6
0038  SETTABLE  R0[K25('GetFogKeyItemByLevel')] = R1
0039  RETURN    return R0..R-1
; ---------- proto0 [Init] ----------
  ; fn ?  line 17-22 np=1 va=1 ms=4 code=10 consts=4 upvals=1 protos=1
  ;   K[0]='ExtraBoardActivityModel'
  ;   K[1]='Init'
  ;   K[2]='m_tokenHelper'
  ;   K[3]='SetCustomFunc2SelectProduceConfig'
  ;   upvals: _ENV
  ;   locals: self(0-10)
  0000  GETTABUP  R1 = _ENV[K0('ExtraBoardActivityModel')]
  0001  GETTABLE  R1 = R1[K1('Init')]
  0002  MOVE      R2 = R0
  0003  VARARG    R3 = vararg(0)
  0004  CALL      R1 = call(R1, 0 args, -1 rets)
  0005  GETTABLE  R1 = R0[K2('m_tokenHelper')]
  0006  SELF      R2 = R1[K3('SetCustomFunc2SelectProduceConfig')] (self)
  0007  CLOSURE   R3 = closure proto0
  0008  CALL      R1 = call(R1, 0 args, 2 rets)
  0009  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 19-21 np=1 va=0 ms=4 code=6 consts=1 upvals=1 protos=0
    ;   K[0]='SelectProduceConfig'
    ;   upvals: self
    ;   locals: arrConfig(0-6)
    0000  GETUPVAL  R1 = self
    0001  SELF      R2 = R1[K0('SelectProduceConfig')] (self)
    0002  MOVE      R3 = R0
    0003  TAILCALL  tailcall(R1, 0)
    0004  RETURN    return R1..R0
    0005  RETURN    return R0..R-1
; ---------- proto1 [GetBoardViewPrefabName] ----------
  ; fn ?  line 24-26 np=1 va=0 ms=2 code=4 consts=2 upvals=1 protos=0
  ;   K[0]='ScenePrefabConfigName'
  ;   K[1]='AdventureBoardActivityBoardView'
  ;   upvals: _ENV
  ;   locals: self(0-4)
  0000  GETTABUP  R1 = _ENV[K0('ScenePrefabConfigName')]
  0001  GETTABLE  R1 = R1[K1('AdventureBoardActivityBoardView')]
  0002  RETURN    return R1..R0
  0003  RETURN    return R0..R-1
; ---------- proto2 [GetActivityDefinitionByType] ----------
  ; fn ?  line 28-30 np=2 va=0 ms=3 code=4 consts=1 upvals=1 protos=0
  ;   K[0]='AdventureBoardDefinition'
  ;   upvals: _ENV
  ;   locals: self(0-4), activityType(0-4)
  0000  GETTABUP  R2 = _ENV[K0('AdventureBoardDefinition')]
  0001  GETTABLE  R2 = R2[R1]
  0002  RETURN    return R2..R1
  0003  RETURN    return R0..R-1
; ---------- proto3 [GetActiveModel] ----------
  ; fn ?  line 32-34 np=0 va=0 ms=2 code=6 consts=3 upvals=1 protos=0
  ;   K[0]='ActivityManager'
  ;   K[1]='GetOneActiveModel'
  ;   K[2]='AdventureBoardDefinition'
  ;   upvals: _ENV
  0000  GETTABUP  R0 = _ENV[K0('ActivityManager')]
  0001  GETTABLE  R0 = R0[K1('GetOneActiveModel')]
  0002  GETTABUP  R1 = _ENV[K2('AdventureBoardDefinition')]
  0003  TAILCALL  tailcall(R0, 0)
  0004  RETURN    return R0..R-1
  0005  RETURN    return R0..R-1
; ---------- proto4 [GetButtonTarget] ----------
  ; fn ?  line 36-61 np=1 va=0 ms=11 code=69 consts=25 upvals=1 protos=0
  ;   K[0]='AdventureBoardActivityModel'
  ;   K[1]='GetActiveModel'
  ;   K[2]='IsSelfItem'
  ;   K[3]='GetType'
  ;   K[4]='GetActivityDefinition'
  ;   K[5]='GM'
  ;   K[6]='UIManager'
  ;   K[7]='GetOpenedViewByName'
  ;   K[8]='MainWindowPrefabName'
  ;   K[9]=nil
  ;   K[10]='GetCacheRootHudButton'
  ;   K[11]='UIUtil'
  ;   K[12]='IsEmptyComponent'
  ;   K[13]='SceneManager'
  ;   K[14]='GetGameMode'
  ;   K[15]='EGameMode'
  ;   K[16]='Board'
  ;   K[17]='MainBoardView'
  ;   K[18]='GetInstance'
  ;   K[19]='GetOrderArea'
  ;   K[20]='GetIconAreaByActivityType'
  ;   K[21]='Main'
  ;   K[22]='TutorialHelper'
  ;   K[23]='GetHudButton'
  ;   K[24]='EntryButtonKey'
  ;   upvals: _ENV
  ;   locals: propertyType(0-69), activityModel(3-69), bExtraBoard(8-69), activityType(12-66), activityDefinition(14-66), window(19-66), btn(23-30), boardView(42-52), orderArea(46-52)
  0000  GETTABUP  R1 = _ENV[K0('AdventureBoardActivityModel')]
  0001  GETTABLE  R1 = R1[K1('GetActiveModel')]
  0002  CALL      R1 = call(R1, 1 args, 0 rets)
  0003  TESTSET   if R0 then R2   -> -130555
  0004  JMP       (jump)   -> 8
  0005  SELF      R3 = R1[K2('IsSelfItem')] (self)
  0006  MOVE      R4 = R0
  0007  CALL      R2 = call(R2, 1 args, 2 rets)
  0008  TEST      if not R2 then   -> -131062
  0009  JMP       (jump)   -> 66
  0010  SELF      R4 = R1[K3('GetType')] (self)
  0011  CALL      R3 = call(R3, 1 args, 1 rets)
  0012  SELF      R5 = R1[K4('GetActivityDefinition')] (self)
  0013  CALL      R4 = call(R4, 1 args, 1 rets)
  0014  GETTABUP  R5 = _ENV[K5('GM')]
  0015  GETTABLE  R5 = R5[K6('UIManager')]
  0016  SELF      R6 = R5[K7('GetOpenedViewByName')] (self)
  0017  GETTABLE  R7 = R4[K8('MainWindowPrefabName')]
  0018  CALL      R5 = call(R5, 1 args, 2 rets)
  0019  EQ        if R1 eq K9(nil)   -> -128226
  0020  JMP       (jump)   -> 31
  0021  SELF      R7 = R5[K10('GetCacheRootHudButton')] (self)
  0022  CALL      R6 = call(R6, 1 args, 1 rets)
  0023  GETTABUP  R7 = _ENV[K11('UIUtil')]
  0024  GETTABLE  R7 = R7[K12('IsEmptyComponent')]
  0025  MOVE      R8 = R0
  0026  CALL      R7 = call(R7, 1 args, 1 rets)
  0027  TEST      if not R7 then   -> -131042
  0028  JMP       (jump)   -> 66
  0029  RETURN    return R6..R5
  0030  JMP       (jump)   -> 66
  0031  GETTABUP  R6 = _ENV[K5('GM')]
  0032  GETTABLE  R6 = R6[K13('SceneManager')]
  0033  SELF      R7 = R6[K14('GetGameMode')] (self)
  0034  CALL      R6 = call(R6, 1 args, 1 rets)
  0035  GETTABUP  R7 = _ENV[K15('EGameMode')]
  0036  GETTABLE  R7 = R7[K16('Board')]
  0037  EQ        if R0 eq R7   -> -127954
  0038  JMP       (jump)   -> 53
  0039  GETTABUP  R6 = _ENV[K17('MainBoardView')]
  0040  GETTABLE  R6 = R6[K18('GetInstance')]
  0041  CALL      R6 = call(R6, 1 args, 0 rets)
  0042  EQ        if R1 eq K9(nil)   -> -127691
  0043  JMP       (jump)   -> 66
  0044  SELF      R8 = R6[K19('GetOrderArea')] (self)
  0045  CALL      R7 = call(R7, 1 args, 1 rets)
  0046  EQ        if R1 eq K9(nil)   -> -127175
  0047  JMP       (jump)   -> 66
  0048  SELF      R9 = R7[K20('GetIconAreaByActivityType')] (self)
  0049  MOVE      R10 = R0
  0050  TAILCALL  tailcall(R8, 0)
  0051  RETURN    return R8..R7
  0052  JMP       (jump)   -> 66
  0053  GETTABUP  R6 = _ENV[K5('GM')]
  0054  GETTABLE  R6 = R6[K13('SceneManager')]
  0055  SELF      R7 = R6[K14('GetGameMode')] (self)
  0056  CALL      R6 = call(R6, 1 args, 1 rets)
  0057  GETTABUP  R7 = _ENV[K15('EGameMode')]
  0058  GETTABLE  R7 = R7[K21('Main')]
  0059  EQ        if R0 eq R7   -> -127932
  0060  JMP       (jump)   -> 66
  0061  GETTABUP  R6 = _ENV[K22('TutorialHelper')]
  0062  GETTABLE  R6 = R6[K23('GetHudButton')]
  0063  GETTABLE  R7 = R4[K24('EntryButtonKey')]
  0064  TAILCALL  tailcall(R6, 0)
  0065  RETURN    return R6..R5
  0066  LOADNIL   R3..R3 = nil
  0067  RETURN    return R3..R2
  0068  RETURN    return R0..R-1
; ---------- proto5 [SelectProduceConfig] ----------
  ; fn ?  line 63-98 np=2 va=0 ms=11 code=46 consts=13 upvals=1 protos=1
  ;   K[0]='Table'
  ;   K[1]='IsEmpty'
  ;   K[2]='m_boardModel'
  ;   K[3]='GetFogModel'
  ;   K[4]=nil
  ;   K[5]=1
  ;   K[6]='table'
  ;   K[7]='sort'
  ;   K[8]='ipairs'
  ;   K[9]='StringUtil'
  ;   K[10]='IsNilOrEmpty'
  ;   K[11]='fogId'
  ;   K[12]='IsFogUnlocked'
  ;   upvals: _ENV
  ;   locals: self(0-46), arrConfig(0-46), fogModel(16-46), (for generator)(28-43), (for state)(28-43), (for control)(28-43), _(29-41), config(29-41)
  0000  GETTABUP  R2 = _ENV[K0('Table')]
  0001  GETTABLE  R2 = R2[K1('IsEmpty')]
  0002  MOVE      R3 = R0
  0003  CALL      R2 = call(R2, 1 args, 1 rets)
  0004  TEST      if not R2 then   -> -131066
  0005  JMP       (jump)   -> 7
  0006  RETURN    return R0..R-1
  0007  GETTABLE  R2 = R0[K2('m_boardModel')]
  0008  TEST      if not R2 then   -> -131062
  0009  JMP       (jump)   -> 15
  0010  GETTABLE  R2 = R0[K2('m_boardModel')]
  0011  SELF      R3 = R2[K3('GetFogModel')] (self)
  0012  CALL      R2 = call(R2, 1 args, 1 rets)
  0013  TEST      if not R2 then   -> -131056
  0014  JMP       (jump)   -> 16
  0015  LOADNIL   R2..R2 = nil
  0016  EQ        if R0 eq K4(nil)   -> -129770
  0017  JMP       (jump)   -> 20
  0018  GETTABLE  R3 = R1[K5(1)]
  0019  RETURN    return R3..R2
  0020  GETTABUP  R3 = _ENV[K6('table')]
  0021  GETTABLE  R3 = R3[K7('sort')]
  0022  MOVE      R4 = R0
  0023  CLOSURE   R5 = closure proto0
  0024  CALL      R3 = call(R3, 0 args, 2 rets)
  0025  GETTABUP  R3 = _ENV[K8('ipairs')]
  0026  MOVE      R4 = R0
  0027  CALL      R3 = call(R3, 3 args, 1 rets)
  0028  JMP       (jump)   -> 41
  0029  GETTABUP  R8 = _ENV[K9('StringUtil')]
  0030  GETTABLE  R8 = R8[K10('IsNilOrEmpty')]
  0031  GETTABLE  R9 = R7[K11('fogId')]
  0032  CALL      R8 = call(R8, 1 args, 1 rets)
  0033  TEST      if not R8 then   -> -131036
  0034  JMP       (jump)   -> 40
  0035  SELF      R9 = R2[K12('IsFogUnlocked')] (self)
  0036  GETTABLE  R10 = R7[K11('fogId')]
  0037  CALL      R8 = call(R8, 1 args, 2 rets)
  0038  TEST      if not R8 then   -> -131032
  0039  JMP       (jump)   -> 41
  0040  RETURN    return R7..R6
  0041  TFORCALL  tforcall R3
  0042  TFORLOOP  tforloop R5(sBx=-14)   -> 29
  0043  LOADNIL   R3..R3 = nil
  0044  RETURN    return R3..R2
  0045  RETURN    return R0..R-1
  ; ---------- proto0 [] ----------
    ; fn ?  line 74-88 np=2 va=0 ms=7 code=40 consts=6 upvals=2 protos=0
    ;   K[0]=0
    ;   K[1]='StringUtil'
    ;   K[2]='IsNilOrEmpty'
    ;   K[3]='fogId'
    ;   K[4]='GetFogConfigById'
    ;   K[5]='index'
    ;   upvals: _ENV, fogModel
    ;   locals: a(0-40), b(0-40), indexA(1-40), indexB(2-40), configA(12-18), configB(28-34)
    0000  LOADK     R2 = K0 0
    0001  LOADK     R3 = K0 0
    0002  GETTABUP  R4 = _ENV[K1('StringUtil')]
    0003  GETTABLE  R4 = R4[K2('IsNilOrEmpty')]
    0004  GETTABLE  R5 = R0[K3('fogId')]
    0005  CALL      R4 = call(R4, 1 args, 1 rets)
    0006  TEST      if not R4 then   -> -131063
    0007  JMP       (jump)   -> 18
    0008  GETUPVAL  R4 = _ENV
    0009  SELF      R5 = R4[K4('GetFogConfigById')] (self)
    0010  GETTABLE  R6 = R0[K3('fogId')]
    0011  CALL      R4 = call(R4, 1 args, 2 rets)
    0012  TEST      if not R4 then   -> -131058
    0013  JMP       (jump)   -> 17
    0014  GETTABLE  R5 = R4[K5('index')]
    0015  TESTSET   if R1 then R2   -> -128494
    0016  JMP       (jump)   -> 18
    0017  LOADK     R2 = K0 0
    0018  GETTABUP  R4 = _ENV[K1('StringUtil')]
    0019  GETTABLE  R4 = R4[K2('IsNilOrEmpty')]
    0020  GETTABLE  R5 = R1[K3('fogId')]
    0021  CALL      R4 = call(R4, 1 args, 1 rets)
    0022  TEST      if not R4 then   -> -131047
    0023  JMP       (jump)   -> 34
    0024  GETUPVAL  R4 = _ENV
    0025  SELF      R5 = R4[K4('GetFogConfigById')] (self)
    0026  GETTABLE  R6 = R1[K3('fogId')]
    0027  CALL      R4 = call(R4, 1 args, 2 rets)
    0028  TEST      if not R4 then   -> -131042
    0029  JMP       (jump)   -> 33
    0030  GETTABLE  R5 = R4[K5('index')]
    0031  TESTSET   if R1 then R3   -> -128478
    0032  JMP       (jump)   -> 34
    0033  LOADK     R3 = K0 0
    0034  LT        if R1 lt R2   -> -129498
    0035  JMP       (jump)   -> 37
    0036  LOADBOOL  R4 = false
    0037  LOADBOOL  R4 = true
    0038  RETURN    return R4..R3
    0039  RETURN    return R0..R-1
; ---------- proto6 [GetFogKeyItemByLevel] ----------
  ; fn ?  line 100-102 np=2 va=0 ms=5 code=6 consts=2 upvals=0 protos=0
  ;   K[0]='m_itemPrefix'
  ;   K[1]='_key_'
  ;   locals: self(0-6), level(0-6)
  0000  GETTABLE  R2 = R0[K0('m_itemPrefix')]
  0001  LOADK     R3 = K1 '_key_'
  0002  MOVE      R4 = R0
  0003  CONCAT    R2 = concat(R2..R2)
  0004  RETURN    return R2..R1
  0005  RETURN    return R0..R-1
