22 lines
1.6 KiB
Lua
22 lines
1.6 KiB
Lua
-- Named battle data only; metadata reads pause during Battle.
|
|
do
|
|
local s=_G.__gacCwBattleAvatarSchema1 or {index=1,offset=0};_G.__gacCwBattleAvatarSchema1=s
|
|
if s.done then return end
|
|
local log=function(x)CS.UnityEngine.Debug.Log('[GAC_CW_BATTLE_AVATAR] '..tostring(x))end
|
|
local ok,err=pcall(function()
|
|
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={'RPG.GameCore.BattleGridFightAvatarData','RPG.GameCore.GridFightManager'}
|
|
local name=names[s.index];if not name then s.done=true;log('END');return end
|
|
local a=typeof(CS.RPG.Client.GridFightModule).Assembly;local b=typeof(CS.RPG.GameCore.GridFightRoleConfigRow).Assembly
|
|
local t=a:GetType(name) or b:GetType(name);if not t then log('MISSING '..name);s.index=s.index+1;return end
|
|
if s.offset==0 then local fs=t:GetFields(flags);log('TYPE '..name);for i=0,math.min(fs.Length-1,95)do log('FIELD '..tostring(fs[i]))end end
|
|
local ms=t:GetMethods(flags)
|
|
for i=s.offset,math.min(s.offset+23,ms.Length-1)do local m=ms[i];if m.DeclaringType==t and (s.index==1 or m.Name:lower():find('spot') or tostring(m):find('BJGJBNJDLIK'))then log('METHOD '..tostring(m)..' HANDLE '..tostring(m.MethodHandle.Value))end end
|
|
s.offset=s.offset+24;if s.offset>=ms.Length then s.offset=0;s.index=s.index+1 end
|
|
end)
|
|
if not ok then s.done=true;log('ERROR '..tostring(err))end
|
|
end
|