Files
coa-weakauras/WeakAuras/LibGroupTalentsWrapper.lua
T
NoM0Re cfc26d8c99 Fix incorrect login message, rework LibGroupTalentsWrapper
The login message was triggered incorrectly due to the "Beta" tag in the version string. This has been fixed.

Almost completely removed due to impracticality with the 3.3.5a API.
When RAID_ROSTER_UPDATE or PARTY_MEMBERS_CHANGED fires, data is unavailable for ~1.5 seconds.
If these events fire again within that time, the timer needs to be restarted, leading to excessive code complexity and requiring handling for every edge case.
Instead, we now simply check if the unit has changed when the library fires its callback.
2025-02-19 01:45:04 +01:00

28 lines
663 B
Lua

if not WeakAuras.IsLibsOK() then return end
local AddonName, Private = ...
local LibGroupTalents = LibStub:GetLibrary("LibGroupTalents-1.0", true)
local subscribers = {}
Private.LibGroupTalentsWrapper = {
Register = function(f) end,
}
if LibGroupTalents then
function Private.LibGroupTalentsWrapper.CallbackHandler(_, _, _, unit)
if unit then
print(unit)
for _, f in ipairs(subscribers) do
f(unit)
end
end
end
function Private.LibGroupTalentsWrapper.Register(f)
table.insert(subscribers, f)
end
WeakAuras.LGT.RegisterCallback(Private.LibGroupTalentsWrapper, "LibGroupTalents_Update", "CallbackHandler")
end