It doesn't work. Used the code you provided as follows:
Code:
local SortAuras = function(a, b)
if (not a or not b) then return end
if(not a:IsShown()) then
return b.isDebuff
elseif(not b:IsShown()) then
return not a.isDebuff
elseif(a.isDebuff == b.isDebuff) then
return a.timeLeft > b.timeLeft
else
return a:GetID() > b:GetID()
end
end
and set timeLeft for the gap aura to -5 in PostUpdateGapAura (I noticed timeLeft could be negative (-0.062 the smallest I got and it happened very seldom, probably some OnUpdate lag)). Some screenshots of the results are attached. Auras without borders are buffs.
Edit:
Also got the following after some time.
55x oUF-1.6.4\elements\aura.lua:307: attempt to index field "?" (a nil value)
oUF-1.6.4\elements\aura.lua:307: in function <oUF\elements\aura.lua:287>
oUF-1.6.4\elements\aura.lua:361: in function "?"
oUF-1.6.4\events.lua:69: in function <oUF\events.lua:62>
Locals:
...
|
and
invalid order function for sorting
|
which is triggered by
lua's ltablib.c
Sorry for editing this that often