View Single Post
03-03-10, 06:14 PM   #6
coree
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 28
Originally Posted by v6o View Post
Did you take a look at Sorting of auras and Auras sorting ?
my next try was:
Code:
local sort = function(a, b)
    if (a.name == filter[name] and not (b.name == filter[name])) then
	  return true
	elseif (not (a.name == filter[name]) and b.name == filter[name]) then
	  return false
	end
end

local PreAuraSetPosition = function(self, debuffs, max)
	for i=1, max do
		if debuffs[i] then
			local debuff = debuffs[i]:GetParent()
			local frame = debuff:GetParent()
			local unit = frame.unit
			debuffs[i].name, _, _, _, _, _, _, _, _, _,debuffs[i].Id = UnitAura(unit, i, "HARMFUL")
		end
	end 
    
	table.sort(debuffs, sort) 
end
but that didnt work either. the sort function is my problem and i currently have no idea how to solve my problem.
  Reply With Quote