Files
2025-01-25 04:38:09 +08:00

243 lines
9.7 KiB
Lua

--文件是自动生成,请勿手动修改.来自数据文件:wash
local L_CompressMaxColumn = 1
local L_CompressData = {
8919752795059134475,
--11,0,1,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059142668,
--12,0,2,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059150861,
--13,0,3,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059159054,
--14,0,4,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059167247,
--15,0,5,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059134741,
--21,1,1,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059142934,
--22,1,2,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059151127,
--23,1,3,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059159320,
--24,1,4,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059167513,
--25,1,5,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059135007,
--31,2,1,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059143200,
--32,2,2,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059151393,
--33,2,3,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059159586,
--34,2,4,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059167779,
--35,2,5,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059135273,
--41,3,1,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059143466,
--42,3,2,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059151659,
--43,3,3,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059159852,
--44,3,4,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059168045,
--45,3,5,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059135539,
--51,4,1,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059143732,
--52,4,2,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059151925,
--53,4,3,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059160118,
--54,4,4,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059168311,
--55,4,5,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059135805,
--61,5,1,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059143998,
--62,5,2,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059152191,
--63,5,3,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059160384,
--64,5,4,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059168577,
--65,5,5,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059136071,
--71,6,1,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059144264,
--72,6,2,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059152457,
--73,6,3,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059160650,
--74,6,4,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059168843,
--75,6,5,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059136337,
--81,7,1,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059144530,
--82,7,2,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059152723,
--83,7,3,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059160916,
--84,7,4,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059169109,
--85,7,5,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059136603,
--91,8,1,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059144796,
--92,8,2,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059152989,
--93,8,3,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059161182,
--94,8,4,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059169375,
--95,8,5,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059136869,
--101,9,1,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059145062,
--102,9,2,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059153255,
--103,9,3,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059161448,
--104,9,4,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059169641,
--105,9,5,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059137135,
--111,10,1,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059145328,
--112,10,2,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059153521,
--113,10,3,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059161714,
--114,10,4,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
8919752795059169907,
--115,10,5,0_1999_1450;2000_3999_4500;4000_6999_3500;7000_8999_500;9000_10000_50,500,10,14,,
}
local L_MainKeyDic = {
[11]=1,[12]=2,[13]=3,[14]=4,[15]=5,[21]=6,[22]=7,[23]=8,[24]=9,[25]=10,[31]=11,[32]=12,[33]=13,[34]=14,[35]=15,
[41]=16,[42]=17,[43]=18,[44]=19,[45]=20,[51]=21,[52]=22,[53]=23,[54]=24,[55]=25,[61]=26,[62]=27,[63]=28,[64]=29,[65]=30,
[71]=31,[72]=32,[73]=33,[74]=34,[75]=35,[81]=36,[82]=37,[83]=38,[84]=39,[85]=40,[91]=41,[92]=42,[93]=43,[94]=44,[95]=45,
[101]=46,[102]=47,[103]=48,[104]=49,[105]=50,[111]=51,[112]=52,[113]=53,[114]=54,[115]=55,}
local L_NamesByNum = {
Id = 1,
TypeEq = 2,
TypeV = 3,
Blessing = 5,
Notice = 6,
}
local L_NamesByString = {
Probability = 4,
Chatchannel = 7,
}
local L_ColNameIndexs = {
Id = 0,
TypeEq = 1,
TypeV = 2,
Probability = 3,
Blessing = 4,
Notice = 5,
Chatchannel = 6,
}
--local L_ColumnUseBitCount = {8,5,4,16,10,5,16,}
--local L_ColumnList = {1,1,1,1,1,1,1,}
--local L_ShiftDataList = {0,8,13,17,33,43,48,}
--local L_AndDataList = {127,15,7,32767,511,15,32767,}
local L_ColumnShiftAndList = {1,0,127,1,8,15,1,13,7,1,17,32767,1,33,511,1,43,15,1,48,32767,}
local L_ColNum = 7;
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 = 55
}
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