--文件是自动生成,请勿手动修改.来自数据文件:AuctionMenu local L_CompressMaxColumn = 1 local L_CompressData = { 27021728766381057, --1,全部,,-1,-1,,-1,, 27021666485874434, --2,男性装备,,0,0,,-1,, 27132785916791939, --3,头盔,2,0,0,0,-1,, 27133198233652484, --4,武器,2,0,0,1,-1,, 27133266953129349, --5,胸甲,2,0,0,2,-1,, 27634163219058182, --6,项链,2,0,0,3,-1,, 27132992075222663, --7,腰带,2,0,0,4,-1,, 27132854636269320, --8,裤子,2,0,0,5,-1,, 27868634073681801, --9,鞋子,2,0,0,6,-1,, 27867053525717002, --10,戒指,2,0,0,7,-1,, 27021683665746827, --11,女性装备,,0,1,,-1,, 27132803247656076, --12,头盔,11,0,1,0,-1,, 27133215564516621, --13,武器,11,0,1,1,-1,, 27133284283993486, --14,胸甲,11,0,1,2,-1,, 27634180549922319, --15,项链,11,0,1,3,-1,, 27133009406086800, --16,腰带,11,0,1,4,-1,, 27132871967133457, --17,裤子,11,0,1,5,-1,, 27868651404545938, --18,鞋子,11,0,1,6,-1,, 27867070856581139, --19,戒指,11,0,1,7,-1,, 27021670780846612, --20,男性圣装,,2,0,,-1,, 30058590955262101, --21,履,20,2,0,101_112_123,-1,, 30058728394215830, --22,裤,20,2,0,102_113_124,-1,, 30058865833169559, --23,腕,20,2,0,103_114_125,-1,, 30059003272123288, --24,武,20,2,0,104_115_126,-1,, 30059140711077017, --25,衣,20,2,0,105_116_127,-1,, 30059278150030746, --26,冠,20,2,0,106_117_128,-1,, 30059346869505563, --27,项链,20,2,0,107_118_129,-1,, 30059415588982812, --28,戒指,20,2,0,108_119_130,-1,, 30059553027938205, --29,配饰,20,2,0,109_120_131,-1,, 30059690466891934, --30,耳环,20,2,0,110_121_132,-1,, 30059827905845663, --31,斗心,20,2,0,111_122_133,-1,, 27021687960720928, --32,女性圣装,,2,1,,-1,, 30058608336457889, --33,履,32,2,1,101_112_123,-1,, 30058745775411618, --34,裤,32,2,1,102_113_124,-1,, 30058883214365347, --35,腕,32,2,1,103_114_125,-1,, 30059020653319076, --36,武,32,2,1,104_115_126,-1,, 30059158092272805, --37,衣,32,2,1,105_116_127,-1,, 30059295531226534, --38,冠,32,2,1,106_117_128,-1,, 30059364250701351, --39,项链,32,2,1,107_118_129,-1,, 30059432970178600, --40,戒指,32,2,1,108_119_130,-1,, 30059570409133993, --41,配饰,32,2,1,109_120_131,-1,, 30059707848087722, --42,耳环,32,2,1,110_121_132,-1,, 30059845287041451, --43,斗心,32,2,1,111_122_133,-1,, 27021724466969644, --44,幻装,,3,-1,,-1,, 31333734935841965, --45,头盔,44,3,-1,441,-1,, 31333803655321774, --46,耳环,44,3,-1,442,-1,, 31333872374795823, --47,项链,44,3,-1,443,-1,, 31333941094603568, --48,衣服,44,3,-1,444,-1,, 31334009813749553, --49,裤子,44,3,-1,445,-1,, 31334078533225778, --50,武器,44,3,-1,446,-1,, 31334147252767923, --51,护腕,44,3,-1,447,-1,, 31334215972179892, --52,鞋子,44,3,-1,448,-1,, 31334284691656757, --53,戒指,44,3,-1,449,-1,, 30070258637338806, --54,手镯,44,3,-1,450,-1,, 27021685813240887, --55,材料,,1,1,,-1,, } 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,} local L_NamesByNum = { Id = 1, ParentId = 3, EquipOrItem = 4, EquipOcc = 5, ItemTradeType = 7, } local L_NamesByString = { Name = 2, EquipPart = 6, } local L_ColNameIndexs = { Id = 0, Name = 1, ParentId = 2, EquipOrItem = 3, EquipOcc = 4, EquipPart = 5, ItemTradeType = 6, } --local L_ColumnUseBitCount = {7,17,7,3,2,17,2,} --local L_ColumnList = {1,1,1,1,1,1,1,} --local L_ShiftDataList = {0,7,24,31,34,36,53,} --local L_AndDataList = {63,65535,63,3,1,65535,1,} local L_ColumnShiftAndList = {1,0,63,1,7,65535,1,24,63,1,31,3,1,34,1,1,36,65535,1,53,1,} 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 = 55 } 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