cfc26d8c99
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.
28 lines
663 B
Lua
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
|