Files
GaCy-GO/tools/cw_reward_row_handles.lua
T

26 lines
1.8 KiB
Lua
Raw Normal View History

2026-10-28 18:54:43 +07:00
-- Named reward row metadata only, two exact types per heartbeat.
do local function capture()
local s=_G.__gacCwRewardRows3 or {index=1};_G.__gacCwRewardRows3=s
local names={'GridFightBasicBonusPoolConfigRow','GridFightBonusPoolConfigRow','GridFightBonusPoolV2Row','GridFightBasicBonusPoolV2Row'}
if s.index>#names then return end
local manager=CS.RPG.Client.GlobalVars.s_GamePhaseManager
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
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
local log=function(x)CS.UnityEngine.Debug.Log('[GAC_CW_REWARD_ROWS] '..tostring(x))end
for _=1,2 do
if s.index>#names then log('END');return end
local name=names[s.index];s.index=s.index+1
local asm=typeof(CS.RPG.GameCore.GridFightRoleConfigRow).Assembly
local t
if name=='GridFightConsumableItemConfig'or name=='GridFightForgeConfig'then
t=typeof(CS.RPG.Client[name]);local fs=t:GetFields(flags)
for i=0,math.min(fs.Length-1,63)do local f=fs[i];if f.FieldType.FullName:find('Row$')then t=f.FieldType;break end end
else t=asm:GetType('RPG.GameCore.'..name)end
log('TYPE '..name..' '..tostring(t))
if t then
local fs=t:GetFields(flags);for i=0,math.min(fs.Length-1,63)do log('FIELD '..fs[i].Name..' '..fs[i].FieldType.FullName)end
local ms=t:GetMethods(flags);for i=0,math.min(ms.Length-1,63)do local m=ms[i];if m.DeclaringType==t and m.Name=='FromBinary'then log('BINARY '..t.FullName..' HANDLE '..tostring(m.MethodHandle.Value))end end
end
end
end;local ok,e=pcall(capture);if not ok then _G.__gacCwRewardRows3={index=99};CS.UnityEngine.Debug.Log('[GAC_CW_REWARD_ROWS] ERROR '..tostring(e))end end