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

257 lines
14 KiB
Lua

--文件是自动生成,请勿手动修改.来自数据文件:pet
local L_CompressMaxColumn = 4
local L_CompressData = {
1717482269492481,667624406962113921,3903195043764894564,252199956147173,
--1,穷奇幼兽,1,1,1,833,6,6000001,100,220,-120,0,148,100,3_190000,0,90040011,108,1_173;2_4642;3_86;4_86,6,6,0,200_0_0_0_0_0,14,,
1717516656935682,666533863226051970,3903195043764895076,2029010746649598,
--2,送财金鼠,4,1,1,834,6,6000002,100,260,0,0,148,100,2_17002,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,200_0_0_0_0_0,115,,
1717551033451651,667448485101669763,3903195043764895588,269792679078910,
--3,帝江幼兽,6,1,1,835,6,6000003,100,220,-80,0,148,100,2_17003,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,200_0_20_0_0_0,15,,
1717585426744836,667448227403632004,3903195043764896100,199424203336702,
--4,小吒,10,1,1,836,6,6000004,100,160,-80,0,148,100,2_17004,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,250_0_0_0_0_0,11,,
1717619769706373,667360867768831365,3903195043764896612,234608843860990,
--5,鲛人,8,1,1,837,6,6000005,100,300,-60,0,148,100,2_17005,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,130_0_0_0_0_0,13,,
1717654121056518,856643778765360518,3903195043764897124,217015584074750,
--6,貔貅,7,1,1,838,6,6000006,100,250,-90,0,190,100,2_17006,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,200_0_0_0_0_0,12,,
1717688438852231,666533906175724935,3903195043764897380,1993827850955774,
--7,熊猫,2,1,1,839,6,6000007,100,270,0,0,148,100,2_17007,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,180_0_0_0_0_0,113,,
1717722857311240,792634652792425864,3903195043764897892,1976235664911358,
--8,妖狐,9,1,1,840,6,6000008,100,260,0,0,176,100,2_17008,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,180_0_0_0_0_0,112,,
1717757233827209,666533863226051977,3903195043764898148,1958643478866942,
--9,小浣熊,11,1,1,841,6,6000009,100,260,0,0,148,100,2_17009,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,180_0_0_0_0_0,111,,
1717791601954570,666621652357582218,3903195043764898404,1941049816427518,
--10,小老虎,12,1,1,842,6,6000010,100,220,20,0,148,100,2_17010,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,200_0_0_0_0_0,110,,
1719337731461259,666621652357582219,3903195043764898660,181831211985918,
--11,海龙,5,1,1,887,6,6000011,100,220,20,0,148,100,2_17011,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,200_0_0_0_0_0,10,,
1731158278377996,666621652357582220,3903195043764898916,41093723630590,
--12,大吃一鲸,100,1,1,1231,6,6000012,100,220,20,0,148,100,2_17012,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,200_0_0_0_0_0,2,,
1730230573831053,666621652357582221,3903195043764899172,23501537586174,
--13,花花公子,101,1,1,1204,6,6000013,100,220,20,0,148,100,2_17013,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,200_0_0_0_0_0,1,,
1730402380911886,666621652357582222,3903195043764899428,58685909675006,
--14,灵光,102,1,1,1209,6,6000014,100,220,20,0,148,100,2_17014,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,200_0_0_0_0_0,3,,
1729886993225359,666621652357582223,3903195043764899684,1782720142027774,
--15,雪宝,103,1,1,1194,6,6000015,100,220,20,0,148,100,2_17015,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,200_0_0_0_0_0,101,,
1729990080829456,666621652357582224,3903195043764899940,1800312328072190,
--16,小年,104,1,1,1197,6,6000016,100,220,20,0,148,100,2_17016,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,200_0_0_0_0_0,102,,
1734181121661329,666533906175724945,3903195043764900196,2011421513395198,
--17,福龙宝宝,3,1,1,1319,6,6000017,100,270,0,0,148,100,2_17017,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-35_0_0_0,114,,
1735246273551122,666533906175724946,3903195043764900708,2029011551955966,
--18,吉祥三宝,3,1,1,1350,6,6000018,100,270,0,0,148,100,2_17018,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,250_0_0_0_0_0,115,,
1735280633289875,666533906175724947,3903195043764900964,2046606288137214,
--19,吵吵先生,3,1,1,1351,6,6000019,100,270,0,0,148,100,2_17019,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-35_0_0_80,116,,
1734421639831060,666533906175724948,3903195043764901476,2064198071528446,
--20,虹光,3,1,1,1326,6,6000020,100,270,0,0,148,100,2_17020,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-35_0_0_0,117,,
1736517583871893,666533906175724949,3903195043764901732,2081790257572862,
--21,无忧,3,1,1,1387,6,6000021,100,270,0,0,148,100,2_17021,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-35_0_0_0,118,,
1741877703057686,666533906175724950,3903195043764901988,2099382443617278,
--22,寻宝灵鼠,3,1,1,1543,6,6000022,100,270,0,0,148,100,2_17022,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-35_0_0_0,119,,
1742118221226647,666533906175724951,3903195043764902244,2116974629661694,
--23,福贵,3,1,1,1550,6,6000023,100,270,0,0,148,100,2_17023,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-35_0_0_0,120,,
1747409620935704,666533906175724952,3903195043764902500,2134566815706110,
--24,小伏地魔,3,1,1,1704,6,6000024,100,270,0,0,148,100,2_17024,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-35_0_0_0,121,,
1747169102767513,666533906175724953,3903195043764902756,2152159001750526,
--25,咕咕将军,3,1,1,1697,6,6000025,100,270,0,0,148,100,2_17025,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-35_0_0_0,122,,
1746928584599322,666533906175724954,3903195043764903012,2169751187794942,
--26,妒忌,3,1,1,1690,6,6000026,100,270,0,0,148,100,2_17026,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-35_0_0_0,123,,
1751292355258523,666621652357582235,3903195043764903268,287388891655166,
--27,绵绵,13,1,1,1817,6,6000027,100,220,20,0,148,100,2_17027,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-25_0_0_0,16,,
1764243837528604,666621652357582236,3903195043764903780,304981077699582,
--28,花蕉,14,0,1,2194,6,6000028,100,220,20,0,148,100,2_17028,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-25_0_0_0,17,,
1751361091513245,666621652357582237,3903195043764904036,322573666397182,
--29,大美栗,15,1,1,1819,6,6000029,100,220,20,0,148,100,2_17029,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-15_0_0_0,18,,
1751395459640606,666621652357582238,3903195043764904548,340165449788414,
--30,逍遥,16,1,1,1820,6,6000030,100,220,20,0,148,100,2_17030,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-25_0_0_0,19,,
1764278222433951,666621652357582239,3903195043764904804,357757635832830,
--31,哈士郎,17,0,1,2195,6,6000031,100,220,20,0,148,100,2_17031,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-25_0_0_0,20,,
1751567275110432,666621652357582240,3903195043764905060,375350761401342,
--32,佩佩,18,1,1,1825,6,6000032,100,220,20,0,148,100,2_17032,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,350_0_-15_0_0_0,21,,
1766168024822177,666621652357582241,3903195043764905572,392943215881214,
--33,桃桃,19,0,1,2250,6,6000033,100,220,20,0,148,100,2_17033,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_-90_-15_0_0_0,22,,
1764140808647458,666621652357582242,3903195043764906084,410534596619262,
--34,松鼠菜菜子,20,0,1,2191,6,6000034,100,220,20,0,148,100,2_17034,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-15_0_0_0,23,,
1764312615728291,666621652357582243,3903195043764906340,428126782663678,
--35,枭十一郎,21,0,1,2196,6,6000035,100,220,20,0,148,100,2_17035,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-15_0_0_0,24,,
1751429869712932,666621652357582244,3903195043764906596,445718968708094,
--36,金云,22,1,1,1821,6,6000036,100,220,20,0,148,100,2_17036,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-15_0_0_0,25,,
1751464237840293,666621652357582245,3903195043764906852,463312631147518,
--37,瓜小美,23,1,1,1822,6,6000037,100,220,20,0,148,100,2_17037,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-15_0_0_90,26,,
1751498605967654,666621652357582246,3903195043764907364,480903340796926,
--38,达哒,24,1,1,1823,6,6000038,100,220,20,0,148,100,2_17038,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-15_0_0_0,27,,
1751601693571751,666621652357582247,3903195043764907620,498495526841342,
--39,库小巴,25,1,1,1826,6,6000039,100,220,20,0,148,100,2_17039,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-15_0_0_0,28,,
1766202443283496,666621652357582248,3903195043764907876,516088518192126,
--40,涂山叶叶,26,0,1,2251,6,6000040,100,220,20,0,148,100,2_17040,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_-90_-15_0_0_0,29,,
1751532990872873,666621652357582249,3903195043764908132,533679898930174,
--41,狸子叔,27,1,1,1824,6,6000041,100,220,20,0,148,100,2_17041,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-15_0_0_0,30,,
1766133740584618,666621652357582250,3903195043764908388,551274366675966,
--42,小仙猪,28,0,1,2249,6,6000042,100,220,20,0,148,100,2_17042,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_-90_-15_0_0_90,31,,
1764175243886507,666621652357582251,3903195043764908900,568866821155838,
--43,南飞飞,29,0,1,2192,6,6000043,100,220,20,0,148,100,2_17043,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_0_-15_0_0_230,32,,
1766099397624108,666621652357582252,3903195043764909412,586457262369790,
--44,猪刚强,30,0,1,2248,6,6000044,100,220,20,0,148,100,2_17044,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,300_-90_-15_0_0_0,33,,
1764209620402733,666621652357582253,3903195043764909668,604049179978750,
--45,雪狸,31,0,1,2193,6,6000045,100,220,20,0,148,100,2_17045,0,90040011,108,1_857;2_22980;3_428;4_428,6,6,0,350_0_-15_0_0_0,34,,
}
local L_MainKeyDic = {
[1]=1,[2]=2,[3]=3,[4]=4,[5]=5,[6]=6,[7]=7,[8]=8,[9]=9,[10]=10,[11]=11,[12]=12,[13]=13,[14]=14,[15]=15,
[16]=16,[17]=17,[18]=18,[19]=19,[20]=20,[21]=21,[22]=22,[23]=23,[24]=24,[25]=25,[26]=26,[27]=27,[28]=28,[29]=29,[30]=30,
[31]=31,[32]=32,[33]=33,[34]=34,[35]=35,[36]=36,[37]=37,[38]=38,[39]=39,[40]=40,[41]=41,[42]=42,[43]=43,[44]=44,[45]=45,
}
local L_NamesByNum = {
Id = 1,
Order = 3,
IsIgnore = 4,
IfFashion = 5,
Icon = 6,
Quality = 7,
Model = 8,
SceneScale = 9,
UiScale = 10,
UiModelHeight = 11,
GetUiHeight = 12,
SceneCameraYAdd = 13,
StrikeDistance = 14,
Equip = 16,
Baseskill = 17,
PetSkill = 18,
FullDegress = 20,
MaxDegree = 21,
IsShow = 22,
FllowRank = 24,
}
local L_NamesByString = {
Name = 2,
Unlock = 15,
Attribute = 19,
MainTransfom = 23,
}
local L_ColNameIndexs = {
Id = 0,
Name = 1,
Order = 2,
IsIgnore = 3,
IfFashion = 4,
Icon = 5,
Quality = 6,
Model = 7,
SceneScale = 8,
UiScale = 9,
UiModelHeight = 10,
GetUiHeight = 11,
SceneCameraYAdd = 12,
StrikeDistance = 13,
Unlock = 14,
Equip = 15,
Baseskill = 16,
PetSkill = 17,
Attribute = 18,
FullDegress = 19,
MaxDegree = 20,
IsShow = 21,
MainTransfom = 22,
FllowRank = 23,
}
--local L_ColumnUseBitCount = {7,16,8,2,2,13,4,24,8,10,8,2,9,8,17,2,28,8,17,4,4,2,17,8,}
--local L_ColumnList = {1,1,1,1,1,1,1,2,2,2,2,2,2,3,3,3,3,3,4,4,4,4,4,4,}
--local L_ShiftDataList = {0,7,23,31,33,35,48,0,24,32,42,50,52,0,8,25,27,55,0,17,21,25,27,44,}
--local L_AndDataList = {63,32767,127,1,1,4095,7,8388607,127,511,127,1,255,127,65535,1,134217727,127,65535,7,7,1,65535,127,}
local L_ColumnShiftAndList = {1,0,63,1,7,32767,1,23,127,1,31,1,1,33,1,1,35,4095,1,48,7,2,0,8388607,2,24,127,2,32,511,2,42,127,2,50,1,2,52,255,3,0,127,3,8,65535,3,25,1,3,27,134217727,3,55,127,4,0,65535,4,17,7,4,21,7,4,25,1,4,27,65535,4,44,127,}
local L_ColNum = 24;
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 = 45
}
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