Files
GaCy-GO/tools/cw_wave_info_schema.lua
T
2026-10-28 18:54:43 +07:00

23 lines
1.4 KiB
Lua

-- Two named wave/container types only; metadata, 32 methods per heartbeat.
do local function capture()
local s=_G.__gacCwWaveInfo1 or {kind=1,index=0};_G.__gacCwWaveInfo1=s
if s.kind>2 then return end
local log=function(x)CS.UnityEngine.Debug.Log('[GAC_CW_WAVE_INFO] '..tostring(x))end
local ok,err=pcall(function()
local types={typeof(CS.RPG.GameCore.GridFightWaveInfo),typeof(CS.RPG.GameCore.BattleInstance)}
local t=types[s.kind];local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
if s.index==0 then
log('TYPE '..t.FullName)
local fs=t:GetFields(flags);for i=0,math.min(fs.Length-1,63)do log('FIELD '..tostring(fs[i]))end
local cs=t:GetConstructors(flags);for i=0,math.min(cs.Length-1,7)do log('CTOR '..tostring(cs[i])..' HANDLE '..tostring(cs[i].MethodHandle.Value))end
end
local ms=t:GetMethods(flags)
for i=s.index,math.min(s.index+31,ms.Length-1,255)do
local m=ms[i];if m.DeclaringType==t and (s.kind==1 or m.Name:find('Wave')or m.Name:find('Monster')or m.Name:find('Init'))then log('METHOD '..t.FullName..' '..tostring(m)..' HANDLE '..tostring(m.MethodHandle.Value))end
end
s.index=s.index+32;if s.index>=ms.Length or s.index>=256 then log('TYPE_END '..t.FullName..' total='..ms.Length);s.kind=s.kind+1;s.index=0 end
end)
if not ok then log('ERROR '..tostring(err));s.kind=3 end
if s.kind>2 then log('END')end
end;capture()end