Files
GaCy-GO/tools/cw_preparation_bytecode.lua
T

15 lines
1.0 KiB
Lua
Raw Normal View History

2026-10-28 18:54:43 +07:00
-- Export three loaded button functions without invoking them or changing UI.
do local function capture()
local s=_G.__gacCwPrepBytecode1 or {index=1};_G.__gacCwPrepBytecode1=s
local names={'_on_start_battle_click','_enter_battle','_check_enter_battle_by_reason'}
if s.index>#names 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
local name=names[s.index];s.index=s.index+1
local f=obj[name];if type(f)~='function'then return end
local raw=string.dump(f)
if #raw>32768 then CS.UnityEngine.Debug.Log('[GAC_CW_PREP_BYTECODE] TOO_LARGE '..name);return end
local bytes=CS.System.Array.CreateInstance(typeof(CS.System.Byte),#raw)
for i=1,#raw do bytes[i-1]=raw:byte(i)end
CS.UnityEngine.Debug.Log('[GAC_CW_PREP_BYTECODE] '..name..' '..CS.System.Convert.ToBase64String(bytes))
end;local ok,e=pcall(capture);if not ok then _G.__gacCwPrepBytecode1={index=4};CS.UnityEngine.Debug.Log('[GAC_CW_PREP_BYTECODE] ERROR '..tostring(e))end end