The final version, that seems to be working:
Lua Code:
TargetFrame:UnregisterEvent("UNIT_AURA")
FocusFrame:UnregisterEvent("UNIT_AURA")
local function ReleaseAllAuras(self)
for obj in self.auraPools:EnumerateActive() do
obj:Hide()
end
-- Cleanup
self.auraPools:ReleaseAll()
-- Revert to initial values
self.auraRows, self.spellbarAnchor = 0, nil
if self.spellbar then
-- Reset anchor
hooksecurefunc(self.spellbar, "SetPoint", function(spellBar, _, _, _, _, _, shouldIgnore)
if not shouldIgnore then
spellBar:ClearAllPoints()
-- Default anchor on large frame with ToT shown
spellBar:SetPoint("TOPLEFT", self, "BOTTOMLEFT", 43, -100, true)
end
end)
end
end
hooksecurefunc(TargetFrame, "UpdateAuras", ReleaseAllAuras)
hooksecurefunc(FocusFrame, "UpdateAuras", ReleaseAllAuras)
UPDT: 43,-28 works the best for me.