local propertyTable = { ID = 1,ColorText = 2,CharacterColor = 3,GachaPoolHeroTitle = 4,GachaPoolItemTitle = 5,FrameCircle = 6,FrameSquare = 7,FrameBase = 8,EquipFrame = 9,EquipFrameBase = 10,EquipFragmentComposeBase = 11,EquipFragmentBase = 12,EquipFragmentInfoTitleBase = 13,FormationMagicWeaponButtonBase = 14,HeroChooseFontBase = 15,HeroChooseBase = 16,HeroAdvanceStar = 17,MagicWeaponBase = 18,MagicWeaponBase_Frame = 19,AppearanceInfoBase = 20,AppearanceBase_Frame = 21,AppearanceLevelInfoBase = 22,MagicWeaponChipInfoBase = 23,TreasureBase = 24,TreasureBase_Frame = 25,HorseBase = 26,HorseBase_OverFrame = 27,HorseBase_UnderFrame = 28,HeroBiographyBase = 29,HeroBiographyGradientCover = 30,HeroBiographyCornerBase = 31,HeroBiographyFrame = 32,CharacterUIModify = 33,CharacterUIFrame = 34,OfficialPositionQuality = 35,FormationHorseButtonBase = 36,HeroPictorial = 37,EquipRefineIcon = 38,DrawCardBase = 39,OfficialProfitQuality = 40,StoreGoodsNameBase = 41,StoreGoodsIconBase = 42,NewFrameSquare = 43,LimitDrawCardIconEffect = 44,StoreGoodsNameBase2 = 45,StratagemFrame = 46,LuckyLotteryFrame = 47,LineupSelectionFrame = 48,GodBeastFrame = 49,PetFrame = 50,FunctionUpdateNoticeFrame = 51, } local mainPropertyTable = { ID = 1,PageIndex = 2,LineIndex = 3, } local primaryTable = { "ID", } local DataPageEntry = {} local rawget = rawget local base = { __index = function(t, k) local propertyIndex = propertyTable[k] if propertyIndex then local mainPropertyIndex = mainPropertyTable[k] if mainPropertyIndex then return t[mainPropertyIndex] end local pageIndex = t[2] local pageData = DataPageEntry[pageIndex] if pageData == nil then pageData = require('Data/QualityColor-page'..pageIndex) if DataSheetUtil then --skip fixedpoint process for data sheet checker DataSheetUtil.ProcessFixedPoint('QualityColor', pageData) end DataPageEntry[pageIndex] = pageData end local lineIndex = t[3] local resultData = pageData[lineIndex] return resultData[propertyIndex] end end, __newindex = function() error('Attempt to modify read-only table') end } local dataTable = { setmetatable({1,1,1},base), setmetatable({2,1,2},base), setmetatable({3,1,3},base), setmetatable({4,1,4},base), setmetatable({5,1,5},base), setmetatable({6,1,6},base), setmetatable({7,1,7},base), } return { dataTable = dataTable, propertyTable = propertyTable, primaryTable = primaryTable, }