365 lines
9.6 KiB
Lua
365 lines
9.6 KiB
Lua
--文件是自动生成,请勿手动修改.来自数据文件:attributeAdd
|
|
local L_CompressMaxColumn = 1
|
|
local L_CompressData = {
|
|
2565367105519617,
|
|
--1,78000,攻击,0,1,1,,
|
|
4817168757440514,
|
|
--2,2500,生命,0,1,2,,
|
|
7068971027857411,
|
|
--3,78000,破甲,0,1,3,,
|
|
9320773079138308,
|
|
--4,100000,防御,0,1,4,,
|
|
225775032399036421,
|
|
--5,120000,精准,0,2,100,,
|
|
228026834360205318,
|
|
--6,120000,偏斜,0,2,101,,
|
|
32104982937607,
|
|
--7,25000,攻速,0,0,,,
|
|
32107028021256,
|
|
--8,0,移速,0,0,,,
|
|
234782239916032009,
|
|
--9,40000,幸运,0,2,104,,
|
|
32111732588554,
|
|
--10,100000,仙术攻击,0,0,,,
|
|
230278645034188811,
|
|
--11,150000,暴击,0,2,102,,
|
|
232530446995357708,
|
|
--12,150000,韧性,0,2,103,,
|
|
237101228296372237,
|
|
--13,100000,增伤,1,2,105,,
|
|
239356217123274766,
|
|
--14,100000,减伤,1,2,106,,
|
|
241608019084443663,
|
|
--15,100000,破击率,1,2,107,,
|
|
243859821045612560,
|
|
--16,100000,御破率,1,2,108,,
|
|
246111623006781457,
|
|
--17,100000,精准率,1,2,109,,
|
|
248363424967950354,
|
|
--18,100000,偏斜率,1,2,110,,
|
|
250615226929119251,
|
|
--19,100000,暴击率,1,2,111,,
|
|
252867028890288148,
|
|
--20,100000,抗暴率,1,2,112,,
|
|
255118830851457045,
|
|
--21,100000,控制延长,1,2,113,,
|
|
257370632812625942,
|
|
--22,100000,控制缩短,1,2,114,,
|
|
259622434364194839,
|
|
--23,0,会心几率,1,2,115,,
|
|
261874236325363736,
|
|
--24,0,会心抵抗,1,2,116,,
|
|
264126038696132633,
|
|
--25,100000,连击几率,1,2,117,,
|
|
266377840657301530,
|
|
--26,100000,格挡几率,1,2,118,,
|
|
268629642618470427,
|
|
--27,100000,追击几率,1,2,119,,
|
|
270881444579639324,
|
|
--28,100000,识破几率,1,2,120,,
|
|
45701464948998173,
|
|
--29,0,攻击加强,1,2,20,,
|
|
47953266910167070,
|
|
--30,0,生命增幅,1,2,21,,
|
|
50205068871335967,
|
|
--31,0,破甲强化,1,2,22,,
|
|
52456870832504864,
|
|
--32,0,防御加固,1,2,23,,
|
|
102527311806497,
|
|
--33,0,攻速加成提升比,1,0,,,
|
|
102529459290146,
|
|
--34,0,移速加成提升比,1,0,,,
|
|
281577508317429795,
|
|
--35,0,PVE增伤,1,0,125,,
|
|
283829310278598692,
|
|
--36,0,PVE减伤,1,0,126,,
|
|
286081112239767589,
|
|
--37,0,PVP增伤,1,0,127,,
|
|
288332914200936486,
|
|
--38,0,PVP减伤,1,0,128,,
|
|
290584716162105383,
|
|
--39,0,角色生命,1,0,129,,
|
|
292836518123274280,
|
|
--40,0,角色攻击,1,0,130,,
|
|
295088320084443177,
|
|
--41,0,角色防御,1,0,131,,
|
|
297340122045612074,
|
|
--42,0,角色破甲,1,0,132,,
|
|
299591924006780971,
|
|
--43,0,天元(经验效率),1,0,133,,
|
|
302406675921371180,
|
|
--44,0,战前回血,1,2,134,,
|
|
304025159184941101,
|
|
--45,0,风元素,0,0,135,,
|
|
306276961146109998,
|
|
--46,0,火元素,0,0,136,,
|
|
308528763107278895,
|
|
--47,0,水元素,0,0,137,,
|
|
310780565068447792,
|
|
--48,0,雷元素,0,0,138,,
|
|
313032367029616689,
|
|
--49,0,土元素,0,0,139,,
|
|
32195074850866,
|
|
--50,0,风元素抗性,0,0,,,
|
|
32197222334515,
|
|
--51,0,火元素抗性,0,0,,,
|
|
32199369818164,
|
|
--52,0,水元素抗性,0,0,,,
|
|
32201517301813,
|
|
--53,0,雷元素抗性,0,0,,,
|
|
32203664785462,
|
|
--54,0,土元素抗性,0,0,,,
|
|
315354548472381495,
|
|
--55,0,暴击伤害倍数,1,0,140,,
|
|
317606350433550392,
|
|
--56,0,会心伤害倍数,1,0,141,,
|
|
319858152394719289,
|
|
--57,0,连击伤害倍数,1,0,142,,
|
|
322109954355888186,
|
|
--58,0,追击伤害倍数,1,0,143,,
|
|
324291387572879419,
|
|
--59,0,灵力值,0,0,144,,
|
|
326543189534048316,
|
|
--60,0,灵力攻击,0,0,145,,
|
|
328865360239394877,
|
|
--61,0,灵力减伤,1,0,146,,
|
|
102589588832318,
|
|
--62,0,免伤,1,0,,,
|
|
102591736316905,
|
|
--1001,0,坐骑攻击,1,0,,,
|
|
102593883800554,
|
|
--1002,0,坐骑生命,1,0,,,
|
|
102596031284203,
|
|
--1003,0,坐骑破甲,1,0,,,
|
|
102598178767852,
|
|
--1004,0,坐骑防御,1,0,,,
|
|
102600326251501,
|
|
--1005,0,仙羽攻击,1,0,,,
|
|
102602473735150,
|
|
--1006,0,仙羽生命,1,0,,,
|
|
102604621218799,
|
|
--1007,0,仙羽破甲,1,0,,,
|
|
102606768702448,
|
|
--1008,0,仙羽防御,1,0,,,
|
|
102608916186097,
|
|
--1009,0,总提升,1,0,,,
|
|
102608916186098,
|
|
--1010,0,总提升,1,0,,,
|
|
102608916186099,
|
|
--1011,0,总提升,1,0,,,
|
|
102608916186100,
|
|
--1012,0,总提升,1,0,,,
|
|
102608916186101,
|
|
--1013,0,总提升,1,0,,,
|
|
102608916186102,
|
|
--1014,0,总提升,1,0,,,
|
|
102608916186103,
|
|
--1015,0,总提升,1,0,,,
|
|
102608916186104,
|
|
--1016,0,总提升,1,0,,,
|
|
102611063669753,
|
|
--1017,0,神兵攻击,1,0,,,
|
|
102613211153402,
|
|
--1018,0,神兵生命,1,0,,,
|
|
102615358637051,
|
|
--1019,0,神兵破甲,1,0,,,
|
|
102617506120700,
|
|
--1020,0,神兵防御,1,0,,,
|
|
102619653604349,
|
|
--1021,0,灵阵升级精准,1,0,,,
|
|
102621801087998,
|
|
--1022,0,灵阵升级偏斜,1,0,,,
|
|
102623948571647,
|
|
--1023,0,灵阵升级暴击,1,0,,,
|
|
102626096055296,
|
|
--1024,0,灵阵升级韧性,1,0,,,
|
|
102628243538945,
|
|
--1025,0,法宝1属性放大倍率,1,0,,,
|
|
102630391022594,
|
|
--1026,0,法宝2属性放大倍率,1,0,,,
|
|
102632538506243,
|
|
--1027,0,法宝3属性放大倍率,1,0,,,
|
|
102634685989892,
|
|
--1028,0,法宝4属性放大倍率,1,0,,,
|
|
102636833473541,
|
|
--1029,0,法宝5属性放大倍率,1,0,,,
|
|
102638980957190,
|
|
--1030,0,法宝6属性放大倍率,1,0,,,
|
|
102641128440839,
|
|
--1031,0,法宝7属性放大倍率,1,0,,,
|
|
102643275924488,
|
|
--1032,,装备生命,1,0,,,
|
|
102645423408137,
|
|
--1033,,装备防御,1,0,,,
|
|
102647570891786,
|
|
--1034,,装备破甲,1,0,,,
|
|
102649718375435,
|
|
--1035,,装备攻击,1,0,,,
|
|
102651865859084,
|
|
--1036,,当前选择神兵基础属性放大倍率,1,0,,,
|
|
102654013342733,
|
|
--1037,,圣装生命,1,,,,
|
|
102656160826382,
|
|
--1038,,圣装防御,1,,,,
|
|
102658308310031,
|
|
--1039,,圣装破甲,1,,,,
|
|
102660455793680,
|
|
--1040,,圣装攻击,1,,,,
|
|
102662603277329,
|
|
--1041,,圣装总生命,1,,,,
|
|
102664750760978,
|
|
--1042,,圣装总防御,1,,,,
|
|
102666898244627,
|
|
--1043,,圣装总破甲,1,,,,
|
|
102669045728276,
|
|
--1044,,圣装总攻击,1,,,,
|
|
102671193211925,
|
|
--1045,,圣装总属性,1,,,,
|
|
102673340695574,
|
|
--1046,0,法宝攻击,1,0,,,
|
|
102675488179223,
|
|
--1047,0,法宝生命,1,0,,,
|
|
102677635662872,
|
|
--1048,0,法宝破甲,1,0,,,
|
|
102679783146521,
|
|
--1049,0,法宝防御,1,0,,,
|
|
102681930630170,
|
|
--1050,0,宠物攻击,1,0,,,
|
|
102684078113819,
|
|
--1051,0,宠物生命,1,0,,,
|
|
102686225597468,
|
|
--1052,0,宠物破甲,1,0,,,
|
|
102688373081117,
|
|
--1053,0,宠物防御,1,0,,,
|
|
}
|
|
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,
|
|
[46]=46,[47]=47,[48]=48,[49]=49,[50]=50,[51]=51,[52]=52,[53]=53,[54]=54,[55]=55,[56]=56,[57]=57,[58]=58,[59]=59,[60]=60,
|
|
[61]=61,[62]=62,[1001]=63,[1002]=64,[1003]=65,[1004]=66,[1005]=67,[1006]=68,[1007]=69,[1008]=70,[1009]=71,[1010]=72,[1011]=73,[1012]=74,[1013]=75,
|
|
[1014]=76,[1015]=77,[1016]=78,[1017]=79,[1018]=80,[1019]=81,[1020]=82,[1021]=83,[1022]=84,[1023]=85,[1024]=86,[1025]=87,[1026]=88,[1027]=89,[1028]=90,
|
|
[1029]=91,[1030]=92,[1031]=93,[1032]=94,[1033]=95,[1034]=96,[1035]=97,[1036]=98,[1037]=99,[1038]=100,[1039]=101,[1040]=102,[1041]=103,[1042]=104,[1043]=105,
|
|
[1044]=106,[1045]=107,[1046]=108,[1047]=109,[1048]=110,[1049]=111,[1050]=112,[1051]=113,[1052]=114,[1053]=115,}
|
|
local L_NamesByNum = {
|
|
Id = 1,
|
|
Variable = 2,
|
|
ShowPercent = 4,
|
|
Hidden = 5,
|
|
Sorting = 6,
|
|
}
|
|
local L_NamesByString = {
|
|
Name = 3,
|
|
}
|
|
local L_ColNameIndexs = {
|
|
Id = 0,
|
|
Variable = 1,
|
|
Name = 2,
|
|
ShowPercent = 3,
|
|
Hidden = 4,
|
|
Sorting = 5,
|
|
}
|
|
--local L_ColumnUseBitCount = {12,19,15,2,3,9,}
|
|
--local L_ColumnList = {1,1,1,1,1,1,}
|
|
--local L_ShiftDataList = {0,12,31,46,48,51,}
|
|
--local L_AndDataList = {2047,262143,16383,1,3,255,}
|
|
local L_ColumnShiftAndList = {1,0,2047,1,12,262143,1,31,16383,1,46,1,1,48,3,1,51,255,}
|
|
local L_ColNum = 6;
|
|
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 = 115
|
|
}
|
|
|
|
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
|