Originally Posted by v6o
|
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.