libtotem: attach to global space properly

This commit is contained in:
shagu
2021-02-22 13:03:25 +01:00
parent 660a330af3
commit 467ebd2e40
+3 -2
View File
@@ -93,8 +93,6 @@ GetTotemInfo = function(id)
return 1, active[id].name, active[id].start, active[id].duration, active[id].icon
end
pfUI.api.libtotem = libtotem
if class ~= "SHAMAN" then return end
libtotem = CreateFrame("Frame")
@@ -152,6 +150,9 @@ libtotem.CheckAddQueue = function(self, name, rank, icon)
return nil
end
-- assign library to global space
pfUI.api.libtotem = libtotem
-- Check for totem spell casts
hooksecurefunc("CastSpell", function(id, bookType)
local name, rank, icon = libspell.GetSpellInfo(id, bookType)