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

15 lines
1.1 KiB
Lua

-- Resolve the loaded preparation callback's named network upvalue, metadata only.
do local function capture()
if _G.__gacCwNetUpvalue1 then return end
local page=CS.RPG.Client.GlobalVars.s_UIManager:GetPageByName('GridFightPreparationPage');local obj=page and page.LuaTable
if type(obj)~='table'then return end;_G.__gacCwNetUpvalue1=true
local f=obj._enter_battle;if type(f)~='function'then return end
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
for i=1,8 do local name,value=debug.getupvalue(f,i);if not name then break end
if name=='GridFightModule'and type(value)=='userdata'then
local t=value:GetType();CS.UnityEngine.Debug.Log('[GAC_CW_NETWORK_UPVALUE] TYPE '..tostring(t.FullName)..' VALUE '..tostring(value))
local ms=t:GetMethods(flags);for j=0,math.min(ms.Length-1,127)do local m=ms[j];if m.DeclaringType==t then CS.UnityEngine.Debug.Log('[GAC_CW_NETWORK_UPVALUE] METHOD '..tostring(m))end end
end
end
end;local ok,e=pcall(capture);if not ok then CS.UnityEngine.Debug.Log('[GAC_CW_NETWORK_UPVALUE] ERROR '..tostring(e))end end