Thread Tools Display Modes
Prev Previous Post   Next Post Next
10-29-22, 10:47 AM   #1
Deadlyz
A Wyrmkin Dreamwalker
 
Deadlyz's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2010
Posts: 55
Hide Buffs/Debuffs on Target/Focus.

Hello!

With release of the DF prepatch this nice piece of code doesn't work anymore
Maybe some bored addon author could help me a bit?

Code:
TargetFrame:UnregisterEvent("UNIT_AURA", unit)
FocusFrame:UnregisterEvent("UNIT_AURA", unit)

hooksecurefunc(TargetFrame, "UpdateAuras", function()
    if frame ~= TargetFrame and frame ~= FocusFrame then return end

    local frameName = frame:GetName()

    for index = 1, MAX_TARGET_BUFFS do
        local buff = _G[frameName .. "Buff" .. index]
        if buff then
            buff:Hide()
        end
    end

    for index = 1, MAX_TARGET_DEBUFFS do
        local debuff = _G[frameName .. "Debuff" .. index]
        if debuff then
            debuff:Hide()
        end
    end
end)
Thanks in advance!
__________________

My last movie: Rogue Sweethearts
  Reply With Quote
 

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Hide Buffs/Debuffs on Target/Focus.

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off