Originally Posted by Khornate
Im no pro with addon coding or anything but i feel like something is wrong when SAA use this much memory
Click here
|
I really have no idea what's causing that. Are you using 1.4.0 and, if so, could you tell me if it's eating up that much memory in 1.3.3? The UNIT_AURA change isn't storing any new information.
Originally Posted by Ranghar
Is it possible to switch order of bars in S&A? In some old version (1.1 I think) I used to have MF bar above IS bar. Not it is the opposite. I would like to customize it, making it more in line with order of my keybindings.
|
The short answer is no. The long answer is that yes, it's possible to control the bar order in SAA, but it requires an even uglier hack to accomplish quickly.
The really long answer is that the bars in SAA are generated by iterating through an array for each type of bar, ex. SAA.combat.procs (which makes it really easy to add more bars to a category in the future). Unfortunately, the iteration process is, while deterministic, also uncontrollable - the data comes out of the array in the order in which it was stored internally, and using string keys means that I have no control over that internal order. This is a limitation of Lua itself, and switching the order in which the data is added to the array may not change the order that the bars are added to the screen.
When creating bars, there is a variable - barcount, in CreateBarFrames() - which controls bar order (well, really it controls how far down from the top of the SAA frame a bar is placed, but it amounts to the same thing). If you were to hack SAA to rearrange the bars, this is the variable you would want to play with. Unfortunately, this is a personal preference thing, so it's not something I'll add to the official version of the mod, but you'd want to do something like

-- Creates bar frames by iterating through categories and setting up each,
-- either merged or not
function SquawkAndAwe:CreateBarFrames()
<snip>
-- Debuff bars
layer = 1
add = 0
if self.db.char.bars.mergedebuffs then
<snip merged debuff code>
---------OLD CODE----------------------
else
for k,v in pairs(self.db.char.bars.debuffs) do
if v.show then
SquawkAndAwe:SetBarFrame(k, barCount, SquawkAndAwe.combat.debuffs[k].id)
SquawkAndAwe:AddStatusBar(self.frames[k], k, v.color, 1)
if v.tick then
SquawkAndAwe:AddStatusBar(self.frames[k], k.."Tick", self.db.char.bars.tickcolor, 2, true, SquawkAndAwe.combat.debuffs[k].tick)
end
barCount = barCount + 1
end
end
end
----------NEW CODE-----------------
else
local tempBarCount = 0
local position = 0
for k,v in pairs(self.db.char.bars.debuffs) do
if v.show then
if k == "Moonfire" then position = 0
elseif k == "Insect" then position = 1
elseif k == "Faerie" then postition = 2 end
SquawkAndAwe:SetBarFrame(k, barCount + position, SquawkAndAwe.combat.debuffs[k].id)
SquawkAndAwe:AddStatusBar(self.frames[k], k, v.color, 1)
if v.tick then
SquawkAndAwe:AddStatusBar(self.frames[k], k.."Tick", self.db.char.bars.tickcolor, 2, true, SquawkAndAwe.combat.debuffs[k].tick)
end
tempBarCount = tempBarCount + 1
end
end
barCount = barCount + tempBarCount
end
I was intending to add an order field to the options for each bar (only within each category, so your debuffs would always be together, etc) which could control this, but that's a bunch of backend work.