Verified Commit 393c4b76 authored by Repooc's avatar Repooc
Browse files

try to fix talking head frame not hidden

parent f5b2e5e5
...@@ -319,6 +319,17 @@ function B:SLETalkingHead() ...@@ -319,6 +319,17 @@ function B:SLETalkingHead()
end end
end end
function B:BlizzTest(_, addon)
if addon == 'Blizzard_TalkingHeadUI' then
hooksecurefunc('TalkingHeadFrame_PlayCurrent', function()
-- -- SLE:Print('TalkingHead Frame initilized PlayCurrent')
if E.db.sle.skins.talkinghead.hide then
_G.TalkingHeadFrame:Hide()
end
end)
end
end
function B:UpdateAll() function B:UpdateAll()
B.db = E.db.sle.blizzard B.db = E.db.sle.blizzard
B:ErrorFrameSize() B:ErrorFrameSize()
...@@ -339,6 +350,7 @@ function B:Initialize() ...@@ -339,6 +350,7 @@ function B:Initialize()
end end
self:RegisterEvent('ADDON_LOADED', 'Addons') self:RegisterEvent('ADDON_LOADED', 'Addons')
self:RegisterEvent('ADDON_LOADED', 'BlizzTest')
-- Check Forced Loaded AddOns -- Check Forced Loaded AddOns
for AddOn, Table in pairs(B.AddonsList) do for AddOn, Table in pairs(B.AddonsList) do
...@@ -362,11 +374,6 @@ function B:Initialize() ...@@ -362,11 +374,6 @@ function B:Initialize()
SLE.UpdateFunctions["Blizzard"] = B.UpdateAll SLE.UpdateFunctions["Blizzard"] = B.UpdateAll
B:SLETalkingHead() B:SLETalkingHead()
hooksecurefunc('TalkingHeadFrame_PlayCurrent', function()
if E.db.sle.skins.talkinghead.hide then
_G.TalkingHeadFrame:Hide()
end
end)
end end
SLE:RegisterModule(B:GetName()) SLE:RegisterModule(B:GetName())
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment