--文件是自动生成,请勿手动修改.来自数据文件:clone_daneng local L_CompressMaxColumn = 3 local L_CompressData = { 54990348538881,109951194234900000,9023, --1,100000,110,200,20000,60000,200000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 68746460899330,164926786109480000,9023, --2,200000,201,250,40000,80000,300000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 82497070332931,219902377984060000,9023, --3,300000,251,300,60000,100000,400000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 96247679766532,274877969858640000,9023, --4,400000,301,350,80000,120000,500000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 109998289200133,329853561733220000,9023, --5,500000,351,400,100000,140000,600000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 123748898633734,384829153607800000,9023, --6,600000,401,450,120000,160000,700000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 137499508067335,439804745482380000,9023, --7,700000,451,500,140000,180000,800000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 151250117500936,494780337356960000,9023, --8,800000,501,550,160000,200000,900000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 165000726934537,549755929231540000,9023, --9,900000,551,600,180000,220000,1000000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 178751336368138,604731521106120000,9023, --10,1000000,601,650,200000,240000,1100000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 192501945801739,659707112980700000,9023, --11,1100000,651,700,220000,260000,1200000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 206252555235340,714682704855280000,9023, --12,1200000,701,750,240000,280000,1300000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, 220003164668941,769658296729860000,9023, --13,1300000,751,800,260000,300000,1400000,60002_10_1;60002_20_2;60002_30_3,60002_1;8_1;81032_1,, } 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,} local L_NamesByNum = { Id = 1, MonsterFightNum = 2, MinLv = 3, MaxLv = 4, MonsterMaxHp1 = 5, MonsterMaxHp2 = 6, MonsterMaxHp3 = 7, } local L_NamesByString = { ParticipationAward = 8, } local L_ColNameIndexs = { Id = 0, MonsterFightNum = 1, MinLv = 2, MaxLv = 3, MonsterMaxHp1 = 4, MonsterMaxHp2 = 5, MonsterMaxHp3 = 6, ParticipationAward = 7, } --local L_ColumnUseBitCount = {5,22,11,11,19,20,22,15,} --local L_ColumnList = {1,1,1,1,2,2,2,3,} --local L_ShiftDataList = {0,5,27,38,0,19,39,0,} --local L_AndDataList = {15,2097151,1023,1023,262143,524287,2097151,16383,} local L_ColumnShiftAndList = {1,0,15,1,5,2097151,1,27,1023,1,38,1023,2,0,262143,2,19,524287,2,39,2097151,3,0,16383,} local L_ColNum = 8; 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 = 13 } 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