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

20 lines
1.5 KiB
Lua

-- Specific battle-context types only, metadata only, one type per heartbeat.
do
local s=_G.__gacCwSpotBattleSchema1 or {index=1};_G.__gacCwSpotBattleSchema1=s
if s.done then return end
local log=function(x)CS.UnityEngine.Debug.Log('[GAC_CW_SPOT_BATTLE] '..tostring(x))end
local ok,err=pcall(function()
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 names={'RPG.Client.GridFightBattleGameContext','RPG.Client.GridFightRoleEffect','RPG.Client.GridFightBattleRole','RPG.Client.GridFightBattleRoleProfile','RPG.GameCore.GridFightSpotLightComponent'}
local name=names[s.index];if not name then s.done=true;log('END');return end;s.index=s.index+1
local a=typeof(CS.RPG.Client.GridFightModule).Assembly;local b=typeof(CS.RPG.GameCore.GridFightRoleConfigRow).Assembly
local t=a:GetType(name) or b:GetType(name);log('TYPE '..name..' '..tostring(t));if not t then return end
local fs=t:GetFields(flags);for i=0,math.min(fs.Length-1,63)do log('FIELD '..tostring(fs[i]))end
local ms=t:GetMethods(flags);for i=0,math.min(ms.Length-1,95)do local m=ms[i];if m.DeclaringType==t then log('METHOD '..tostring(m)..' HANDLE '..tostring(m.MethodHandle.Value))end end
end)
if not ok then s.done=true;log('ERROR '..tostring(err))end
end