View Single Post
11-02-22, 12:16 PM   #13
Deadlyz
A Wyrmkin Dreamwalker
 
Deadlyz's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 55
The final version, that seems to be working:

Lua Code:
  1. TargetFrame:UnregisterEvent("UNIT_AURA")
  2. FocusFrame:UnregisterEvent("UNIT_AURA")
  3.  
  4. local function ReleaseAllAuras(self)
  5.     for obj in self.auraPools:EnumerateActive() do
  6.         obj:Hide()
  7.     end
  8.  
  9.     -- Cleanup
  10.     self.auraPools:ReleaseAll()
  11.  
  12.     -- Revert to initial values
  13.     self.auraRows, self.spellbarAnchor = 0, nil
  14.  
  15.     if self.spellbar then
  16.         -- Reset anchor
  17.         hooksecurefunc(self.spellbar, "SetPoint", function(spellBar, _, _, _, _, _, shouldIgnore)
  18.             if not shouldIgnore then
  19.                 spellBar:ClearAllPoints()
  20.  
  21.                 -- Default anchor on large frame with ToT shown
  22.                 spellBar:SetPoint("TOPLEFT", self, "BOTTOMLEFT", 43, -100, true)
  23.             end
  24.         end)
  25.     end
  26. end
  27.  
  28. hooksecurefunc(TargetFrame, "UpdateAuras", ReleaseAllAuras)
  29. hooksecurefunc(FocusFrame, "UpdateAuras", ReleaseAllAuras)
UPDT: 43,-28 works the best for me.
__________________

My last movie: Rogue Sweethearts

Last edited by Deadlyz : 11-02-22 at 01:41 PM.
  Reply With Quote