Files

50 lines
2.4 KiB
Lua
Raw Permalink Normal View History

2026-10-28 18:54:43 +07:00
-- Research only: named NPC/Peak config metadata, eight members per heartbeat.
-- Does not load scene graphs, enumerate assembly types, mutate module state,
-- create monsters, send requests or call any config getter.
do
local function tick()
local state=_G.__gacAANpcConfigMetadata1 or {target=1,index=0}
_G.__gacAANpcConfigMetadata1=state
if state.done then return end
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),62)
local names={
{'client','RPG.Client.NPCManager'},
{'core','RPG.GameCore.NPCMonsterDataRow'},
{'core','RPG.GameCore.NPCMonsterDataExcelTable'},
{'core','RPG.GameCore.NPCMonsterExcelTable'},
{'core','RPG.GameCore.ChallengePeakConfigRow'},
{'core','RPG.GameCore.ChallengePeakExcelTable'}
}
local function log(value)CS.UnityEngine.Debug.Log('[GAC_AA_NPC_META] '..tostring(value))end
if state.target>#names then state.done=true;log('END');return end
local descriptor=names[state.target]
if not state.type then
local assembly=descriptor[1]=='client' and typeof(CS.RPG.Client.GridFightModule).Assembly or typeof(CS.RPG.GameCore.AvatarExcelTable).Assembly
state.type=assembly:GetType(descriptor[2])
if not state.type then log('MISSING '..descriptor[2]);state.target=state.target+1;return end
log('TYPE '..state.type.FullName)
state.fields=state.type:GetFields(flags);state.methods=nil;state.index=0
end
for n=1,8 do
if not state.methods then
if state.index>=state.fields.Length then state.methods=state.type:GetMethods(flags);state.index=0
else
local field=state.fields[state.index];state.index=state.index+1
if descriptor[1]=='core' or field.Name:lower():find('monster',1,true) then
log('FIELD '..state.type.FullName..' '..field.Name..' '..field.FieldType.FullName)
end
end
else
if state.index>=state.methods.Length then
state.type=nil;state.fields=nil;state.methods=nil;state.index=0;state.target=state.target+1;return
end
local method=state.methods[state.index];state.index=state.index+1
if method.DeclaringType==state.type and (descriptor[1]=='core' or method.Name=='CreateNPCMonster')then
log('METHOD '..state.type.FullName..' '..tostring(method)..' HANDLE '..tostring(method.MethodHandle.Value))
end
end
end
end
local ok,err=pcall(tick)
if not ok then _G.__gacAANpcConfigMetadata1={done=true};CS.UnityEngine.Debug.Log('[GAC_AA_NPC_META] ERROR '..tostring(err))end
end