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

19 lines
1.6 KiB
Lua

-- Named regression targets only, one per heartbeat; paused during Battle.
do local function capture()
local s=_G.__gacGameplayRegressionMeta2 or {index=1};_G.__gacGameplayRegressionMeta2=s
local names={'RPG.Client.GridFightHandbookRole','RPG.Client.GridFightHandbook','RPG.GameCore.GridFightRoleBasicConfigRow','RPG.GameCore.ChenLingGameBoyCaseRow'}
if s.index>#names then return end
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
local manager=CS.RPG.Client.GlobalVars.s_GamePhaseManager
local phase=manager and typeof(CS.RPG.Client.GamePhaseManager):GetField('_CurrentPhase',flags):GetValue(manager)
if not phase or typeof(CS.RPG.Client.BattleGamePhase):IsInstanceOfType(phase)then return end
local name=names[s.index];s.index=s.index+1
local asm=name:find('GameCore') and typeof(CS.RPG.GameCore.GridFightRoleConfigRow).Assembly or typeof(CS.RPG.Client.GridFightModule).Assembly
local t=asm:GetType(name);local log=function(x)CS.UnityEngine.Debug.Log('[GAC_GAMEPLAY_REGRESSION_META] '..tostring(x))end
log('TYPE '..name..' '..tostring(t));if not t then return end
local fs=t:GetFields(flags);for i=0,math.min(fs.Length-1,159)do log('FIELD '..fs[i].Name..' '..fs[i].FieldType.FullName)end
local ms=t:GetMethods(flags);for i=0,math.min(ms.Length-1,191)do local m=ms[i];if m.DeclaringType==t then log('METHOD '..tostring(m)..' HANDLE '..tostring(m.MethodHandle.Value))end end
if s.index>#names then log('END')end
end;local ok,e=pcall(capture);if not ok then _G.__gacGameplayRegressionMeta2={index=99};CS.UnityEngine.Debug.Log('[GAC_GAMEPLAY_REGRESSION_META] ERROR '..tostring(e))end end