297 lines
9.0 KiB
Lua
297 lines
9.0 KiB
Lua
--文件是自动生成,请勿手动修改.来自数据文件:Horse_equip_soulbound_class
|
|
local L_CompressMaxColumn = 1
|
|
local L_CompressData = {
|
|
61684320446224,
|
|
--10000,1,0,1_0;2_0;3_0;4_0,,
|
|
165175862896401,
|
|
--10001,1,5,1_203;2_5449;3_101;4_101,,
|
|
165180168349458,
|
|
--10002,1,10,1_508;2_13624;3_254;4_254,,
|
|
165184484288275,
|
|
--10003,1,20,1_915;2_24524;3_457;4_457,,
|
|
165188821198612,
|
|
--10004,1,40,1_1423;2_38148;3_711;4_711,,
|
|
165193158108949,
|
|
--10005,1,60,1_2034;2_54498;3_1017;4_1017,,
|
|
165197495019286,
|
|
--10006,1,80,1_2746;2_73573;3_1373;4_1373,,
|
|
165201831929623,
|
|
--10007,1,100,1_3559;2_95372;3_1779;4_1779,,
|
|
165206168839960,
|
|
--10008,1,120,1_4475;2_119896;3_2237;4_2237,,
|
|
165210547693337,
|
|
--10009,1,160,1_5492;2_147146;3_2746;4_2746,,
|
|
165214926546714,
|
|
--10010,1,200,1_6611;2_177120;3_3305;4_3305,,
|
|
165219326371611,
|
|
--10011,1,250,1_7831;2_209819;3_3915;4_3915,,
|
|
149194908247836,
|
|
--10012,1,300,1_9154;2_245243;3_4577;4_4577,,
|
|
165223831054109,
|
|
--10013,1,350,1_10578;2_283392;3_5289;4_5289,,
|
|
165228230879006,
|
|
--10014,1,400,1_12103;2_324266;3_6051;4_6051,,
|
|
165232630703903,
|
|
--10015,1,450,1_13731;2_367865;3_6865;4_6865,,
|
|
165237030528800,
|
|
--10016,1,500,1_15460;2_414188;3_7730;4_7730,,
|
|
165241430353697,
|
|
--10017,1,550,1_17291;2_463237;3_8645;4_8645,,
|
|
165245830178594,
|
|
--10018,1,600,1_19223;2_515011;3_9611;4_9611,,
|
|
165250334861091,
|
|
--10019,1,700,1_21258;2_569509;3_10629;4_10629,,
|
|
165254839543588,
|
|
--10020,1,800,1_23394;2_626733;3_11697;4_11697,,
|
|
61684320587296,
|
|
--20000,2,0,1_0;2_0;3_0;4_0,,
|
|
165175863037473,
|
|
--20001,2,5,1_203;2_5449;3_101;4_101,,
|
|
165180168490530,
|
|
--20002,2,10,1_508;2_13624;3_254;4_254,,
|
|
165184484429347,
|
|
--20003,2,20,1_915;2_24524;3_457;4_457,,
|
|
165188821339684,
|
|
--20004,2,40,1_1423;2_38148;3_711;4_711,,
|
|
165193158250021,
|
|
--20005,2,60,1_2034;2_54498;3_1017;4_1017,,
|
|
165197495160358,
|
|
--20006,2,80,1_2746;2_73573;3_1373;4_1373,,
|
|
165201832070695,
|
|
--20007,2,100,1_3559;2_95372;3_1779;4_1779,,
|
|
165206168981032,
|
|
--20008,2,120,1_4475;2_119896;3_2237;4_2237,,
|
|
165210547834409,
|
|
--20009,2,160,1_5492;2_147146;3_2746;4_2746,,
|
|
165214926687786,
|
|
--20010,2,200,1_6611;2_177120;3_3305;4_3305,,
|
|
165219326512683,
|
|
--20011,2,250,1_7831;2_209819;3_3915;4_3915,,
|
|
149194908388908,
|
|
--20012,2,300,1_9154;2_245243;3_4577;4_4577,,
|
|
165223831195181,
|
|
--20013,2,350,1_10578;2_283392;3_5289;4_5289,,
|
|
165228231020078,
|
|
--20014,2,400,1_12103;2_324266;3_6051;4_6051,,
|
|
165232630844975,
|
|
--20015,2,450,1_13731;2_367865;3_6865;4_6865,,
|
|
165237030669872,
|
|
--20016,2,500,1_15460;2_414188;3_7730;4_7730,,
|
|
165241430494769,
|
|
--20017,2,550,1_17291;2_463237;3_8645;4_8645,,
|
|
165245830319666,
|
|
--20018,2,600,1_19223;2_515011;3_9611;4_9611,,
|
|
165250335002163,
|
|
--20019,2,700,1_21258;2_569509;3_10629;4_10629,,
|
|
165254839684660,
|
|
--20020,2,800,1_23394;2_626733;3_11697;4_11697,,
|
|
61684320728368,
|
|
--30000,3,0,1_0;2_0;3_0;4_0,,
|
|
165175863178545,
|
|
--30001,3,5,1_203;2_5449;3_101;4_101,,
|
|
165180168631602,
|
|
--30002,3,10,1_508;2_13624;3_254;4_254,,
|
|
165184484570419,
|
|
--30003,3,20,1_915;2_24524;3_457;4_457,,
|
|
165188821480756,
|
|
--30004,3,40,1_1423;2_38148;3_711;4_711,,
|
|
165193158391093,
|
|
--30005,3,60,1_2034;2_54498;3_1017;4_1017,,
|
|
165197495301430,
|
|
--30006,3,80,1_2746;2_73573;3_1373;4_1373,,
|
|
165201832211767,
|
|
--30007,3,100,1_3559;2_95372;3_1779;4_1779,,
|
|
165206169122104,
|
|
--30008,3,120,1_4475;2_119896;3_2237;4_2237,,
|
|
165210547975481,
|
|
--30009,3,160,1_5492;2_147146;3_2746;4_2746,,
|
|
165214926828858,
|
|
--30010,3,200,1_6611;2_177120;3_3305;4_3305,,
|
|
165219326653755,
|
|
--30011,3,250,1_7831;2_209819;3_3915;4_3915,,
|
|
149194908529980,
|
|
--30012,3,300,1_9154;2_245243;3_4577;4_4577,,
|
|
165223831336253,
|
|
--30013,3,350,1_10578;2_283392;3_5289;4_5289,,
|
|
165228231161150,
|
|
--30014,3,400,1_12103;2_324266;3_6051;4_6051,,
|
|
165232630986047,
|
|
--30015,3,450,1_13731;2_367865;3_6865;4_6865,,
|
|
165237030810944,
|
|
--30016,3,500,1_15460;2_414188;3_7730;4_7730,,
|
|
165241430635841,
|
|
--30017,3,550,1_17291;2_463237;3_8645;4_8645,,
|
|
165245830460738,
|
|
--30018,3,600,1_19223;2_515011;3_9611;4_9611,,
|
|
165250335143235,
|
|
--30019,3,700,1_21258;2_569509;3_10629;4_10629,,
|
|
165254839825732,
|
|
--30020,3,800,1_23394;2_626733;3_11697;4_11697,,
|
|
61684320869440,
|
|
--40000,4,0,1_0;2_0;3_0;4_0,,
|
|
165175863319617,
|
|
--40001,4,5,1_203;2_5449;3_101;4_101,,
|
|
165180168772674,
|
|
--40002,4,10,1_508;2_13624;3_254;4_254,,
|
|
165184484711491,
|
|
--40003,4,20,1_915;2_24524;3_457;4_457,,
|
|
165188821621828,
|
|
--40004,4,40,1_1423;2_38148;3_711;4_711,,
|
|
165193158532165,
|
|
--40005,4,60,1_2034;2_54498;3_1017;4_1017,,
|
|
165197495442502,
|
|
--40006,4,80,1_2746;2_73573;3_1373;4_1373,,
|
|
165201832352839,
|
|
--40007,4,100,1_3559;2_95372;3_1779;4_1779,,
|
|
165206169263176,
|
|
--40008,4,120,1_4475;2_119896;3_2237;4_2237,,
|
|
165210548116553,
|
|
--40009,4,160,1_5492;2_147146;3_2746;4_2746,,
|
|
165214926969930,
|
|
--40010,4,200,1_6611;2_177120;3_3305;4_3305,,
|
|
165219326794827,
|
|
--40011,4,250,1_7831;2_209819;3_3915;4_3915,,
|
|
149194908671052,
|
|
--40012,4,300,1_9154;2_245243;3_4577;4_4577,,
|
|
165223831477325,
|
|
--40013,4,350,1_10578;2_283392;3_5289;4_5289,,
|
|
165228231302222,
|
|
--40014,4,400,1_12103;2_324266;3_6051;4_6051,,
|
|
165232631127119,
|
|
--40015,4,450,1_13731;2_367865;3_6865;4_6865,,
|
|
165237030952016,
|
|
--40016,4,500,1_15460;2_414188;3_7730;4_7730,,
|
|
165241430776913,
|
|
--40017,4,550,1_17291;2_463237;3_8645;4_8645,,
|
|
165245830601810,
|
|
--40018,4,600,1_19223;2_515011;3_9611;4_9611,,
|
|
165250335284307,
|
|
--40019,4,700,1_21258;2_569509;3_10629;4_10629,,
|
|
165254839966804,
|
|
--40020,4,800,1_23394;2_626733;3_11697;4_11697,,
|
|
}
|
|
local L_MainKeyDic = {
|
|
[10000]=1,[10001]=2,[10002]=3,[10003]=4,[10004]=5,[10005]=6,[10006]=7,[10007]=8,[10008]=9,[10009]=10,[10010]=11,[10011]=12,[10012]=13,[10013]=14,[10014]=15,
|
|
[10015]=16,[10016]=17,[10017]=18,[10018]=19,[10019]=20,[10020]=21,[20000]=22,[20001]=23,[20002]=24,[20003]=25,[20004]=26,[20005]=27,[20006]=28,[20007]=29,[20008]=30,
|
|
[20009]=31,[20010]=32,[20011]=33,[20012]=34,[20013]=35,[20014]=36,[20015]=37,[20016]=38,[20017]=39,[20018]=40,[20019]=41,[20020]=42,[30000]=43,[30001]=44,[30002]=45,
|
|
[30003]=46,[30004]=47,[30005]=48,[30006]=49,[30007]=50,[30008]=51,[30009]=52,[30010]=53,[30011]=54,[30012]=55,[30013]=56,[30014]=57,[30015]=58,[30016]=59,[30017]=60,
|
|
[30018]=61,[30019]=62,[30020]=63,[40000]=64,[40001]=65,[40002]=66,[40003]=67,[40004]=68,[40005]=69,[40006]=70,[40007]=71,[40008]=72,[40009]=73,[40010]=74,[40011]=75,
|
|
[40012]=76,[40013]=77,[40014]=78,[40015]=79,[40016]=80,[40017]=81,[40018]=82,[40019]=83,[40020]=84,}
|
|
local L_NamesByNum = {
|
|
Id = 1,
|
|
Site = 2,
|
|
SuitLevel = 3,
|
|
}
|
|
local L_NamesByString = {
|
|
Value = 4,
|
|
}
|
|
local L_ColNameIndexs = {
|
|
Id = 0,
|
|
Site = 1,
|
|
SuitLevel = 2,
|
|
Value = 3,
|
|
}
|
|
--local L_ColumnUseBitCount = {17,4,11,17,}
|
|
--local L_ColumnList = {1,1,1,1,}
|
|
--local L_ShiftDataList = {0,17,21,32,}
|
|
--local L_AndDataList = {65535,7,1023,65535,}
|
|
local L_ColumnShiftAndList = {1,0,65535,1,17,7,1,21,1023,1,32,65535,}
|
|
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 = 84
|
|
}
|
|
|
|
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
|