SheepMonitor

SheepMonitor

303k Downloads

LibAuras broken, no longer maintained?

speedwaystar opened this issue ยท 1 comments

commented

the maintainer of LibAuras recommends using AuraUtil.FindAuraByName() instead of the (now broken) library
https://www.curseforge.com/wow/addons/libauras

i suggest the following change:

- main.lua | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/main.lua b/main.lua
index b7ba43e..7714ce1 100644
--- a/main.lua
+++ b/main.lua
@@ -99,7 +99,8 @@ function SheepMonitor:COMBAT_LOG_EVENT_UNFILTERED(event, ...)
             }
 
             if not self:IsClassic() and destGUID == UnitGUID('target') then
-                aura.duration = select(5, LibAuras:UnitAura('target', spellId, 'PLAYER|HARMFUL')) or 0
+                --aura.duration = select(5, LibAuras:UnitAura('target', spellId, 'PLAYER|HARMFUL')) or 0
+                aura.duration = AuraUtil.FindAuraByName(spellName, "target", "PLAYER|HARMFUL")
             end
 
             self:AuraApplied(aura)

be aware there's a potential issue with localized names, though, as outlined here: https://warcraft.wiki.gg/wiki/API_UnitAura#FindAuraByName

commented

thanks for heads up. just pushed out update.