237 lines
7.0 KiB
Lua
237 lines
7.0 KiB
Lua
--文件是自动生成,请勿手动修改.来自数据文件:KaoShangLing_Horse
|
|
local L_CompressMaxColumn = 2
|
|
local L_CompressData = {
|
|
1322231452501664,38483,
|
|
--100000,1,0,82384_1,82385_1,0,0,,
|
|
1322232081647414,38483,
|
|
--100150,1,150,82384_1,82385_1,0,0,,
|
|
1322267070531532,38484,
|
|
--100300,1,300,82385_1,82386_1,0,0,,
|
|
1322267699677282,38484,
|
|
--100450,1,450,82385_1,82386_1,0,0,,
|
|
1322268328823032,38484,
|
|
--100600,1,600,82385_1,82386_1,0,0,,
|
|
1322337677445518,38486,
|
|
--100750,1,750,82393_3,1315_1,0,0,,
|
|
1322303946852900,38487,
|
|
--100900,1,900,82386_1,82387_1,0,0,,
|
|
1322304575998650,38487,
|
|
--101050,1,1050,82386_1,82387_1,0,0,,
|
|
1322305205144400,38487,
|
|
--101200,1,1200,82386_1,82387_1,0,0,,
|
|
1322408913505254,38488,
|
|
--101350,1,1350,82387_1,82388_1,0,0,,
|
|
1322478262127740,38486,
|
|
--101500,1,1500,82393_6,1315_1,0,0,,
|
|
1322410171796754,38488,
|
|
--101650,1,1650,82387_1,82388_1,0,0,,
|
|
1322410800942504,38488,
|
|
--101800,1,1800,82387_1,82388_1,0,0,,
|
|
1322411430088254,38488,
|
|
--101950,1,1950,82387_1,82388_1,0,0,,
|
|
1322446418972372,38490,
|
|
--102100,1,2100,82388_1,82389_1,0,0,,
|
|
1322550127333226,38492,
|
|
--102250,1,2250,82393_9,82391_1,0,0,,
|
|
1322447677263872,38490,
|
|
--102400,1,2400,82388_1,82389_1,0,0,,
|
|
1322448306409622,38490,
|
|
--102550,1,2550,82388_1,82389_1,0,0,,
|
|
1322448935555372,38490,
|
|
--102700,1,2700,82388_1,82389_1,0,0,,
|
|
1322449564701122,38490,
|
|
--102850,1,2850,82388_1,82389_1,0,0,,
|
|
1322621992538712,38486,
|
|
--103000,1,3000,82393_12,1315_1,0,0,,
|
|
1322519542469358,38494,
|
|
--103150,1,3150,82389_1,82390_1,0,0,,
|
|
1322520171615108,38494,
|
|
--103300,1,3300,82389_1,82390_1,0,0,,
|
|
1322520800760858,38494,
|
|
--103450,1,3450,82389_1,82390_1,0,0,,
|
|
1322521429906608,38494,
|
|
--103600,1,3600,82389_1,82390_1,0,0,,
|
|
1322693857744198,533131,
|
|
--103750,1,3750,82392_1,1311_2,0,1,,
|
|
55456618974528,132686,
|
|
--200000,2,0,1306_5,1306_5,1,0,,
|
|
55457248120278,132686,
|
|
--200150,2,150,1306_5,1306_5,1,0,,
|
|
55457877266028,132686,
|
|
--200300,2,300,1306_5,1306_5,1,0,,
|
|
55458506411778,132686,
|
|
--200450,2,450,1306_5,1306_5,1,0,,
|
|
55459135557528,132686,
|
|
--200600,2,600,1306_5,1306_5,1,0,,
|
|
1322337678069806,169558,
|
|
--200750,2,750,82393_3,1315_1,1,0,,
|
|
55460393849028,132686,
|
|
--200900,2,900,1306_5,1306_5,1,0,,
|
|
55461022994778,132686,
|
|
--201050,2,1050,1306_5,1306_5,1,0,,
|
|
55461652140528,132686,
|
|
--201200,2,1200,1306_5,1306_5,1,0,,
|
|
55462281286278,132686,
|
|
--201350,2,1350,1306_5,1306_5,1,0,,
|
|
1322478262752028,169558,
|
|
--201500,2,1500,82393_6,1315_1,1,0,,
|
|
55463539577778,132686,
|
|
--201650,2,1650,1306_5,1306_5,1,0,,
|
|
55464168723528,132686,
|
|
--201800,2,1800,1306_5,1306_5,1,0,,
|
|
55464797869278,132686,
|
|
--201950,2,1950,1306_5,1306_5,1,0,,
|
|
55465427015028,132686,
|
|
--202100,2,2100,1306_5,1306_5,1,0,,
|
|
1322550127957514,169558,
|
|
--202250,2,2250,82393_9,1315_1,1,0,,
|
|
55466685306528,132686,
|
|
--202400,2,2400,1306_5,1306_5,1,0,,
|
|
55467314452278,132686,
|
|
--202550,2,2550,1306_5,1306_5,1,0,,
|
|
55467943598028,132686,
|
|
--202700,2,2700,1306_5,1306_5,1,0,,
|
|
55468572743778,132686,
|
|
--202850,2,2850,1306_5,1306_5,1,0,,
|
|
1322621993163000,169558,
|
|
--203000,2,3000,82393_12,1315_1,1,0,,
|
|
55469831035278,132686,
|
|
--203150,2,3150,1306_5,1306_5,1,0,,
|
|
55470460181028,132686,
|
|
--203300,2,3300,1306_5,1306_5,1,0,,
|
|
55471089326778,132686,
|
|
--203450,2,3450,1306_5,1306_5,1,0,,
|
|
55471718472528,132686,
|
|
--203600,2,3600,1306_5,1306_5,1,0,,
|
|
1322728218106854,664203,
|
|
--203750,2,3750,82393_20,1311_2,1,1,,
|
|
}
|
|
local L_MainKeyDic = {
|
|
[100000]=1,[100150]=2,[100300]=3,[100450]=4,[100600]=5,[100750]=6,[100900]=7,[101050]=8,[101200]=9,[101350]=10,[101500]=11,[101650]=12,[101800]=13,[101950]=14,[102100]=15,
|
|
[102250]=16,[102400]=17,[102550]=18,[102700]=19,[102850]=20,[103000]=21,[103150]=22,[103300]=23,[103450]=24,[103600]=25,[103750]=26,[200000]=27,[200150]=28,[200300]=29,[200450]=30,
|
|
[200600]=31,[200750]=32,[200900]=33,[201050]=34,[201200]=35,[201350]=36,[201500]=37,[201650]=38,[201800]=39,[201950]=40,[202100]=41,[202250]=42,[202400]=43,[202550]=44,[202700]=45,
|
|
[202850]=46,[203000]=47,[203150]=48,[203300]=49,[203450]=50,[203600]=51,[203750]=52,}
|
|
local L_NamesByNum = {
|
|
Id = 1,
|
|
Rank = 2,
|
|
Score = 3,
|
|
IfEnd = 6,
|
|
IfLast = 7,
|
|
}
|
|
local L_NamesByString = {
|
|
CommonReward = 4,
|
|
SpecailReward = 5,
|
|
}
|
|
local L_ColNameIndexs = {
|
|
Id = 0,
|
|
Rank = 1,
|
|
Score = 2,
|
|
CommonReward = 3,
|
|
SpecailReward = 4,
|
|
IfEnd = 5,
|
|
IfLast = 6,
|
|
}
|
|
--local L_ColumnUseBitCount = {19,3,13,17,17,2,2,}
|
|
--local L_ColumnList = {1,1,1,1,2,2,2,}
|
|
--local L_ShiftDataList = {0,19,22,35,0,17,19,}
|
|
--local L_AndDataList = {262143,3,4095,65535,65535,1,1,}
|
|
local L_ColumnShiftAndList = {1,0,262143,1,19,3,1,22,4095,1,35,65535,2,0,65535,2,17,1,2,19,1,}
|
|
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 - 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 = 52
|
|
}
|
|
|
|
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
|