Update GaCy-GO
This commit is contained in:
1 parent
da8a32f60d
commit
0cbe460e49
345 files changed
+98202
-77559
No files matched your search
@@ -0,0 +1,42 @@
|
||||
-- Named metadata only. No pool/list/UI/save mutation.
|
||||
do
|
||||
local function capture()
|
||||
if _G.__GAC_GACHA_ITEM_DATA_PROBE 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
|
||||
local module=CS.RPG.Client.GlobalVars.s_ModuleManager.GachaModule
|
||||
local pools=module and module:GetSortedGachaPoolDatas()
|
||||
if not pools or pools.Count==0 then return end
|
||||
_G.__GAC_GACHA_ITEM_DATA_PROBE=true
|
||||
local log=function(value)CS.UnityEngine.Debug.Log('[GAC_GACHA_ITEM_DATA] '..tostring(value))end
|
||||
local base=pools[0]:GetType()
|
||||
while base and base.FullName~='RPG.Client.BaseGachaPoolData' do base=base.BaseType end
|
||||
if not base then error('named pool base absent') end
|
||||
local item_type=base:GetField('<PrizeItemDatas>k__BackingField',flags).FieldType:GetElementType()
|
||||
log('TYPE '..item_type.FullName)
|
||||
local fs=item_type:GetFields(flags)
|
||||
for i=0,math.min(fs.Length-1,47) do local f=fs[i];if not f.IsStatic then log('FIELD '..f.Name..' '..f.FieldType.FullName) end end
|
||||
local ctors=item_type:GetConstructors(flags)
|
||||
for i=0,math.min(ctors.Length-1,15) do log('CTOR '..tostring(ctors[i])) end
|
||||
local methods=item_type:GetMethods(flags)
|
||||
for i=0,math.min(methods.Length-1,127) do
|
||||
local method=methods[i]
|
||||
if method.DeclaringType==item_type and (method.Name=='get_ConfigID' or method.Name=='SetData' or method.Name=='set_ConfigID' or method.Name=='Init') then log('METHOD '..tostring(method)) end
|
||||
end
|
||||
if methods.Length>128 then log('TRUNCATED ItemData methods='..methods.Length) end
|
||||
local helper=typeof(CS.RPG.Client.ItemHelper)
|
||||
local ms=helper:GetMethods(flags)
|
||||
for i=0,math.min(ms.Length-1,127) do
|
||||
if ms[i].Name=='GetItem' or ms[i].Name=='CreateItemData' then
|
||||
local method=ms[i]
|
||||
log('HELPER '..tostring(method)..' static='..tostring(method.IsStatic)..' return_assignable='..tostring(item_type:IsAssignableFrom(method.ReturnType)))
|
||||
end
|
||||
end
|
||||
if ms.Length>128 then log('TRUNCATED ItemHelper methods='..ms.Length) end
|
||||
log('END')
|
||||
end
|
||||
local ok,err=pcall(capture)
|
||||
if not ok then CS.UnityEngine.Debug.Log('[GAC_GACHA_ITEM_DATA] ERROR '..tostring(err)) end
|
||||
end
|
||||
Reference in new issue
Block a user