--文件是自动生成,请勿手动修改.来自数据文件:pet_equip_inten_class local L_CompressMaxColumn = 1 local L_CompressData = { 246737281361680, --10000,1,0,1_0;2_0;3_0;4_0,, 596536618788625, --10001,1,10,1_135;2_3633;3_67;4_67,, 596553840600850, --10002,1,30,1_339;2_9083;3_169;4_169,, 596571083384595, --10003,1,60,1_610;2_16349;3_305;4_305,, 596588389082900, --10004,1,120,1_949;2_25432;3_474;4_474,, 596605736724245, --10005,1,200,1_1356;2_36332;3_678;4_678,, 596623126308630, --10006,1,300,1_1830;2_49048;3_915;4_915,, 596640515893015, --10007,1,400,1_2373;2_63581;3_1186;4_1186,, 596657905477400, --10008,1,500,1_2983;2_79931;3_1491;4_1491,, 596675295061785, --10009,1,600,1_3661;2_98097;3_1830;4_1830,, 596692894361370, --10010,1,800,1_4407;2_118080;3_2203;4_2203,, 596710493660955, --10011,1,1000,1_5221;2_139879;3_2610;4_2610,, 596728092960540, --10012,1,1200,1_6102;2_163495;3_3051;4_3051,, 596745692260125, --10013,1,1400,1_7052;2_188928;3_3526;4_3526,, 596763291559710, --10014,1,1600,1_8069;2_216177;3_4034;4_4034,, 596780890859295, --10015,1,1800,1_9154;2_245243;3_4577;4_4577,, 596798490158880, --10016,1,2000,1_10306;2_276125;3_5153;4_5153,, 596816299173665, --10017,1,2300,1_11527;2_308824;3_5763;4_5763,, 596834108188450, --10018,1,2600,1_12815;2_343340;3_6407;4_6407,, 596851917203235, --10019,1,2900,1_14172;2_379673;3_7086;4_7086,, 596869726218020, --10020,1,3200,1_15596;2_417822;3_7798;4_7798,, 246737281502752, --20000,2,0,1_0;2_0;3_0;4_0,, 596536618929697, --20001,2,10,1_135;2_3633;3_67;4_67,, 596553840741922, --20002,2,30,1_339;2_9083;3_169;4_169,, 596571083525667, --20003,2,60,1_610;2_16349;3_305;4_305,, 596588389223972, --20004,2,120,1_949;2_25432;3_474;4_474,, 596605736865317, --20005,2,200,1_1356;2_36332;3_678;4_678,, 596623126449702, --20006,2,300,1_1830;2_49048;3_915;4_915,, 596640516034087, --20007,2,400,1_2373;2_63581;3_1186;4_1186,, 596657905618472, --20008,2,500,1_2983;2_79931;3_1491;4_1491,, 596675295202857, --20009,2,600,1_3661;2_98097;3_1830;4_1830,, 596692894502442, --20010,2,800,1_4407;2_118080;3_2203;4_2203,, 596710493802027, --20011,2,1000,1_5221;2_139879;3_2610;4_2610,, 596728093101612, --20012,2,1200,1_6102;2_163495;3_3051;4_3051,, 596745692401197, --20013,2,1400,1_7052;2_188928;3_3526;4_3526,, 596763291700782, --20014,2,1600,1_8069;2_216177;3_4034;4_4034,, 596780891000367, --20015,2,1800,1_9154;2_245243;3_4577;4_4577,, 596798490299952, --20016,2,2000,1_10306;2_276125;3_5153;4_5153,, 596816299314737, --20017,2,2300,1_11527;2_308824;3_5763;4_5763,, 596834108329522, --20018,2,2600,1_12815;2_343340;3_6407;4_6407,, 596851917344307, --20019,2,2900,1_14172;2_379673;3_7086;4_7086,, 596869726359092, --20020,2,3200,1_15596;2_417822;3_7798;4_7798,, 246737281643824, --30000,3,0,1_0;2_0;3_0;4_0,, 596536619070769, --30001,3,10,1_135;2_3633;3_67;4_67,, 596553840882994, --30002,3,30,1_339;2_9083;3_169;4_169,, 596571083666739, --30003,3,60,1_610;2_16349;3_305;4_305,, 596588389365044, --30004,3,120,1_949;2_25432;3_474;4_474,, 596605737006389, --30005,3,200,1_1356;2_36332;3_678;4_678,, 596623126590774, --30006,3,300,1_1830;2_49048;3_915;4_915,, 596640516175159, --30007,3,400,1_2373;2_63581;3_1186;4_1186,, 596657905759544, --30008,3,500,1_2983;2_79931;3_1491;4_1491,, 596675295343929, --30009,3,600,1_3661;2_98097;3_1830;4_1830,, 596692894643514, --30010,3,800,1_4407;2_118080;3_2203;4_2203,, 596710493943099, --30011,3,1000,1_5221;2_139879;3_2610;4_2610,, 596728093242684, --30012,3,1200,1_6102;2_163495;3_3051;4_3051,, 596745692542269, --30013,3,1400,1_7052;2_188928;3_3526;4_3526,, 596763291841854, --30014,3,1600,1_8069;2_216177;3_4034;4_4034,, 596780891141439, --30015,3,1800,1_9154;2_245243;3_4577;4_4577,, 596798490441024, --30016,3,2000,1_10306;2_276125;3_5153;4_5153,, 596816299455809, --30017,3,2300,1_11527;2_308824;3_5763;4_5763,, 596834108470594, --30018,3,2600,1_12815;2_343340;3_6407;4_6407,, 596851917485379, --30019,3,2900,1_14172;2_379673;3_7086;4_7086,, 596869726500164, --30020,3,3200,1_15596;2_417822;3_7798;4_7798,, 246737281784896, --40000,4,0,1_0;2_0;3_0;4_0,, 596536619211841, --40001,4,10,1_135;2_3633;3_67;4_67,, 596553841024066, --40002,4,30,1_339;2_9083;3_169;4_169,, 596571083807811, --40003,4,60,1_610;2_16349;3_305;4_305,, 596588389506116, --40004,4,120,1_949;2_25432;3_474;4_474,, 596605737147461, --40005,4,200,1_1356;2_36332;3_678;4_678,, 596623126731846, --40006,4,300,1_1830;2_49048;3_915;4_915,, 596640516316231, --40007,4,400,1_2373;2_63581;3_1186;4_1186,, 596657905900616, --40008,4,500,1_2983;2_79931;3_1491;4_1491,, 596675295485001, --40009,4,600,1_3661;2_98097;3_1830;4_1830,, 596692894784586, --40010,4,800,1_4407;2_118080;3_2203;4_2203,, 596710494084171, --40011,4,1000,1_5221;2_139879;3_2610;4_2610,, 596728093383756, --40012,4,1200,1_6102;2_163495;3_3051;4_3051,, 596745692683341, --40013,4,1400,1_7052;2_188928;3_3526;4_3526,, 596763291982926, --40014,4,1600,1_8069;2_216177;3_4034;4_4034,, 596780891282511, --40015,4,1800,1_9154;2_245243;3_4577;4_4577,, 596798490582096, --40016,4,2000,1_10306;2_276125;3_5153;4_5153,, 596816299596881, --40017,4,2300,1_11527;2_308824;3_5763;4_5763,, 596834108611666, --40018,4,2600,1_12815;2_343340;3_6407;4_6407,, 596851917626451, --40019,4,2900,1_14172;2_379673;3_7086;4_7086,, 596869726641236, --40020,4,3200,1_15596;2_417822;3_7798;4_7798,, } local L_MainKeyDic = { [10000]=1,[10001]=2,[10002]=3,[10003]=4,[10004]=5,[10005]=6,[10006]=7,[10007]=8,[10008]=9,[10009]=10,[10010]=11,[10011]=12,[10012]=13,[10013]=14,[10014]=15, [10015]=16,[10016]=17,[10017]=18,[10018]=19,[10019]=20,[10020]=21,[20000]=22,[20001]=23,[20002]=24,[20003]=25,[20004]=26,[20005]=27,[20006]=28,[20007]=29,[20008]=30, [20009]=31,[20010]=32,[20011]=33,[20012]=34,[20013]=35,[20014]=36,[20015]=37,[20016]=38,[20017]=39,[20018]=40,[20019]=41,[20020]=42,[30000]=43,[30001]=44,[30002]=45, [30003]=46,[30004]=47,[30005]=48,[30006]=49,[30007]=50,[30008]=51,[30009]=52,[30010]=53,[30011]=54,[30012]=55,[30013]=56,[30014]=57,[30015]=58,[30016]=59,[30017]=60, [30018]=61,[30019]=62,[30020]=63,[40000]=64,[40001]=65,[40002]=66,[40003]=67,[40004]=68,[40005]=69,[40006]=70,[40007]=71,[40008]=72,[40009]=73,[40010]=74,[40011]=75, [40012]=76,[40013]=77,[40014]=78,[40015]=79,[40016]=80,[40017]=81,[40018]=82,[40019]=83,[40020]=84,} local L_NamesByNum = { Id = 1, Site = 2, SuitLevel = 3, } local L_NamesByString = { Value = 4, } local L_ColNameIndexs = { Id = 0, Site = 1, SuitLevel = 2, Value = 3, } --local L_ColumnUseBitCount = {17,4,13,17,} --local L_ColumnList = {1,1,1,1,} --local L_ShiftDataList = {0,17,21,34,} --local L_AndDataList = {65535,7,4095,65535,} local L_ColumnShiftAndList = {1,0,65535,1,17,7,1,21,4095,1,34,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 = 84 } 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