Files
GaCy-GO/tools/endgame_schedule_group.lua
T

18 lines
1.3 KiB
Lua
Raw Normal View History

do
local s=_G.__gacScheduleGroup1 or {i=1};_G.__gacScheduleGroup1=s
if s.i>3 then return end
local k=s.i;s.i=k+1
local ok,e=pcall(function()
local m=CS.RPG.Client.GlobalVars.s_ModuleManager.ChallengeModule
local kind=CS.System.Enum.ToObject(typeof(CS.RPG.GameCore.ChallengeGroupType),k)
local g=m:GetLatestScheduleChallengeGroupDataByGroupType(kind)
if not g then return end
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
local props=g:GetType():GetProperties(flags)
for i=0,props.Length-1 do local p=props[i];if p:GetIndexParameters().Length==0 then
local n=string.lower(p.Name)
if string.find(n,'schedule') or string.find(n,'time') or string.find(n,'begin') or string.find(n,'end') or string.find(n,'row') or string.find(n,'meta') then local ok,v=pcall(function()return p:GetValue(g,nil)end);CS.UnityEngine.Debug.Log('[GAC_GROUP_SCHEDULE] '..k..' '..p.Name..' '..tostring(p.PropertyType)..' '..tostring(ok)..' '..tostring(v));if ok and v and (string.find(n,'schedule') or string.find(n,'row')) then local j,txt=pcall(function()return CS.Newtonsoft.Json.JsonConvert.SerializeObject(v)end);if j then CS.UnityEngine.Debug.Log('[GAC_GROUP_SCHEDULE_JSON] '..k..' '..p.Name..' '..txt)end end end
end end
end)
if not ok then CS.UnityEngine.Debug.Log('[GAC_GROUP_SCHEDULE] ERROR '..tostring(e))end
end