25 lines
1.5 KiB
Lua
25 lines
1.5 KiB
Lua
do local function capture()
|
|||
|
|
local s=_G.__gacBonfireDialogContract1 or {i=1};_G.__gacBonfireDialogContract1=s
|
||
|
|
local targets={
|
||
|
|
{'Ui.GridFight.Preparation.Bonfire.GridFightBonfireDialog','_on_load'},
|
||
|
|
{'Ui.GridFight.Preparation.Bonfire.GridFightBonfireDialog','_on_enter_ending_phase'},
|
||
|
|
{'Ui.GridFight.Preparation.Bonfire.GridFightBonfireEventPanel','_on_load'},
|
||
|
|
{'Ui.GridFight.Preparation.Bonfire.GridFightBonfireFinalRewardPanel','_on_btn_take_reward_click'},
|
||
|
|
}
|
||
|
|
local target=targets[s.i];if not target then return end
|
||
|
|
s.i=s.i+1
|
||
|
|
local module=package.loaded[target[1]];local fn=module and module[target[2]]
|
||
|
|
local log=function(v)CS.UnityEngine.Debug.Log('[GAC_BONFIRE_DIALOG] '..tostring(v))end
|
||
|
|
if type(fn)~='function' then log('MISSING '..target[1]..' '..target[2]);return end
|
||
|
|
local raw=string.dump(fn);if #raw>32768 then error('function bound')end
|
||
|
|
local bytes=CS.System.Array.CreateInstance(typeof(CS.System.Byte),#raw)
|
||
|
|
for i=1,#raw do bytes[i-1]=raw:byte(i)end
|
||
|
|
log('BYTECODE '..s.i..' '..CS.System.Convert.ToBase64String(bytes))
|
||
|
|
for i=1,16 do
|
||
|
|
local key,value=debug.getupvalue(fn,i);if not key then break end
|
||
|
|
log('UPVALUE '..target[2]..' '..key..' '..type(value))
|
||
|
|
if type(value)=='table' then
|
||
|
|
local n=0;for k,v in pairs(value)do n=n+1;if n>80 then break end;if type(v)=='number'then log('CONSTANT '..key..' '..tostring(k)..' '..tostring(v))end end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end local ok,e=pcall(capture);if not ok then CS.UnityEngine.Debug.Log('[GAC_BONFIRE_DIALOG] ERROR '..tostring(e))end end
|