Files
GaCy-GO/tools/cw_season_timer_probe.lua
T

34 lines
1.5 KiB
Lua

-- Named season/time getters and MonoRemainTimer metadata only.
do
if not _G.__gacCwSeasonTimer1 then
_G.__gacCwSeasonTimer1=true
local function log(v)CS.UnityEngine.Debug.Log('[GAC_CW_SEASON_TIMER] '..tostring(v))end
local ok,err=pcall(function()
local module=CS.RPG.Client.GlobalVars.s_ModuleManager.GridFightModule
local season=module:GetSeason(module.SeasonID,module.SubSeasonID)
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
local t=season:GetType()
local methods=t:GetMethods(flags)
for i=0,methods.Length-1 do
local m=methods[i]
if m.DeclaringType==t then log('METHOD '..tostring(m)..' TOKEN '..m.MetadataToken)end
end
local ps=t:GetProperties(flags)
for i=0,ps.Length-1 do
local p=ps[i]
log('PROPERTY '..tostring(p))
local scalar=tostring(p.PropertyType.FullName)
if scalar=='System.Int64' or scalar=='System.UInt32' or scalar=='System.Boolean' or scalar=='System.Double' then
local getter=p:GetGetMethod(true)
local good,value=pcall(function()return getter:Invoke(season,CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),0),nil,CS.System.Array.CreateInstance(typeof(CS.System.Object),0),nil)end)
log('VALUE '..p.Name..' '..tostring(good)..' '..tostring(value))
end
end
local timer=typeof(CS.RPG.Client.MonoRemainTimer)
local fields=timer:GetFields(flags)
for i=0,fields.Length-1 do log('TIMER_FIELD '..tostring(fields[i]))end
end)
if not ok then log('ERROR '..tostring(err))end
end
end