Files
GaCy-GO/tools/cw_meta_probe.lua
T

26 lines
1.2 KiB
Lua

-- Targeted read-only access to the native season metadata getter.
do
if not _G.__gacCwMeta1 then
_G.__gacCwMeta1=true
local function log(v)CS.UnityEngine.Debug.Log('[GAC_CW_META] '..tostring(v))end
local ok,err=pcall(function()
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
local invoke=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),0)
local args=CS.System.Array.CreateInstance(typeof(CS.System.Object),0)
local module=CS.RPG.Client.GlobalVars.s_ModuleManager.GridFightModule
local first=typeof(CS.RPG.Client.GridFightModule):GetField('FirstSeasonID',flags):GetValue(nil)
local season=module:GetSeason(first,nil)
local meta=season:GetType():GetMethod('get__Meta',flags):Invoke(season,invoke,nil,args,nil)
log('SEASON_ROW '..CS.Newtonsoft.Json.JsonConvert.SerializeObject(meta))
local method=module:GetType():GetMethod('_SyncSeason',flags)
local handle=method.MethodHandle
local getter=handle:GetType():GetMethod('GetFunctionPointer',flags)
if getter then
local pointer=getter:Invoke(handle,invoke,nil,args,nil)
log('SYNC_SEASON_POINTER '..tostring(pointer))
end
end)
if not ok then log('ERROR '..tostring(err))end
end
end