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 @@
|
||||
-- Read only named CW stage/node metadata, one object per heartbeat.
|
||||
do
|
||||
local state=_G.__gacCwNodeBattleSchema2 or {index=1};_G.__gacCwNodeBattleSchema2=state
|
||||
if state.done then return end
|
||||
local log=function(v)CS.UnityEngine.Debug.Log('[GAC_CW_NODE_ENEMY] '..tostring(v))end
|
||||
local ok,err=pcall(function()
|
||||
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
|
||||
local session=CS.RPG.Client.GlobalVars.s_ModuleManager.GridFightModule.CurGameSession
|
||||
if not session then return end
|
||||
if not state.objects then
|
||||
local fields=session:GetType():GetFields(flags)
|
||||
for i=0,math.min(fields.Length-1,63)do
|
||||
local f=fields[i]
|
||||
if f.FieldType.FullName=='RPG.Client.GridFightStage'then
|
||||
local stage=f:GetValue(session)
|
||||
if stage and stage.CurNode then state.objects={stage.CurMonsterStageData};log('COORD '..stage.RouteID..'/'..stage.ChapterID..'/'..stage.SectionID..' LEVEL '..stage.CurMonsterLevel);local row=stage.CurNode:GetType():GetProperty('_PenaltyRuleConfigRow',flags):GetValue(stage.CurNode,nil);if row then log('PENALTY_JSON '..CS.Newtonsoft.Json.JsonConvert.SerializeObject(row))end end
|
||||
end
|
||||
end
|
||||
if not state.objects then return end
|
||||
end
|
||||
local value=state.objects[state.index];if not value then log('END');state.done=true;return end
|
||||
state.index=state.index+1
|
||||
local t=value:GetType();log('TYPE '..t.FullName)
|
||||
local fs=t:GetFields(flags)
|
||||
for i=0,math.min(fs.Length-1,47)do log('FIELD '..tostring(fs[i]))end
|
||||
local ps=t:GetProperties(flags)
|
||||
for i=0,math.min(ps.Length-1,47)do log('PROPERTY '..tostring(ps[i]))end
|
||||
local ms=t:GetMethods(flags)
|
||||
for i=0,math.min(ms.Length-1,95)do if ms[i].DeclaringType==t then log('METHOD '..tostring(ms[i]))end end
|
||||
if state.index==2 then log('END');state.done=true end
|
||||
end)
|
||||
if not ok then log('ERROR '..tostring(err));state.done=true end
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user