22 lines
1.3 KiB
Lua
22 lines
1.3 KiB
Lua
-- Read only affix groups explicitly referenced by the four captured relics.
|
|
do
|
|
local groups={{kind='main',group=55,max=10},{kind='main',group=56,max=5},{kind='sub',group=5,max=12}}
|
|
local s=_G.__gacRelicAffix20261102 or {group=1,id=1}; _G.__gacRelicAffix20261102=s
|
|
if s.group>#groups 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
|
|
for i=1,3 do
|
|
local g=groups[s.group]; if not g then return end
|
|
local id=s.id
|
|
local ok,err=pcall(function()
|
|
local tableObj=g.kind=='main' and CS.RPG.GameCore.RelicMainAffixConfigExcelTable or CS.RPG.GameCore.RelicSubAffixConfigExcelTable
|
|
local row=tableObj.GetData(g.group,id)
|
|
CS.UnityEngine.Debug.Log('[GAC_RELIC_AFFIX] '..g.kind..' '..g.group..' '..id..' '..CS.Newtonsoft.Json.JsonConvert.SerializeObject(row))
|
|
end)
|
|
if not ok then CS.UnityEngine.Debug.Log('[GAC_RELIC_AFFIX] ERROR '..g.kind..' '..g.group..' '..id..' '..tostring(err)) end
|
|
s.id=s.id+1; if s.id>g.max then s.id=1;s.group=s.group+1 end
|
|
end
|
|
end
|