I'm having an issue.
I'm trying to change the size of target buffs and debuffs on default UI.
But the script that I'm using changes the size of both the large and small aura icons despite having two different bits for them.
See below:
Code:
-- BUFF/DEBUFF RESIZING
local AURA_START_X = 5;
local AURA_START_Y = 32;
local AURA_OFFSET_Y = 3;
local LARGE_AURA_SIZE = 24;
local SMALL_AURA_SIZE = 18;
local AURA_ROW_WIDTH = 122;
local TOT_AURA_ROW_WIDTH = 101;
local NUM_TOT_AURA_ROWS = 2;
hooksecurefunc("TargetFrame_UpdateAuraPositions", function(self, auraName, numAuras, numOppositeAuras, largeAuraList, updateFunc, maxRowWidth, offsetX, mirrorAurasVertically)
-- a lot of this complexity is in place to allow the auras to wrap around the target of target frame if it's shown
-- Position auras
local size;
local offsetY = AURA_OFFSET_Y;
-- current width of a row, increases as auras are added and resets when a new aura's width exceeds the max row width
local rowWidth = 0;
local firstBuffOnRow = 1;
for i=1, numAuras do
-- update size and offset info based on large aura status
if ( largeAuraList[i] ) then
size = SMALL_AURA_SIZE;
offsetY = AURA_OFFSET_Y + AURA_OFFSET_Y;
else
size = SMALL_AURA_SIZE;
end
-- anchor the current aura
if ( i == 1 ) then
rowWidth = size;
self.auraRows = self.auraRows + 1;
else
rowWidth = rowWidth + size + offsetX;
end
if ( rowWidth > maxRowWidth ) then
-- this aura would cause the current row to exceed the max row width, so make this aura
-- the start of a new row instead
updateFunc(self, auraName, i, numOppositeAuras, firstBuffOnRow, size, offsetX, offsetY, mirrorAurasVertically);
rowWidth = size;
self.auraRows = self.auraRows + 1;
firstBuffOnRow = i;
offsetY = AURA_OFFSET_Y;
if ( self.auraRows > NUM_TOT_AURA_ROWS ) then
-- if we exceed the number of tot rows, then reset the max row width
-- note: don't have to check if we have tot because AURA_ROW_WIDTH is the default anyway
maxRowWidth = AURA_ROW_WIDTH;
end
else
updateFunc(self, auraName, i, numOppositeAuras, i - 1, size, offsetX, offsetY, mirrorAurasVertically);
end
end
end)
I'm thankful for any help.