This should be a more stable sort function. I'm at least not able to re-create the issue with this.
Code:
diff --git a/rain_functions.lua b/rain_functions.lua
index 34f5908..501b12d 100644
--- a/rain_functions.lua
+++ b/rain_functions.lua
@@ -179,8 +179,10 @@ local CreateAuraTimer = function(aura, elapsed)
end
local SortAuras = function(a, b)
- if (a and b and a.timeLeft and b.timeLeft) then
+ if(a:IsShown() and b:IsShown()) then
return a.timeLeft > b.timeLeft
+ elseif(a:IsShown()) then
+ return true
end
end
Note that I have to use the following code to even be able to re-create it:
Code:
local _UnitAura = _G.UnitAura
local override = {
{"Violet Proto-Drake", "", "Interface\\Icons\\Ability_Mount_Drake_Proto", 0, nil, 0, 0, "player",nil, nil, 60024, true, nil, 249, true},
{"Inner Will", "", "INTERFACE\\ICONS\\priest_icon_innewill", 0, nil, 0, 0, "player", nil, nil, 73413, true, nil, -15, 10, true},
{"Guild Champion", "", "Interface\\Icons\\inv_epicguildtabard", 0, nil, 0, 0, "player", nil, nil, 97341, false, nil, true},
{"Champion of the Dragonmaw Clan", "", "INTERFACE\\ICONS\\inv_misc_tabard_dragonmawclan", 0, nil, 0, 0, "player", nil, nil, 94158, false, nil, true},
}
_G.UnitAura = function(unit, id, ...)
if(unit == 'player') then
if(id < 5 and _UnitAura(unit, id, ...)) then
return unpack(override[id])
end
end
return _UnitAura(unit, id, ...)
end