Originally Posted by haste
That doesn't show any code tho' :P. Anyway, a quick and dirty example on how to do aura sorting can found on this post.
|
I was doing it similar to this:
Code:
local preAuraSetPosition = function(self, buffs, max)
local visBuffs = 0
for i=1, #buffs do
if( buffs[i].timeLeft == nil ) then
buffs[i].timeLeft = 0
end
if( buffs[i]:IsShown() ) then
visBuffs = visBuffs + 1
end
end
if(visBuffs == 0 ) then
buffs:SetHeight(0)
else
buffs:SetHeight(math.ceil((visBuffs/10)) * 26 )
end
table.sort(buffs, function(a,b) return a.timeLeft > b.timeLeft end)
end
note:
This is taken from oUF_Banthis, since I don't have the exact piece of code I used, still around. However, that code above is having the same issues of "disappearing" buff icons, with still active buffs.
*In some strange cases, the auras (which are divided into those that expire and don't, aka auras and buffs) will jump around with blank spaces between them. I have no idea why. Adding an aura (like a hunter aspect) makes it stop.
|
The thing with the code you linked in that post is that it still crits me for over NIIIINEEEETHOOOOOUSAAAND. And I didn't find the time to play around with it, until now. Seems like I have to take enough time to look into it.