32 lines
1.8 KiB
Lua
32 lines
1.8 KiB
Lua
-- Named Spotlight config and active session metadata, no actions/loaders.
|
|
do
|
|
local s=_G.__gacCwSpotlightSchema2 or {index=1};_G.__gacCwSpotlightSchema2=s
|
|
if s.done then return end
|
|
local log=function(v)CS.UnityEngine.Debug.Log('[GAC_CW_RUNTIME_SCHEMA] '..tostring(v))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 module=CS.RPG.Client.GlobalVars.s_ModuleManager.GridFightModule
|
|
if not s.objects then
|
|
local session=module.CurGameSession;if not session then return end;local families=module:GetHandBookAllRoleConfig();local role=families[0].DefaultRole;s.objects={session.SpotLight,session.Track,role.RoleConfig,role.StarConfig}
|
|
end
|
|
local object=s.objects[s.index];if not object then s.done=true;log('END');return end
|
|
s.index=s.index+1
|
|
local t=object:GetType();log('TYPE '..t.FullName)
|
|
local fs=t:GetFields(flags)
|
|
for i=0,math.min(fs.Length-1,63)do
|
|
log('FIELD '..tostring(fs[i]))
|
|
if false and tostring(fs[i].FieldType.FullName):find('Row$')then
|
|
local row=fs[i]:GetValue(object);if row then log('ROW '..CS.Newtonsoft.Json.JsonConvert.SerializeObject(row))end
|
|
end
|
|
end
|
|
local ps=t:GetProperties(flags);for i=0,math.min(ps.Length-1,63)do log('PROPERTY '..tostring(ps[i]))end
|
|
local ms=t:GetMethods(flags)
|
|
for i=0,math.min(ms.Length-1,127)do if ms[i].DeclaringType==t then log('METHOD '..tostring(ms[i]))end end
|
|
if s.index==5 then s.done=true;log('END')end
|
|
end)
|
|
if not ok then log('ERROR '..tostring(err));s.done=true end
|
|
end
|