--文件是自动生成,请勿手动修改.来自数据文件:SoulBeasts local L_CompressMaxColumn = 2 local L_CompressData = { 77082937008470785,554350577902, --1,子鼠,941,1,1,1_3_0;2_3_0;3_3_0;4_3_0;5_3_0,1_3899;2_104455;3_1949;4_1949,74001,4_2000_1,,,, 77091750289751042,554351102194, --2,丑牛,942,2,1,1_4_0;2_4_0;3_3_0;4_3_0;5_3_0,1_5845;2_156596;3_2922;4_2922,74002,4_3000_1,,,, 77100563571031299,554351626486, --3,寅虎,943,3,1,1_7_1;2_6_0;3_6_0;4_6_0;5_6_0,1_7995;2_214204;3_3997;4_3997,74003,2_1400_1,,,, 77109376852311556,554352150778, --4,卯兔,944,4,1,1_7_1;2_7_1;3_7_1;4_6_0;5_6_0,1_10352;2_277350;3_5176;4_5176,74004,1_2700_1,,,, 77118190133591813,554352675070, --5,辰龙,945,5,1,1_7_1;2_7_1;3_7_1;4_7_1;5_7_1,1_12950;2_346935;3_6475;4_6475,74002_74006,4_3000_1;4_1900_2,,,, 77127003414872070,17421388382374146, --6,巳蛇,946,6,1,1_7_3;2_7_1;3_7_1;4_7_1;5_7_1,1_15804;2_423411;3_7902;4_7902,74003_74005,2_1400_1;2_1000_2,10,14,, 77135816696152327,17421388382898438, --7,午马,947,7,1,1_7_3;2_7_3;3_7_3;4_7_1;5_7_1,1_18946;2_507593;3_9473;4_9473,74004_74007,1_2700_1;1_2100_2,10,14,, 77144629977432584,17421388383422730, --8,未羊,948,8,1,1_7_3;2_7_3;3_7_3;4_7_3;5_7_3,1_22394;2_599968;3_11197;4_11197,74008_74009,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77153443258712841,17421388383947022, --9,申猴,949,9,1,1_7_5;2_7_3;3_7_3;4_7_3;5_7_3,1_26193;2_701733;3_13096;4_13096,74008_74012,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77162256539993098,17421388384471314, --10,酉鸡,950,10,1,1_7_5;2_7_5;3_7_5;4_7_3;5_7_3,1_30384;2_814016;3_15192;4_15192,74008_74013,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77171069821273355,17421388384995606, --11,戌狗,951,11,1,1_7_5;2_7_5;3_7_5;4_7_5;5_7_5,1_34982;2_937200;3_17491;4_17491,74008_74014,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77171087009531404,17421388385388825, --12,亥猪,952,12,1,1_7_5;2_7_5;3_7_5;4_7_5;5_7_5,1_40031;2_1072465;3_20015;4_20015,74008_74015,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77170897938695885,17421388385782044, --13,灰仙,941,1,1,1_7_5;2_7_5;3_7_5;4_7_5;5_7_5,1_45602;2_1221702;3_22801;4_22801,74008_74016,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77192905359509390,17421388386306336, --14,太牢,942,2,1,1_8_5;2_7_5;3_7_5;4_7_5;5_7_5,1_51715;2_1385467;3_25857;4_25857,74008_74010,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77201718640789647,17421388386830628, --15,虎尊,943,3,1,1_8_5;2_8_5;3_8_5;4_7_5;5_7_5,1_58453;2_1565981;3_29226;4_29226,74008_74018,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77210531922069904,17421388387354920, --16,捣桂,944,4,1,1_8_5;2_8_5;3_8_5;4_8_5;5_8_5,1_65860;2_1764426;3_32930;4_32930,74008_74020_74013,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77210549110327953,17421388387748139, --17,龙王,945,5,1,1_8_5;2_8_5;3_8_5;4_8_5;5_8_5,1_74003;2_1982571;3_37001;4_37001,74008_74021_74015,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77210566298585938,17421388388141358, --18,腾蛇,946,6,1,1_8_5;2_8_5;3_8_5;4_8_5;5_8_5,1_82965;2_2222673;3_41482;4_41482,74008_74022_74015,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77232573719399443,17421388388665650, --19,神骏,947,7,1,1_9_5;2_8_5;3_8_5;4_8_5;5_8_5,1_92825;2_2486832;3_46412;4_46412,74008_74017_74023,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77241387000679700,17421388389189942, --20,开泰,948,8,1,1_9_5;2_9_5;3_9_5;4_9_5;5_9_5,1_103666;2_2777252;3_51833;4_51833,74008_74019_74024,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77241404188937749,17421388389583161, --21,灵明,949,9,1,1_9_5;2_9_5;3_9_5;4_9_5;5_9_5,1_108844;2_2915988;3_54422;4_54422,74008_74025_74011,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77241421377195734,17421388389976380, --22,昂日,950,10,1,1_9_5;2_9_5;3_9_5;4_9_5;5_9_5,1_114254;2_3060921;3_57127;4_57127,74008_74026_74027,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77241438565453719,17421388389976380, --23,蚀月,951,11,1,1_9_5;2_9_5;3_9_5;4_9_5;5_9_5,1_114254;2_3060921;3_57127;4_57127,74008_74026_74027,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, 77241455753711576,17421388389976380, --24,天蓬,952,12,1,1_9_5;2_9_5;3_9_5;4_9_5;5_9_5,1_114254;2_3060921;3_57127;4_57127,74008_74026_74027,1_1400_2;2_1400_2;3_1400_2;4_1400_2,10,14,, } local L_MainKeyDic = { [1]=1,[2]=2,[3]=3,[4]=4,[5]=5,[6]=6,[7]=7,[8]=8,[9]=9,[10]=10,[11]=11,[12]=12,[13]=13,[14]=14,[15]=15, [16]=16,[17]=17,[18]=18,[19]=19,[20]=20,[21]=21,[22]=22,[23]=23,[24]=24,} local L_NamesByNum = { Id = 1, Icon = 3, Text = 4, CanShow = 5, Notice = 9, } local L_NamesByString = { Name = 2, NeedEquip = 6, Attribute = 7, Skill = 8, Chatchannel = 10, } local L_ColNameIndexs = { Id = 0, Name = 1, Icon = 2, Text = 3, CanShow = 4, NeedEquip = 5, Attribute = 6, Skill = 7, Notice = 8, Chatchannel = 9, } --local L_ColumnUseBitCount = {6,17,11,5,2,17,17,17,5,16,} --local L_ColumnList = {1,1,1,1,1,1,2,2,2,2,} --local L_ShiftDataList = {0,6,23,34,39,41,0,17,34,39,} --local L_AndDataList = {31,65535,1023,15,1,65535,65535,65535,15,32767,} local L_ColumnShiftAndList = {1,0,31,1,6,65535,1,23,1023,1,34,15,1,39,1,1,41,65535,2,0,65535,2,17,65535,2,34,15,2,39,32767,} local L_ColNum = 10; 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 - 1)*L_CompressMaxColumn+L_ColumnShiftAndList[startIndex + 1]] 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 = 24 } 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