Files
GaCy-GO/tools/cw_reward_capture_trigger.lua
2026-10-28 18:54:43 +07:00

11 lines
779 B
Lua

-- Existing initialized handbook getter only, paused during Battle.
do local function capture()
local n=_G.__gacCwRewardTrigger1 or 0;if n>=120 then return end
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
local manager=CS.RPG.Client.GlobalVars.s_GamePhaseManager
local phase=manager and typeof(CS.RPG.Client.GamePhaseManager):GetField('_CurrentPhase',flags):GetValue(manager)
if not phase or typeof(CS.RPG.Client.BattleGamePhase):IsInstanceOfType(phase)then return end
_G.__gacCwRewardTrigger1=n+1
CS.RPG.Client.GlobalVars.s_ModuleManager.GridFightModule:GetHandBookAllRoleConfig()
end;local ok,e=pcall(capture);if not ok then _G.__gacCwRewardTrigger1=120;CS.UnityEngine.Debug.Log('[GAC_CW_REWARD_TRIGGER] ERROR '..tostring(e))end end