local propertyTable = { ID = 1,BornPosInfo = 2,BornAreaRadius = 3,NoTargetMinDistSqr = 4,NoTargetMaxDistSqr = 5,NoTargetConveyDistSqr = 6,HasTargetConveyDistSqr = 7,FollowPosInfo = 8,UseDevelopOfHeroID = 9, } 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/RetinueData-page'..pageIndex) if DataSheetUtil then --skip fixedpoint process for data sheet checker DataSheetUtil.ProcessFixedPoint('RetinueData', 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({1261,1,1},base), } return { dataTable = dataTable, propertyTable = propertyTable, primaryTable = primaryTable, }