pre cw with probe and a bunch script to read game behavior
This commit is contained in:
1 parent
5120219ae2
commit
da8a32f60d
310 files changed
+219693
-872
No files matched your search
@@ -0,0 +1,34 @@
|
||||
-- Metadata only, one exact CW type per heartbeat, paused during Battle.
|
||||
do
|
||||
local names={'RPG.Client.GridFightPlayer','RPG.Client.GridFightPlayerLevelConfig','RPG.GameCore.GridFightPlayerLevelConfig','RPG.Client.GridFightStageNodeTemplateConfig','RPG.GameCore.GridFightStageNodeTemplateConfig'}
|
||||
_G.__gacCwLevelSchema1=_G.__gacCwLevelSchema1 or {index=1,offset=0}
|
||||
local s=_G.__gacCwLevelSchema1
|
||||
if s.index>#names then 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 log=function(v)CS.UnityEngine.Debug.Log('[GAC_CW_LEVEL_SCHEMA] '..tostring(v))end
|
||||
local ok,err=pcall(function()
|
||||
if not s.type then
|
||||
local a=typeof(CS.RPG.Client.GridFightModule).Assembly
|
||||
local b=typeof(CS.RPG.GameCore.GridFightRoleConfigRow).Assembly
|
||||
s.type=a:GetType(names[s.index]) or b:GetType(names[s.index])
|
||||
log('TYPE '..names[s.index]..' '..tostring(s.type))
|
||||
if not s.type then s.index=s.index+1;return end
|
||||
local fs=s.type:GetFields(flags)
|
||||
for i=0,math.min(fs.Length-1,63) do log('FIELD '..tostring(fs[i]))end
|
||||
local ctors=s.type:GetConstructors(flags)
|
||||
for i=0,math.min(ctors.Length-1,15)do log('CTOR '..tostring(ctors[i]))end
|
||||
s.methods=s.type:GetMethods(flags)
|
||||
end
|
||||
for i=s.offset,math.min(s.offset+31,s.methods.Length-1)do
|
||||
local m=s.methods[i]
|
||||
if m.DeclaringType==s.type then log('METHOD '..tostring(m)..' TOKEN '..m.MetadataToken)end
|
||||
end
|
||||
s.offset=s.offset+32
|
||||
if s.offset>=s.methods.Length then s.type=nil;s.methods=nil;s.offset=0;s.index=s.index+1 end
|
||||
end)
|
||||
if not ok then log('ERROR '..tostring(err));s.type=nil;s.methods=nil;s.offset=0;s.index=s.index+1 end
|
||||
if s.index>#names then log('END')end
|
||||
end
|
||||
Reference in new issue
Block a user