252 lines
8.1 KiB
Lua
252 lines
8.1 KiB
Lua
--文件是自动生成,请勿手动修改.来自数据文件:Cross_devil_Group_Rank
|
|
local L_CompressMaxColumn = 2
|
|
local L_CompressData = {
|
|
270514767991937,34746,
|
|
--1,20009,1,1,0_800,1343_7_1_9;1344_10_1_9;1345_12_1_9,,
|
|
270515313251458,34747,
|
|
--2,20009,2,2,0_800,1343_6_1_9;1344_9_1_9;1345_11_1_9,,
|
|
270515858510979,34748,
|
|
--3,20009,3,3,0_800,1343_6_1_9;1344_8_1_9;1345_10_1_9,,
|
|
270516403770500,34749,
|
|
--4,20009,4,4,0_800,1343_5_1_9;1344_7_1_9;1345_9_1_9,,
|
|
270516949030021,34749,
|
|
--5,20009,5,5,0_800,1343_5_1_9;1344_7_1_9;1345_9_1_9,,
|
|
270517494289542,34750,
|
|
--6,20009,6,6,0_800,1343_4_1_9;1344_6_1_9;1345_8_1_9,,
|
|
270518039549063,34750,
|
|
--7,20009,7,7,0_800,1343_4_1_9;1344_6_1_9;1345_8_1_9,,
|
|
270518584808584,34751,
|
|
--8,20009,8,8,0_800,1343_4_1_9;1344_5_1_9;1345_7_1_9,,
|
|
270519130068105,34752,
|
|
--9,20009,9,9,0_800,1343_3_1_9;1344_5_1_9;1345_7_1_9,,
|
|
270519675327626,34753,
|
|
--10,20009,10,10,0_800,1343_3_1_9;1344_5_1_9;1345_6_1_9,,
|
|
270520220587147,34754,
|
|
--11,20009,11,11,0_800,1343_2_1_9;1344_4_1_9;1345_6_1_9,,
|
|
270520765846668,34755,
|
|
--12,20009,12,12,0_800,1343_2_1_9;1344_4_1_9;1345_5_1_9,,
|
|
270521311106189,34756,
|
|
--13,20009,13,13,0_800,1343_1_1_9;1344_4_1_9;1345_5_1_9,,
|
|
270521856365710,34757,
|
|
--14,20009,14,14,0_800,1343_1_1_9;1344_3_1_9;1345_5_1_9,,
|
|
270522401625231,34758,
|
|
--15,20009,15,15,0_800,1344_3_1_9;1345_4_1_9,,
|
|
270522946884752,34758,
|
|
--16,20009,16,16,0_800,1344_3_1_9;1345_4_1_9,,
|
|
270523492144273,34759,
|
|
--17,20009,17,17,0_800,1344_2_1_9;1345_4_1_9,,
|
|
270524037403794,34760,
|
|
--18,20009,18,18,0_800,1344_2_1_9;1345_3_1_9,,
|
|
270524582663315,34760,
|
|
--19,20009,19,19,0_800,1344_2_1_9;1345_3_1_9,,
|
|
270525127922836,34761,
|
|
--20,20009,20,20,0_800,1345_3_1_9,,
|
|
270514767992085,34747,
|
|
--21,20010,1,1,0_800,1343_6_1_9;1344_9_1_9;1345_11_1_9,,
|
|
270515313251606,34762,
|
|
--22,20010,2,2,0_800,1343_5_1_9;1344_8_1_9;1345_10_1_9,,
|
|
270515858511127,34749,
|
|
--23,20010,3,3,0_800,1343_5_1_9;1344_7_1_9;1345_9_1_9,,
|
|
270516403770648,34750,
|
|
--24,20010,4,4,0_800,1343_4_1_9;1344_6_1_9;1345_8_1_9,,
|
|
270516949030169,34750,
|
|
--25,20010,5,5,0_800,1343_4_1_9;1344_6_1_9;1345_8_1_9,,
|
|
270517494289690,34752,
|
|
--26,20010,6,6,0_800,1343_3_1_9;1344_5_1_9;1345_7_1_9,,
|
|
270518039549211,34752,
|
|
--27,20010,7,7,0_800,1343_3_1_9;1344_5_1_9;1345_7_1_9,,
|
|
270518584808732,34753,
|
|
--28,20010,8,8,0_800,1343_3_1_9;1344_5_1_9;1345_6_1_9,,
|
|
270519130068253,34754,
|
|
--29,20010,9,9,0_800,1343_2_1_9;1344_4_1_9;1345_6_1_9,,
|
|
270519675327774,34755,
|
|
--30,20010,10,10,0_800,1343_2_1_9;1344_4_1_9;1345_5_1_9,,
|
|
270520220587295,34756,
|
|
--31,20010,11,11,0_800,1343_1_1_9;1344_4_1_9;1345_5_1_9,,
|
|
270520765846816,34763,
|
|
--32,20010,12,12,0_800,1343_1_1_9;1344_3_1_9;1345_4_1_9,,
|
|
270521311106337,34758,
|
|
--33,20010,13,13,0_800,1344_3_1_9;1345_4_1_9,,
|
|
270521856365858,34758,
|
|
--34,20010,14,14,0_800,1344_3_1_9;1345_4_1_9,,
|
|
270522401625379,34760,
|
|
--35,20010,15,15,0_800,1344_2_1_9;1345_3_1_9,,
|
|
270522946884900,34760,
|
|
--36,20010,16,16,0_800,1344_2_1_9;1345_3_1_9,,
|
|
270523492144421,34760,
|
|
--37,20010,17,17,0_800,1344_2_1_9;1345_3_1_9,,
|
|
270524037403942,34764,
|
|
--38,20010,18,18,0_800,1344_1_1_9;1345_2_1_9,,
|
|
270524582663463,34764,
|
|
--39,20010,19,19,0_800,1344_1_1_9;1345_2_1_9,,
|
|
270525127922984,34764,
|
|
--40,20010,20,20,0_800,1344_1_1_9;1345_2_1_9,,
|
|
270514767992233,34762,
|
|
--41,20011,1,1,0_800,1343_5_1_9;1344_8_1_9;1345_10_1_9,,
|
|
270515313251754,34765,
|
|
--42,20011,2,2,0_800,1343_4_1_9;1344_7_1_9;1345_9_1_9,,
|
|
270515858511275,34750,
|
|
--43,20011,3,3,0_800,1343_4_1_9;1344_6_1_9;1345_8_1_9,,
|
|
270516403770796,34752,
|
|
--44,20011,4,4,0_800,1343_3_1_9;1344_5_1_9;1345_7_1_9,,
|
|
270516949030317,34752,
|
|
--45,20011,5,5,0_800,1343_3_1_9;1344_5_1_9;1345_7_1_9,,
|
|
270517494289838,34754,
|
|
--46,20011,6,6,0_800,1343_2_1_9;1344_4_1_9;1345_6_1_9,,
|
|
270518039549359,34754,
|
|
--47,20011,7,7,0_800,1343_2_1_9;1344_4_1_9;1345_6_1_9,,
|
|
270518584808880,34755,
|
|
--48,20011,8,8,0_800,1343_2_1_9;1344_4_1_9;1345_5_1_9,,
|
|
270519130068401,34757,
|
|
--49,20011,9,9,0_800,1343_1_1_9;1344_3_1_9;1345_5_1_9,,
|
|
270519675327922,34758,
|
|
--50,20011,10,10,0_800,1344_3_1_9;1345_4_1_9,,
|
|
270520220587443,34758,
|
|
--51,20011,11,11,0_800,1344_3_1_9;1345_4_1_9,,
|
|
270520765846964,34760,
|
|
--52,20011,12,12,0_800,1344_2_1_9;1345_3_1_9,,
|
|
270521311106485,34760,
|
|
--53,20011,13,13,0_800,1344_2_1_9;1345_3_1_9,,
|
|
270521856366006,34760,
|
|
--54,20011,14,14,0_800,1344_2_1_9;1345_3_1_9,,
|
|
270522401625527,34764,
|
|
--55,20011,15,15,0_800,1344_1_1_9;1345_2_1_9,,
|
|
270522946885048,34764,
|
|
--56,20011,16,16,0_800,1344_1_1_9;1345_2_1_9,,
|
|
270523492144569,34764,
|
|
--57,20011,17,17,0_800,1344_1_1_9;1345_2_1_9,,
|
|
270524037404090,34766,
|
|
--58,20011,18,18,0_800,1345_1_1_9,,
|
|
270524582663611,34766,
|
|
--59,20011,19,19,0_800,1345_1_1_9,,
|
|
270525127923132,34766,
|
|
--60,20011,20,20,0_800,1345_1_1_9,,
|
|
}
|
|
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,[25]=25,[26]=26,[27]=27,[28]=28,[29]=29,[30]=30,
|
|
[31]=31,[32]=32,[33]=33,[34]=34,[35]=35,[36]=36,[37]=37,[38]=38,[39]=39,[40]=40,[41]=41,[42]=42,[43]=43,[44]=44,[45]=45,
|
|
[46]=46,[47]=47,[48]=48,[49]=49,[50]=50,[51]=51,[52]=52,[53]=53,[54]=54,[55]=55,[56]=56,[57]=57,[58]=58,[59]=59,[60]=60,
|
|
}
|
|
local L_NamesByNum = {
|
|
Id = 1,
|
|
CopyType = 2,
|
|
LowerLimit = 3,
|
|
UpperLimit = 4,
|
|
}
|
|
local L_NamesByString = {
|
|
WorldLevelLimit = 5,
|
|
Reward = 6,
|
|
}
|
|
local L_ColNameIndexs = {
|
|
Id = 0,
|
|
CopyType = 1,
|
|
LowerLimit = 2,
|
|
UpperLimit = 3,
|
|
WorldLevelLimit = 4,
|
|
Reward = 5,
|
|
}
|
|
--local L_ColumnUseBitCount = {7,16,6,6,14,17,}
|
|
--local L_ColumnList = {1,1,1,1,1,2,}
|
|
--local L_ShiftDataList = {0,7,23,29,35,0,}
|
|
--local L_AndDataList = {63,32767,31,31,8191,65535,}
|
|
local L_ColumnShiftAndList = {1,0,63,1,7,32767,1,23,31,1,29,31,1,35,8191,2,0,65535,}
|
|
local L_ColNum = 6;
|
|
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 = 60
|
|
}
|
|
|
|
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
|