--文件是自动生成,请勿手动修改.来自数据文件:state_manage local L_CompressMaxColumn = 1 local L_CompressData = { 1249064813545, --1001,1,1,无限传送,, 1249065862122, --1002,1,2,无限传送,, 1249098401745, --2001,2,1,打怪经验提升+30%,, 1249133004754, --2002,2,2,打怪经验提升+40%,, 1249100498899, --2003,2,3,打怪经验提升+30%,, 1249135101908, --2004,2,4,打怪经验提升+40%,, 1249165544377, --3001,3,1,经验副本次数+1,, 1249200147386, --3002,3,2,经验副本次数+2,, 1249234750395, --3003,3,3,经验副本次数+3,, 1249269353404, --3004,3,4,经验副本次数+4,, 1249299795873, --4001,4,1,装备副本次数+1,, 1249334398882, --4002,4,2,装备副本次数+2,, 1249369001891, --4003,4,3,装备副本次数+3,, 1249403604900, --4004,4,4,装备副本次数+4,, 1249434047369, --5001,5,1,世界boss1层,, 1249468650378, --5002,5,2,世界boss2层,, 1249503253387, --5003,5,3,世界boss3层,, 1249537856396, --5004,5,4,世界boss4层,, 1249568298865, --6001,6,1,神兽岛boss1层,, 1249602901874, --6002,6,2,神兽岛boss2层,, 1249637504883, --6003,6,3,神兽岛boss3层,, 1249672107892, --6004,6,4,神兽岛boss4层,, 1249702550361, --7001,7,1,玩家等级上限提升到25,, 1249737153370, --7002,7,2,玩家等级上限提升到50,, 1249771756379, --7003,7,3,玩家等级上限提升到75,, 1249806359388, --7004,7,4,玩家等级上限提升到90,, 1249840962397, --7005,7,5,玩家等级上限提升到110,, 1249870356289, --8001,8,1,压制境界低于你的怪物,, 1249904959298, --8002,8,2,对[筑基]期怪物进行战力压制,, 1249939562307, --8003,8,3,对[开光]期怪物进行战力压制,, 1249974165316, --8004,8,4,对[灵虚]期怪物进行战力压制,, 1250008768325, --8005,8,5,对[灵寂]期怪物进行战力压制,, 1250043371334, --8006,8,6,对[结丹]期怪物进行战力压制,, 1250077974343, --8007,8,7,对[金丹]期怪物进行战力压制,, 1250112577352, --8008,8,8,对[元婴]期怪物进行战力压制,, 1250147180361, --8009,8,9,对[化神]期怪物进行战力压制,, 1250172379945, --9001,9,1,开启远程熔炼功能,, 1250205968145, --10001,10,1,激活背饰,, 1250239556345, --11001,11,1,开启装备合成,, 1250273144545, --12001,12,1,之前境界所有的权限,, 1250306732745, --13001,13,1,心魔副本次数+1,, 1250341335754, --13002,13,2,心魔副本次数+2,, 1250375938763, --13003,13,3,心魔副本次数+3,, 1250410541772, --13004,13,4,心魔副本次数+4,, 1250440984241, --14001,14,1,五行副本次数+1,, 1250475587250, --14002,14,2,五行副本次数+2,, 1250510190259, --14003,14,3,五行副本次数+3,, 1250544793268, --14004,14,4,五行副本次数+4,, 1250575235737, --15001,15,1,恭喜!您已免费提升至VIP1,, 1250608790170, --15002,15,1,恭喜!您已免费提升至VIP2,, } local L_MainKeyDic = { [1001]=1,[1002]=2,[2001]=3,[2002]=4,[2003]=5,[2004]=6,[3001]=7,[3002]=8,[3003]=9,[3004]=10,[4001]=11,[4002]=12,[4003]=13,[4004]=14,[5001]=15, [5002]=16,[5003]=17,[5004]=18,[6001]=19,[6002]=20,[6003]=21,[6004]=22,[7001]=23,[7002]=24,[7003]=25,[7004]=26,[7005]=27,[8001]=28,[8002]=29,[8003]=30, [8004]=31,[8005]=32,[8006]=33,[8007]=34,[8008]=35,[8009]=36,[9001]=37,[10001]=38,[11001]=39,[12001]=40,[13001]=41,[13002]=42,[13003]=43,[13004]=44,[14001]=45, [14002]=46,[14003]=47,[14004]=48,[15001]=49,[15002]=50,} local L_NamesByNum = { Id = 1, Group = 2, Level = 3, } local L_NamesByString = { Des = 4, } local L_ColNameIndexs = { Id = 0, Group = 1, Level = 2, Des = 3, } --local L_ColumnUseBitCount = {15,5,5,17,} --local L_ColumnList = {1,1,1,1,} --local L_ShiftDataList = {0,15,20,25,} --local L_AndDataList = {16383,15,15,65535,} local L_ColumnShiftAndList = {1,0,16383,1,15,15,1,20,15,1,25,65535,} local L_ColNum = 4; local L_UseDataK = setmetatable({ },{ __mode = 'k'}); local L_UseDataV = setmetatable({ },{ __mode = 'v'}); local L_UseDataRow = setmetatable({ },{ __mode = 'v'}); local L_IsCache = false; local mt = {} local function GetData(row, column) local startIndex = (column - 1) * 3 local _compressData = L_CompressData[row] local _tempData = _compressData >> L_ColumnShiftAndList[startIndex + 2] local _data = _tempData & L_ColumnShiftAndList[startIndex + 3] local _andSign = L_ColumnShiftAndList[startIndex + 3] + 1 local _isMinus = (_andSign & _tempData) == _andSign return _isMinus and -_data or _data; end mt.__index = function (t,key) local _key = L_UseDataK[t]; local _row = L_MainKeyDic[_key]; local _column = L_NamesByNum[key]; if _column ~= nil then if L_IsCache then local _data = L_UseDataRow[_row * L_ColNum + _column] if not _data then _data = GetData(_row, _column) L_UseDataRow[_row * L_ColNum + _column] = _data end return _data else return GetData(_row, _column) end end _column = L_NamesByString[key] if _column ~= nil then return StringDefines[GetData(_row, _column)] end if string.find(key, '_') then local _newKey = string.gsub(key, '_', '') _column = L_NamesByString[_newKey] if _column ~= nil then return GetData(_row, _column) end end if key ~= '_OnCopyAfter_' then return end end local M = { _CompressData_ = L_CompressData, _ColumnShiftAndList_ = L_ColumnShiftAndList, _CompressMaxColumn_ = L_CompressMaxColumn, _ColumnNameIndexs_ = L_ColNameIndexs, Count = 50 } function M:Foreach(func) for i=1,M.Count do local _key = GetData(i, 1) func(_key, M[_key]) end end function M:ForeachCanBreak(func) for i = 1,M.Count do local _key = GetData(i, 1) if func(_key, M[_key]) then break end end end function M:GetByIndex(index) return M[GetData(index, 1)]; end function M:IsContainKey(key) return not(not L_MainKeyDic[key]); end function M:SetIsCache(isCh) L_IsCache = isCh; end setmetatable(M, {__index = function(t, key) if not L_MainKeyDic[key] then return; end local _t = L_UseDataV[key]; if not _t then _t = setmetatable({}, mt); L_UseDataV[key] = _t; L_UseDataK[_t] = key; end return _t end}) return M