Changing buffs per row - WoWInterface
Thread Tools Display Modes
10-17-20, 07:53 PM   #1
A Kobold Labourer
Join Date: Oct 2020
Posts: 1
Changing buffs per row

Hi. I want to simply change amount of buffs displayed per row in default ui from 8 to 16
This can be done simply by writing BUFFS_PER_ROW = 16 saving as .lua and putting it alongside with .toc file into addons folder. I get no lua errors using this, basically I played half Legion with this simple "addon".
However I feel this is not right way of changing buffs per row because it's a default global variable
And using Bugsack/buggrabber addon I can see that sometimes my "addon" action is blocked while it attempts to call secure function: ArenaEnemyFrames:ClearAllPoints()

There's also code in this little addon provided by Resike in this thread
If I comment "BUFFS_PER_ROW=16" it seems it working without tainting anything
Lua Code:
  1. BUFFS_PER_ROW = 16
  2.     -- Player buffs
  3.     local b = _G.BuffFrame
  4.     b:SetMovable(true)
  5.     b:SetUserPlaced(true)
  6.     b:ClearAllPoints()
  7.     b:SetPoint("TopRight", UIParent, "TopRight", - 200, - 20)
  8.     b:SetMovable(false)
  10.     local moving
  11.     hooksecurefunc(BuffFrame, "SetPoint", function(self)
  12.         if moving then
  13.             return
  14.         end
  15.         moving = true
  16.         self:SetMovable(true)
  17.         self:SetUserPlaced(true)
  18.         self:ClearAllPoints()
  19.         self:SetPoint("TopRight", UIParent, "TopRight", - 200, - 20)
  20.         self:SetMovable(false)
  21.         moving = nil
  22.     end)
  25.     -- Player debuffs
  26.     if DebuffButton_UpdateAnchors then
  27.         hooksecurefunc("DebuffButton_UpdateAnchors", function()
  28.             local d = _G.DebuffButton1
  29.             if d then
  30.                 d:SetMovable(true)
  31.                 d:SetUserPlaced(true)
  32.                 d:ClearAllPoints()
  33.                 d:SetPoint("TopRight", BuffFrame, "TopRight", 0, - 120)
  34.                 d:SetMovable(false)
  35.             end
  36.         end)
  37.     end

Unfortunately there seems to be no addons which allow to modify default buff frames. So is there a way to make changes to it without taint?
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Changing buffs per row

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