177 lines
12 KiB
Lua
177 lines
12 KiB
Lua
--文件是自动生成,请勿手动修改.来自数据文件:Cross_Alien_Connect_Show
|
|
local L_CompressMaxColumn = 1
|
|
local L_CompressData = {
|
|
7878264995709029,
|
|
--101,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709030,
|
|
--102,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709031,
|
|
--103,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709032,
|
|
--104,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709033,
|
|
--105,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709034,
|
|
--106,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709035,
|
|
--107,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709036,
|
|
--108,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709037,
|
|
--109,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709038,
|
|
--110,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709039,
|
|
--111,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709040,
|
|
--112,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995709041,
|
|
--113,1_21,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721417,
|
|
--201,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721418,
|
|
--202,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721419,
|
|
--203,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721420,
|
|
--204,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721421,
|
|
--205,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721422,
|
|
--206,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721423,
|
|
--207,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721424,
|
|
--208,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721425,
|
|
--209,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721426,
|
|
--210,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721427,
|
|
--211,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721428,
|
|
--212,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
7878264995721429,
|
|
--213,22_999,0_800,0_4013821;0_4013721;0_4012721;0_4013717;0_4013718;0_4013719;0_4013720;0_4012717;1_4113821;1_4113721;1_4112721;1_4113717;1_4113718;1_4113719;1_4113720;1_4112717;2_4013821;2_4013721;2_4012721;2_4013717;2_4013718;2_4013719;2_4013720;2_4012717;3_4113821;3_4113721;3_4112721;3_4113717;3_4113718;3_4113719;3_4113720;3_4112717,,
|
|
}
|
|
local L_MainKeyDic = {
|
|
[101]=1,[102]=2,[103]=3,[104]=4,[105]=5,[106]=6,[107]=7,[108]=8,[109]=9,[110]=10,[111]=11,[112]=12,[113]=13,[201]=14,[202]=15,
|
|
[203]=16,[204]=17,[205]=18,[206]=19,[207]=20,[208]=21,[209]=22,[210]=23,[211]=24,[212]=25,[213]=26,}
|
|
local L_NamesByNum = {
|
|
Id = 1,
|
|
}
|
|
local L_NamesByString = {
|
|
Day = 2,
|
|
Level = 3,
|
|
ShowReward = 4,
|
|
}
|
|
local L_ColNameIndexs = {
|
|
Id = 0,
|
|
Day = 1,
|
|
Level = 2,
|
|
ShowReward = 3,
|
|
}
|
|
--local L_ColumnUseBitCount = {9,16,14,15,}
|
|
--local L_ColumnList = {1,1,1,1,}
|
|
--local L_ShiftDataList = {0,9,25,39,}
|
|
--local L_AndDataList = {255,32767,8191,16383,}
|
|
local L_ColumnShiftAndList = {1,0,255,1,9,32767,1,25,8191,1,39,16383,}
|
|
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 = 26
|
|
}
|
|
|
|
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
|