View Single Post
04-17-13, 07:30 PM   #3
Rainrider
A Firelord
AddOn Author - Click to view addons
Join Date: Nov 2008
Posts: 454
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.

Click image for larger version

Name:	buffs and dubuffs swapped.jpg
Views:	234
Size:	6.6 KB
ID:	7681

Click image for larger version

Name:	mixed with spaces.jpg
Views:	199
Size:	6.3 KB
ID:	7682

Click image for larger version

Name:	not mixed with spaces.jpg
Views:	205
Size:	6.3 KB
ID:	7683

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

Last edited by Rainrider : 04-17-13 at 08:10 PM.
  Reply With Quote