--文件是自动生成,请勿手动修改.来自数据文件:active_week local L_CompressMaxColumn = 1 local L_CompressData = { 15666458305726565, --101,1,仙盟首领,12:00 - 12:10,111,, 29458736834676838, --102,1,双倍巡游,16:00 - 16:30,209,, 14822039810541671, --103,1,日暮篝火,19:30 - 19:45,105,, 15666466895661160, --104,1,仙盟首领,20:00 - 20:10,111,, 14399831633725545, --105,1,天芒鬼城,20:30 - 21:00,102,, 3000097228458090, --106,1,巅峰竞技,21:00 - 21:30,21,, 16088685901809771, --107,1,古魔封印,21:30 - 21:45,114,, 29458754014546028, --108,1,双倍巡游,21:30 - 22:00,209,, 15666458305728713, --201,2,仙盟首领,12:00 - 12:10,111,, 29458736834678986, --202,2,双倍巡游,16:00 - 16:30,209,, 14822039810543819, --203,2,日暮篝火,19:30 - 19:45,105,, 15666466895663308, --204,2,仙盟首领,20:00 - 20:10,111,, 14540577711919309, --205,2,天道秘境,20:30 - 20:45,103,, 3000097228460238, --206,2,巅峰竞技,21:00 - 21:30,21,, 29458754014548175, --207,2,双倍巡游,21:30 - 22:00,209,, 15666458305730861, --301,3,仙盟首领,12:00 - 12:10,111,, 29458736834681134, --302,3,双倍巡游,16:00 - 16:30,209,, 29458754014550319, --303,3,双倍巡游,21:30 - 22:00,209,, 14822039810545968, --304,3,日暮篝火,19:30 - 19:45,105,, 15666466895665457, --305,3,仙盟首领,20:00 - 20:10,111,, 14399831633729842, --306,3,天芒鬼城,20:30 - 21:00,102,, 14962783756065075, --307,3,八极阵图,21:00 - 21:30,106,, 16088685901814068, --308,3,古魔封印,21:30 - 21:45,114,, 15666458305733009, --401,4,仙盟首领,12:00 - 12:10,111,, 29458736834683282, --402,4,双倍巡游,16:00 - 16:30,209,, 14822039810548115, --403,4,日暮篝火,19:30 - 19:45,105,, 15666466895667604, --404,4,仙盟首领,20:00 - 20:10,111,, 14540577711923605, --405,4,天道秘境,20:30 - 20:45,103,, 3000097228464534, --406,4,巅峰竞技,21:00 - 21:30,21,, 29458754014552471, --407,4,双倍巡游,21:30 - 22:00,209,, 15666458305735157, --501,5,仙盟首领,12:00 - 12:10,111,, 29458736834685430, --502,5,双倍巡游,16:00 - 16:30,209,, 14822039810550263, --503,5,日暮篝火,19:30 - 19:45,105,, 15666466895669752, --504,5,仙盟首领,20:00 - 20:10,111,, 14399831633734137, --505,5,天芒鬼城,20:30 - 21:00,102,, 3000097228466682, --506,5,巅峰竞技,21:00 - 21:30,21,, 16088685901818363, --507,5,古魔封印,21:30 - 21:45,114,, 29458754014554620, --508,5,双倍巡游,21:30 - 22:00,209,, 15666458305737305, --601,6,仙盟首领,12:00 - 12:10,111,, 29458736834687578, --602,6,双倍巡游,16:00 - 16:30,209,, 14822039810552411, --603,6,日暮篝火,19:30 - 19:45,105,, 15666466895671900, --604,6,仙盟首领,20:00 - 20:10,111,, 16211124598977117, --605,6,仙侣对决,20:10 - 21:00,115,, 14962783756071518, --606,6,八极阵图,21:00 - 21:30,106,, 29458754014556767, --607,6,双倍巡游,21:30 - 22:00,209,, 15666458305739453, --701,7,仙盟首领,12:00 - 12:10,111,, 29458736834689726, --702,7,双倍巡游,16:00 - 16:30,209,, 14822039810554559, --703,7,日暮篝火,19:30 - 19:45,105,, 15666466895674048, --704,7,仙盟首领,20:00 - 20:10,111,, 16211124598979265, --705,7,仙侣对决,20:10 - 21:00,115,, 15525733694945986, --706,7,仙盟战,21:00 - 21:30,110,, 29458754014558915, --707,7,双倍巡游,21:30 - 22:00,209,, } local L_MainKeyDic = { [101]=1,[102]=2,[103]=3,[104]=4,[105]=5,[106]=6,[107]=7,[108]=8,[201]=9,[202]=10,[203]=11,[204]=12,[205]=13,[206]=14,[207]=15, [301]=16,[302]=17,[303]=18,[304]=19,[305]=20,[306]=21,[307]=22,[308]=23,[401]=24,[402]=25,[403]=26,[404]=27,[405]=28,[406]=29,[407]=30, [501]=31,[502]=32,[503]=33,[504]=34,[505]=35,[506]=36,[507]=37,[508]=38,[601]=39,[602]=40,[603]=41,[604]=42,[605]=43,[606]=44,[607]=45, [701]=46,[702]=47,[703]=48,[704]=49,[705]=50,[706]=51,[707]=52,} local L_NamesByNum = { Id = 1, Week = 2, ActiveId = 5, } local L_NamesByString = { Name = 3, Time = 4, } local L_ColNameIndexs = { Id = 0, Week = 1, Name = 2, Time = 3, ActiveId = 4, } --local L_ColumnUseBitCount = {11,4,16,16,9,} --local L_ColumnList = {1,1,1,1,1,} --local L_ShiftDataList = {0,11,15,31,47,} --local L_AndDataList = {1023,7,32767,32767,255,} local L_ColumnShiftAndList = {1,0,1023,1,11,7,1,15,32767,1,31,32767,1,47,255,} local L_ColNum = 5; 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 = 52 } 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