Files

28 lines
1.3 KiB
Lua
Raw Permalink Normal View History

-- Follow only the known CW wrapper's registered configuration delegate.
-- One delegate's metadata per heartbeat; no delegate or graph is invoked.
do
local names={'GridFightTutorialStageConfig','GridFightDivisionStageConfig'}
_G.__gacCwConfigProvider1=_G.__gacCwConfigProvider1 or 1
local n=_G.__gacCwConfigProvider1
if n<=#names then
_G.__gacCwConfigProvider1=n+1
local log=function(v)CS.UnityEngine.Debug.Log('[GAC_CW_PROVIDER] '..tostring(v))end
local ok,err=pcall(function()
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
local wrapper=typeof(CS.RPG.Client[names[n]])
local callback=wrapper:GetField('GetConfigImpl',flags):GetValue(nil)
local method=callback.Method
log('DELEGATE '..names[n]..' '..tostring(method)..' TOKEN '..method.MetadataToken)
local owner=method.DeclaringType
log('OWNER '..owner.FullName..' ASSEMBLY '..owner.Assembly.FullName)
local fs=owner:GetFields(flags)
for i=0,math.min(fs.Length-1,47)do log('FIELD '..tostring(fs[i]))end
local ms=owner:GetMethods(flags)
for i=0,math.min(ms.Length-1,47)do
if ms[i].DeclaringType==owner then log('METHOD '..tostring(ms[i]))end
end
end)
if not ok then log('ERROR '..tostring(err))end
if n==#names then log('END')end
end
end