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,25 @@
|
||||
-- One previously captured method token through reflection, not a type scan.
|
||||
do
|
||||
if not _G.__gacCwResolveToken1 then
|
||||
_G.__gacCwResolveToken1=true
|
||||
local function log(v)CS.UnityEngine.Debug.Log('[GAC_CW_RESOLVE_TOKEN] '..tostring(v))end
|
||||
local ok,err=pcall(function()
|
||||
local owner=typeof(CS.RPG.Client.GridFightModule).Module
|
||||
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
|
||||
local methods=owner:GetType():GetMethods(flags)
|
||||
local method=nil
|
||||
for i=0,methods.Length-1 do
|
||||
local m=methods[i]
|
||||
if m.Name=='ResolveMethod' and m:GetParameters().Length==1 then method=m;break end
|
||||
end
|
||||
if not method then error('ResolveMethod is absent from Module reflection metadata')end
|
||||
local typed=CS.System.Array.CreateInstance(typeof(CS.System.Int32),1)
|
||||
typed[0]=101276529 -- Captured GridFightModule.GetSeason.
|
||||
local args=CS.System.Array.CreateInstance(typeof(CS.System.Object),1)
|
||||
CS.System.Array.Copy(typed,0,args,0,1)
|
||||
local result=method:Invoke(owner,CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),0),nil,args,nil)
|
||||
log('RESULT '..tostring(result))
|
||||
end)
|
||||
if not ok then log('ERROR '..tostring(err))end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user