47 lines
2.5 KiB
Lua
47 lines
2.5 KiB
Lua
-- Read-only evidence from three named Client types. At most 24 methods or
|
|||
|
|
-- 128 constant rows per heartbeat; never enumerate assembly types.
|
||
|
|
do
|
||
|
|
local s=_G.__gacPeakEvidence2 or {phase=1,index=0};_G.__gacPeakEvidence2=s
|
||
|
|
if s.phase>4 then return end
|
||
|
|
local function log(v)CS.UnityEngine.Debug.Log('[GAC_PEAK_EVIDENCE] '..tostring(v))end
|
||
|
|
local ok,err=pcall(function()
|
||
|
|
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
|
||
|
|
if s.phase==1 then
|
||
|
|
local m=CS.RPG.Client.GlobalVars.s_ModuleManager.BattleModule
|
||
|
|
local methods=m:GetType():GetMethods(flags)
|
||
|
|
for i=s.index,math.min(s.index+23,methods.Length-1)do log('METHOD '..tostring(methods[i])..' '..methods[i].MetadataToken)end
|
||
|
|
s.index=s.index+24;if s.index>=methods.Length then s.phase=2;s.index=0 end
|
||
|
|
elseif s.phase==2 then
|
||
|
|
local module=CS.RPG.Client.GlobalVars.s_ModuleManager.ChallengePeakModule
|
||
|
|
local obj=module:GetChallengePeakBoss(__PEAK_ID__)
|
||
|
|
local targets=obj:GetType():GetField('_Targets',flags):GetValue(obj)
|
||
|
|
for i=0,math.min(targets.Count-1,15)do
|
||
|
|
local t=targets[i];local f=t:GetType():GetField('_Meta',flags);local row=f:GetValue(t)
|
||
|
|
log('TARGET '..CS.Newtonsoft.Json.JsonConvert.SerializeObject(row))
|
||
|
|
if i==0 then
|
||
|
|
local a=row:GetType().Assembly
|
||
|
|
for _,name in ipairs({'RPG.GameCore.BattleTargetExcelTable','RPG.GameCore.BattleTargetConfigExcelTable'})do
|
||
|
|
local ty=a:GetType(name);log('TABLE '..name..' '..tostring(ty))
|
||
|
|
if ty then local fs=ty:GetFields(flags);for j=0,math.min(fs.Length-1,15)do log('TABLE_FIELD '..fs[j].Name..' '..tostring(fs[j].FieldType))end end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
end
|
||
|
|
s.phase=3
|
||
|
|
elseif s.phase==3 then
|
||
|
|
if not s.iterator then s.iterator=CS.RPG.GameCore.ConstValueCommonExcelTable.dataDict:GetEnumerator()end
|
||
|
|
for i=1,128 do
|
||
|
|
if not s.iterator:MoveNext()then s.phase=4;log('CONSTANT_END');return end
|
||
|
|
local pair=s.iterator.Current;local row=pair.Value
|
||
|
|
local n=tostring(pair.Key):lower()
|
||
|
|
if n:find('peak') or n:find('turnlimit')then log('CONSTANT '..CS.Newtonsoft.Json.JsonConvert.SerializeObject(row))end
|
||
|
|
end
|
||
|
|
elseif s.phase==4 then
|
||
|
|
local stat=CS.RPG.Client.GlobalVars.s_ModuleManager.BattleModule.LastBattleStatistic
|
||
|
|
if stat then
|
||
|
|
for _,n in ipairs({'totalBattleRounds','challengeTurnCount','challengeTurnLeft','totalBattleTurns'})do log('STAT '..n..' '..tostring(stat[n]))end
|
||
|
|
end
|
||
|
|
s.phase=5;log('END')
|
||
|
|
end
|
||
|
|
end)
|
||
|
|
if not ok then log('ERROR '..s.phase..' '..tostring(err));s.phase=s.phase+1;s.index=0 end
|
||
|
|
end
|