--文件是自动生成,请勿手动修改.来自数据文件:Equip_Collection_start local L_CompressMaxColumn = 2 local L_CompressData = { 9557027980461157,17592320296913, --101,1,18,60072_1,1_23;2_626,会心决,,,,, 9557577736299622,17592320296913, --102,1,21,60072_1,2_1065;3_11,会心决,,,,, 9557852614239335,17592320296913, --103,1,25,60072_1,3_20;4_20,会心决,,,,, 9558127492277352,17592320296913, --104,1,41,60072_1,1_40;4_11,会心决,,,,, 9558402370200681,17592320296913, --105,1,43,60072_1,2_1441;3_26,会心决,,,,, 9558677248140394,17592320296913, --106,1,47,60072_1,1_52;4_26,会心决,,,,, 9558879216460999,611808121667880913, --199,1,47,,23_2000,会心决,347,灵气灌体,引天地灵气入体,以气锻体,可入仙途。#n#n激活后可额外增加:[00FF00]会心几率+20%#n会心后可造成大量额外伤害,, 9560051660859593,17592320296924, --201,2,61,60073_1,1_31;2_835,灵体决,,,,, 9560601416722634,17592320296924, --202,2,67,60073_1,2_1420;3_15,灵体决,,,,, 9560876294637771,17592320296924, --203,2,68,60073_1,3_27;4_27,灵体决,,,,, 9561151172667596,17592320296924, --204,2,83,60073_1,1_54;4_15,灵体决,,,,, 9561426050607309,17592320296924, --205,2,87,60073_1,2_1921;3_35,灵体决,,,,, 9561700928620750,17592320296924, --206,2,100,60073_1,1_70;4_35,灵体决,,,,, 9561902873872683,611982801746167772, --299,2,100,,24_2000;59_1000;60_40;61_6000,灵体决,349,灵体护盾,灵体将成,可激活灵气护体,可额外获得[00ff00]20%会心抵抗[-]。#n#n激活后可获得:[00ff00]灵体护盾[-]。#n在与其他修仙者战斗时,[00ff00]灵气充盈[-]时可[00ff00]减免绝大部分[-]的伤害。,, } local L_MainKeyDic = { [101]=1,[102]=2,[103]=3,[104]=4,[105]=5,[106]=6,[199]=7,[201]=8,[202]=9,[203]=10,[204]=11,[205]=12,[206]=13,[299]=14,} local L_NamesByNum = { Id = 1, Grade = 2, Level = 3, Icon = 7, } local L_NamesByString = { Needitem = 4, Attribute = 5, Name = 6, Skillname = 8, Des = 9, } local L_ColNameIndexs = { Id = 0, Grade = 1, Level = 2, Needitem = 3, Attribute = 4, Name = 5, Icon = 6, Skillname = 7, Des = 8, } --local L_ColumnUseBitCount = {10,3,8,17,17,17,10,17,17,} --local L_ColumnList = {1,1,1,1,1,2,2,2,2,} --local L_ShiftDataList = {0,10,13,21,38,0,17,27,44,} --local L_AndDataList = {511,3,127,65535,65535,65535,511,65535,65535,} local L_ColumnShiftAndList = {1,0,511,1,10,3,1,13,127,1,21,65535,1,38,65535,2,0,65535,2,17,511,2,27,65535,2,44,65535,} local L_ColNum = 9; 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 = 14 } 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