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
https://www.wowinterface.com/forums/...ad.php?t=55928
If I comment "BUFFS_PER_ROW=16" it seems it working without tainting anything
Lua Code:
BUFFS_PER_ROW = 16
-- Player buffs
local b = _G.BuffFrame
b:SetMovable(true)
b:SetUserPlaced(true)
b:ClearAllPoints()
b:SetPoint("TopRight", UIParent, "TopRight", - 200, - 20)
b:SetMovable(false)
local moving
hooksecurefunc(BuffFrame, "SetPoint", function(self)
if moving then
return
end
moving = true
self:SetMovable(true)
self:SetUserPlaced(true)
self:ClearAllPoints()
self:SetPoint("TopRight", UIParent, "TopRight", - 200, - 20)
self:SetMovable(false)
moving = nil
end)
-- Player debuffs
if DebuffButton_UpdateAnchors then
hooksecurefunc("DebuffButton_UpdateAnchors", function()
local d = _G.DebuffButton1
if d then
d:SetMovable(true)
d:SetUserPlaced(true)
d:ClearAllPoints()
d:SetPoint("TopRight", BuffFrame, "TopRight", 0, - 120)
d:SetMovable(false)
end
end)
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?