Expose zero-GC ClassicAPI aura access

This commit is contained in:
Dusk-92
2026-08-24 15:59:40 +02:00
parent cb04195c8c
commit a330f424da
+11
View File
@@ -23,6 +23,9 @@ API.auras = type(_G.C_UnitAuras) == "table"
and type(_G.C_UnitAuras.GetAuraDataByIndex) == "function"
and type(_G.C_UnitAuras.GetDebuffDataByIndex) == "function"
API.aurapositional = type(_G.C_UnitAuras) == "table"
and type(_G.C_UnitAuras.UnitDebuff) == "function"
API.spellinfo = type(_G.GetSpellInfo) == "function"
API.inventory = type(_G.C_Container) == "table"
@@ -126,6 +129,14 @@ API.GetDebuffDataByIndex = function(unit, index)
end
end
-- ClassicAPI's positional UnitDebuff mirrors the Classic-Era 15-value shape
-- without allocating an AuraData table. Prefer it in hot UI refresh paths.
API.UnitDebuff = function(unit, index, filter)
if API.aurapositional then
return _G.C_UnitAuras.UnitDebuff(unit, index, filter)
end
end
API.GetCurrentChatGUID = function()
if API.chatidentity then
return _G.GetCurrentChatGUID()