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,20 @@
|
||||
-- Candidate IDs are supplied from the inventory catalog; never infer rarity
|
||||
-- from ID prefixes. Eight actual ItemRow lookups per non-battle heartbeat.
|
||||
do local function capture()
|
||||
local s=_G.__gacLootRarity1 or {index=1};_G.__gacLootRarity1=s
|
||||
if s.done then return end
|
||||
local ids=_G.__GAC_LOOT_CANDIDATES;if not ids then return end
|
||||
local flags=CS.System.Enum.ToObject(typeof(CS.System.Reflection.BindingFlags),60)
|
||||
local gm=CS.RPG.Client.GlobalVars.s_GamePhaseManager
|
||||
local phase=gm and typeof(CS.RPG.Client.GamePhaseManager):GetField('_CurrentPhase',flags):GetValue(gm)
|
||||
if not phase or typeof(CS.RPG.Client.BattleGamePhase):IsInstanceOfType(phase)then return end
|
||||
for n=1,8 do
|
||||
local id=ids[s.index]
|
||||
if not id then s.done=true;CS.UnityEngine.Debug.Log('[GAC_LOOT_RARITY] END count='..#ids);return end
|
||||
s.index=s.index+1
|
||||
local item=CS.RPG.Client.ItemHelper.GetItem(id)
|
||||
if item and item.Row then
|
||||
CS.UnityEngine.Debug.Log('[GAC_LOOT_RARITY] id='..id..' rarity='..CS.Newtonsoft.Json.JsonConvert.SerializeObject(item.Row.Rarity))
|
||||
else CS.UnityEngine.Debug.Log('[GAC_LOOT_RARITY] MISSING id='..id)end
|
||||
end
|
||||
end local ok,e=pcall(capture);if not ok then _G.__gacLootRarity1={done=true};CS.UnityEngine.Debug.Log('[GAC_LOOT_RARITY] ERROR '..tostring(e))end end
|
||||
Reference in new issue
Block a user