Quantcast
WoWInterface - View Single Post - Hiding buffs/debuffs on target/focus frame
View Single Post
07-30-18, 09:16 AM   #8
runamonk
A Theradrim Guardian
 
runamonk's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 61
Checking...this looks simple enough.

Paste this code over the top of the code in the HideBuffs.lua

Lua Code:
  1. UIParent:SetScript("OnUpdate", function()
  2.     if TargetFrame:IsShown() then
  3.         for i=1, MAX_TARGET_BUFFS do
  4.             local frame = _G["TargetFrameBuff"..i]
  5.             if frame ~= nil then frame:Hide() end
  6.         end
  7.  
  8.         for i=1, MAX_TARGET_DEBUFFS do
  9.             local frame = _G["TargetFrameDebuff"..i]
  10.             if frame ~= nil then frame:Hide() end
  11.         end
  12.     end
  13.  
  14.     if FocusFrame:IsShown() then
  15.         numDebuffs = 0
  16.         for i=1, MAX_TARGET_BUFFS do
  17.             local frame = _G["FocusFrameBuff"..i]
  18.             if frame ~= nil then frame:Hide() end
  19.         end
  20.         for i=1, MAX_TARGET_DEBUFFS do
  21.             local frame = _G["FocusFrameDebuff"..i]
  22.             if frame ~= nil then frame:Hide() end
  23.         end
  24.     end
  25. end)

Last edited by runamonk : 07-30-18 at 09:30 AM.
  Reply With Quote