24 lines
1.4 KiB
Lua
24 lines
1.4 KiB
Lua
-- Named methods only; read metadata, four types at most, no gameplay actions.
|
|
do
|
|
local s=_G.__gacCwSpotHandles2 or {index=1};_G.__gacCwSpotHandles2=s
|
|
if s.done then return end
|
|
local log=function(x)CS.UnityEngine.Debug.Log('[GAC_CW_SPOT_HANDLE] '..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 types={typeof(CS.RPG.Client.GridFightEquipTrackData),typeof(CS.RPG.Client.GridFightSpotLightSelectAction),typeof(CS.RPG.Client.GridFightSpotLightManager)}
|
|
local t=types[s.index];if not t then s.done=true;log('END');return end
|
|
local methods=t:GetMethods(flags)
|
|
for i=0,math.min(methods.Length-1,127)do
|
|
local m=methods[i]
|
|
if m.DeclaringType==t and (m.Name=='AddEquipTrack' or m.Name=='RemoveEquipTrack' or m.Name=='_AddTrackToLastAndSend' or m.Name=='SelectCandidate' or m.Name=='Select' or m.Name=='ReturnPreparation')then
|
|
log('METHOD '..t.FullName..'.'..m.Name..' HANDLE '..tostring(m.MethodHandle.Value)..' TOKEN '..m.MetadataToken)
|
|
end
|
|
end
|
|
s.index=s.index+1
|
|
end)
|
|
if not ok then s.done=true;log('ERROR '..tostring(err))end
|
|
end
|