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

247 lines
9.6 KiB
Lua

--文件是自动生成,请勿手动修改.来自数据文件:level_reward
local L_CompressMaxColumn = 1
local L_CompressData = {
49061381689640990,
--30,12_200_1_9;2_20_1_9;3_20000_1_9;10001_2_1_9,12_200_1_9;2_40_1_9,2,-1,1,5,,
94097378500214834,
--50,2069_1_1_9;2_20_1_9;3_25000_1_9;10001_3_1_9,19021_3_1_9;2_40_1_9,2,-1,1,10,,
94097377963341889,
--65,12_200_1_9;2_20_1_9;3_30000_1_9;14_2000_1_9,12_200_1_9;2_40_1_9,2,-1,1,10,,
94132562872299595,
--75,19021_3_1_9;2_20_1_9;3_35000_1_9;10001_4_1_9,19021_3_1_9;2_40_1_9,3,-1,1,10,,
94132562335426640,
--80,12_200_1_9;2_20_1_9;3_40000_1_9;16001_5_1_9,12_200_1_9;2_40_1_9,3,-1,1,10,,
94132562872295514,
--90,19021_3_1_9;2_20_1_9;3_45000_1_9;16001_5_1_9,19021_3_1_9;2_40_1_9,3,-1,1,10,,
94132563677599844,
--100,1011_1_1_9;2_20_1_9;3_50000_1_9;60002_2_1_9,1011_1_1_9;2_40_1_9,3,-1,1,10,,
94132562335420526,
--110,12_200_1_9;2_20_1_9;3_55000_1_9;60002_3_1_9,12_200_1_9;2_40_1_9,3,-1,1,10,,
49131751775979640,
--120,1011_1_1_9;2_20_1_9;3_60000_1_9;11001_5_1_9,1011_1_1_9;2_40_1_9,4,-1,1,5,,
49131750433800322,
--130,12_200_1_9;2_20_1_9;3_65000_1_9;60002_5_1_9,12_200_1_9;2_40_1_9,4,-1,1,5,,
49131752266711180,
--140,1021_1_1_9;2_20_1_9;3_70000_1_9;81071_1_1_0;81072_1_1_1;81071_1_1_2;81072_1_1_3,1021_1_1_9;2_40_1_9,4,-1,1,5,,
49131750433796246,
--150,12_200_1_9;2_20_1_9;3_75000_1_9;19021_3_1_9,12_200_1_9;2_40_1_9,4,-1,1,5,,
49131751775971488,
--160,1011_1_1_9;2_20_1_9;3_80000_1_9;19021_5_1_9,1011_1_1_9;2_40_1_9,4,-1,1,5,,
49131752849711274,
--170,60002_5_1_9;2_20_1_9;3_85000_1_9;20001_1_1_9,60002_5_1_9;2_40_1_9,4,-1,1,5,,
49131752312838324,
--180,1021_1_1_9;2_20_1_9;3_90000_1_9;21001_1_1_9,1021_1_1_9;2_40_1_9,4,-1,1,5,,
49131752803377342,
--190,60002_5_1_9;2_20_1_9;3_95000_1_9;81073_1_1_0;81074_1_1_1;81073_1_1_2;81074_1_1_3,60002_5_1_9;2_40_1_9,4,-1,1,5,,
49166937758660808,
--200,1379_3_1_9;2_20_1_9;3_100000_1_9;11001_5_1_9,12_500_1_9;2_40_1_9,5,-1,1,5,,
49166936684921042,
--210,1021_1_1_9;2_20_1_9;3_105000_1_9;60003_4_1_9,1021_1_1_9;2_40_1_9,5,-1,1,5,,
49166934758785244,
--220,60008_10_1_9;2_20_1_9;3_110000_1_9;81012_1_1_0;81013_1_1_1;81012_1_1_2;81013_1_1_3,12_200_1_9;2_40_1_9,5,-1,1,5,,
49166937221787878,
--230,60002_5_1_9;2_20_1_9;3_115000_1_9;60003_6_1_9,60002_5_1_9;2_40_1_9,5,-1,1,5,,
49166936637802736,
--240,1021_1_1_9;2_20_1_9;3_120000_1_9;81075_1_1_0;81076_1_1_1;81075_1_1_2;81076_1_1_3,1021_1_1_9;2_40_1_9,5,-1,1,5,,
49166937758648570,
--250,1018_2_1_9;2_20_1_9;3_125000_1_9;83111_1_1_9,12_500_1_9;2_40_1_9,5,-1,1,5,,
49166937221781764,
--260,60002_5_1_9;2_20_1_9;3_130000_1_9;1098_5_1_9,60002_5_1_9;2_40_1_9,5,-1,1,5,,
49166936148037902,
--270,1011_1_1_9;2_20_1_9;3_135000_1_9;10005_1_1_9,1011_1_1_9;2_40_1_9,5,-1,1,5,,
49166937757847832,
--280,1018_3_1_9;2_20_1_9;3_140000_1_9;83113_1_1_9,12_500_1_9;2_40_1_9,5,-1,1,5,,
49166937221775650,
--290,60002_5_1_9;2_20_1_9;3_145000_1_9;19022_5_1_9,60002_5_1_9;2_40_1_9,5,-1,1,5,,
49202121009860908,
--300,1021_1_1_9;2_20_1_9;3_150000_1_9;81077_1_1_0;81078_1_1_1;81077_1_1_2;81078_1_1_3,1021_1_1_9;2_40_1_9,6,-1,1,5,,
49202122130731318,
--310,12_500_1_9;2_20_1_9;3_155000_1_9;11004_1_1_9,12_500_1_9;2_40_1_9,6,-1,1,5,,
49202121593858368,
--320,60002_5_1_9;2_20_1_9;3_160000_1_9;11005_1_1_9,60002_5_1_9;2_40_1_9,6,-1,1,5,,
49202120520114506,
--330,1011_1_1_9;2_20_1_9;3_165000_1_9;11006_1_1_9,1011_1_1_9;2_40_1_9,6,-1,1,5,,
49202119177935188,
--340,12_200_1_9;2_20_1_9;3_170000_1_9;11007_1_1_9,12_200_1_9;2_40_1_9,6,-1,1,5,,
49202121593852254,
--350,60002_5_1_9;2_20_1_9;3_175000_1_9;10007_1_1_9,60002_5_1_9;2_40_1_9,6,-1,1,5,,
49202121009830248,
--360,1021_1_1_9;2_20_1_9;3_180000_1_9;81079_1_1_0;81080_1_1_1;81079_1_1_2;81080_1_1_3,1021_1_1_9;2_40_1_9,6,-1,1,5,,
49202122130719090,
--370,12_500_1_9;2_20_1_9;3_185000_1_9;16196_1_1_9,12_500_1_9;2_40_1_9,6,-1,1,5,,
49202121593846140,
--380,60002_5_1_9;2_20_1_9;3_190000_1_9;16197_1_1_9,60002_5_1_9;2_40_1_9,6,-1,1,5,,
49202120520102278,
--390,1011_1_1_9;2_20_1_9;3_195000_1_9;16198_1_1_9,1011_1_1_9;2_40_1_9,6,-1,1,5,,
49237305965930896,
--400,1373_1_1_9;2_20_1_9;3_200000_1_9;16199_1_1_9,60002_5_1_9;2_40_1_9,7,-1,1,5,,
49237303550009754,
--410,12_200_1_9;2_20_1_9;3_205000_1_9;10002_5_1_9,12_200_1_9;2_40_1_9,7,-1,1,5,,
49237305429055908,
--420,1021_1_1_9;2_20_1_9;3_210000_1_9;10004_2_1_9,1021_1_1_9;2_40_1_9,7,-1,1,5,,
49237306031763886,
--430,60002_5_1_9;2_20_1_9;3_215000_1_9;10005_2_1_9,60002_5_1_9;2_40_1_9,7,-1,1,5,,
49237303615656376,
--440,12_200_1_9;2_20_1_9;3_220000_1_9;10006_2_1_9,12_200_1_9;2_40_1_9,7,-1,1,5,,
49237304957577666,
--450,1011_1_1_9;2_20_1_9;3_225000_1_9;10007_2_1_9,1011_1_1_9;2_40_1_9,7,-1,1,5,,
49237306031315404,
--460,60002_5_1_9;2_20_1_9;3_230000_1_9;11002_5_1_9,60002_5_1_9;2_40_1_9,7,-1,1,5,,
49237303615392214,
--470,12_200_1_9;2_20_1_9;3_235000_1_9;11004_2_1_9,12_200_1_9;2_40_1_9,7,-1,1,5,,
49237305494403552,
--480,1021_1_1_9;2_20_1_9;3_240000_1_9;11005_2_1_9,1021_1_1_9;2_40_1_9,7,-1,1,5,,
49237306024319466,
--490,60002_5_1_9;2_20_1_9;3_245000_1_9;11006_2_1_9,60002_5_1_9;2_40_1_9,7,-1,1,5,,
49237303608386036,
--500,12_200_1_9;2_20_1_9;3_250000_1_9;11007_2_1_9,12_200_1_9;2_40_1_9,7,-1,1,5,,
49237304950534654,
--510,1011_1_1_9;2_20_1_9;3_255000_1_9;10003_5_1_9,1011_1_1_9;2_40_1_9,7,-1,1,5,,
49237306024262152,
--520,60002_5_1_9;2_20_1_9;3_260000_1_9;10004_4_1_9,60002_5_1_9;2_40_1_9,7,-1,1,5,,
49237303608314386,
--530,12_200_1_9;2_20_1_9;3_265000_1_9;10005_4_1_9,12_200_1_9;2_40_1_9,7,-1,1,5,,
49237305487352348,
--540,1021_1_1_9;2_20_1_9;3_270000_1_9;10006_4_1_9,1021_1_1_9;2_40_1_9,7,-1,1,5,,
49237306024180262,
--550,60002_5_1_9;2_20_1_9;3_275000_1_9;10007_4_1_9,60002_5_1_9;2_40_1_9,7,-1,1,5,,
49237303608203824,
--560,12_200_1_9;2_20_1_9;3_280000_1_9;11003_5_1_9,12_200_1_9;2_40_1_9,7,-1,1,5,,
49237304938129978,
--570,1011_1_1_9;2_20_1_9;3_285000_1_9;11004_4_1_9,1011_1_1_9;2_40_1_9,7,-1,1,5,,
49237306011867716,
--580,60002_5_1_9;2_20_1_9;3_290000_1_9;11005_4_1_9,60002_5_1_9;2_40_1_9,7,-1,1,5,,
49237303595944526,
--590,12_200_1_9;2_20_1_9;3_295000_1_9;11006_4_1_9,12_200_1_9;2_40_1_9,7,-1,1,5,,
49237305474988632,
--600,1021_1_1_9;2_20_1_9;3_300000_1_9;82384_1_1_9,1021_1_1_9;2_40_1_9,7,-1,1,5,,
}
local L_MainKeyDic = {
[30]=1,[50]=2,[65]=3,[75]=4,[80]=5,[90]=6,[100]=7,[110]=8,[120]=9,[130]=10,[140]=11,[150]=12,[160]=13,[170]=14,[180]=15,
[190]=16,[200]=17,[210]=18,[220]=19,[230]=20,[240]=21,[250]=22,[260]=23,[270]=24,[280]=25,[290]=26,[300]=27,[310]=28,[320]=29,[330]=30,
[340]=31,[350]=32,[360]=33,[370]=34,[380]=35,[390]=36,[400]=37,[410]=38,[420]=39,[430]=40,[440]=41,[450]=42,[460]=43,[470]=44,[480]=45,
[490]=46,[500]=47,[510]=48,[520]=49,[530]=50,[540]=51,[550]=52,[560]=53,[570]=54,[580]=55,[590]=56,[600]=57,}
local L_NamesByNum = {
QLevel = 1,
VipLimit = 4,
LimitValue = 5,
PaoPao = 6,
PushLimit = 7,
}
local L_NamesByString = {
QReward = 2,
QRewardVip = 3,
}
local L_ColNameIndexs = {
QLevel = 0,
QReward = 1,
QRewardVip = 2,
VipLimit = 3,
LimitValue = 4,
PaoPao = 5,
PushLimit = 6,
}
--local L_ColumnUseBitCount = {11,17,17,4,2,2,5,}
--local L_ColumnList = {1,1,1,1,1,1,1,}
--local L_ShiftDataList = {0,11,28,45,49,51,53,}
--local L_AndDataList = {1023,65535,65535,7,1,1,15,}
local L_ColumnShiftAndList = {1,0,1023,1,11,65535,1,28,65535,1,45,7,1,49,1,1,51,1,1,53,15,}
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 = 57
}
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