Files
GaCy-GO/tools/cw_book_condition_row.lua
T

22 lines
1.1 KiB
Lua
Raw Normal View History

2026-10-28 18:54:43 +07:00
-- Serialize only the live CW ActivityPanelConditionRow; no condition mutation.
do
if not _G.__gacCwBookConditionRowCapture2 then
_G.__gacCwBookConditionRowCapture2=true
local function log(v)CS.UnityEngine.Debug.Log('[GAC_CW_BOOK_CONDITION] '..tostring(v))end
log('BEGIN')
local ok,err=pcall(function()
local class=package.loaded['Ui.DailyMission.Rogue.GridFight.HandbookRogueGridFightTabItem']
local constants
for i=1,16 do local n,v=debug.getupvalue(class._on_click_go,i);if not n then break end;if n=='_GRID_FIGHT_CONSTANTS'then constants=v;break end end
local panel=CS.RPG.Client.GlobalVars.s_ModuleManager.ActivityModule:GetPanelData(constants.ActivityID)
local state=panel.StateData
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
local f=state:GetType():GetField('<ConditionConfig>k__BackingField',flags)
local row=f:GetValue(state)
local value=CS.Newtonsoft.Json.JsonConvert.SerializeObject(row)
if #value>16384 then error('Condition row exceeds bound')end
log('ROW '..value)
end)
if not ok then log('ERROR '..tostring(err))end
end
end