Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LibAuras broken, no longer maintained? #11

Open
speedwaystar opened this issue Sep 10, 2024 · 1 comment
Open

LibAuras broken, no longer maintained? #11

speedwaystar opened this issue Sep 10, 2024 · 1 comment

Comments

@speedwaystar
Copy link

speedwaystar commented Sep 10, 2024

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

@funkjedi
Copy link
Owner

thanks for heads up. just pushed out update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants