44 lines
2.2 KiB
Lua
44 lines
2.2 KiB
Lua
-- Only nested types observed on the established Orb consumer, plus the live
|
|||
|
|
-- session's Bonus object. Metadata only: never invoke a network/gameplay method.
|
||
|
|
do local function capture()
|
||
|
|
local s=_G.__gacCwOrbNested1 or {target=1,index=0,stage='fields',beats=0};_G.__gacCwOrbNested1=s
|
||
|
|
if s.done then return end
|
||
|
|
s.beats=s.beats+1;if s.beats>64 then s.done=true;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
|
||
|
|
local names={'<>c__DisplayClass11_0','<>c','OrbSummarizer'}
|
||
|
|
local log=function(v)CS.UnityEngine.Debug.Log('[GAC_CW_ORB_NESTED] '..tostring(v))end
|
||
|
|
if s.target>4 then s.done=true;log('END');return end
|
||
|
|
if not s.t then
|
||
|
|
if s.target<=#names then
|
||
|
|
s.t=typeof(CS.RPG.Client.GridFightOrbServerData):GetNestedType(names[s.target],flags)
|
||
|
|
else
|
||
|
|
local module=CS.RPG.Client.GlobalVars.s_ModuleManager.GridFightModule
|
||
|
|
local session=module and module.CurGameSession
|
||
|
|
local bonus=session and session.Bonus
|
||
|
|
s.t=bonus and bonus:GetType()
|
||
|
|
end
|
||
|
|
if not s.t then log('MISSING_TARGET '..s.target);s.target=s.target+1;return end
|
||
|
|
s.members=s.t:GetFields(flags);s.index=0;s.stage='fields';log('TYPE '..s.t.FullName)
|
||
|
|
end
|
||
|
|
for n=1,8 do
|
||
|
|
if s.index>=s.members.Length then
|
||
|
|
if s.stage=='fields'then s.members=s.t:GetMethods(flags);s.index=0;s.stage='methods';return end
|
||
|
|
s.target=s.target+1;s.t=nil;s.members=nil;return
|
||
|
|
end
|
||
|
|
local m=s.members[s.index];s.index=s.index+1
|
||
|
|
if m.DeclaringType==s.t then
|
||
|
|
if s.stage=='fields'then log('FIELD '..m.Name..' '..m.FieldType.FullName)
|
||
|
|
else
|
||
|
|
log('METHOD '..tostring(m)..' HANDLE '..tostring(m.MethodHandle.Value))
|
||
|
|
local ps=m:GetParameters()
|
||
|
|
for i=0,math.min(ps.Length-1,3)do
|
||
|
|
local t=ps[i].ParameterType
|
||
|
|
if t.Assembly.FullName:find('RPG.Network.Proto',1,true)then log('PROTO_PARAMETER '..m.Name..' '..t.FullName)end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end local ok,e=pcall(capture);if not ok then _G.__gacCwOrbNested1={done=true};CS.UnityEngine.Debug.Log('[GAC_CW_ORB_NESTED] ERROR '..tostring(e))end end
|