WeakAuras

WeakAuras

206M Downloads

WA_GetUnitBuff "PLAYER" Filter Not Functioning As Expected

MoonBunnie opened this issue · 7 comments

commented

The behavior for WA_GetUnitBuff() function when using the "PLAYER" filter string seems to no longer be working correctly with 8.2.5.

On a Feral Druid, when I try to test this function using my own Bloodtalons buff with the following:
print(WA_GetUnitBuff("player", 145152,"PLAYER"))
It prints nothing, indicating a nil return / no buff found.

If I update the function call to this:
print(WA_GetUnitBuff("player", 145152))
Then it prints out all the fields as I would expect as follows:

Bloodtalons 1033474 2 nil 30 1178287.787 player false false 145152 false false true false 1

Note that Source field shows "player" and Cast By Player field is "true".

This is repeatable with Regrowth buff as well, so appears to affect multiple spells.

Image available of the buff in question showing it is indeed mine: https://cdn.discordapp.com/attachments/218084462523711489/626618124090998795/unknown.png

I am using version 2.15.0. And also tested with first version of 2.14.0. Issue persists regardless of version, so likely caused due to 8.2.5 patch.

commented

After reviewing WA's implementation of WA_GetUnitBuff(), I decided to directly test the WoW API for UnitAura() and UnitBuff(). Here are my results with Regrowth buff active on Druid player. All of the following should return the same details for the Regrowth buff.

Working:
UnitAura("player", 1)
UnitAura("player", 1, "HELPFUL")
UnitAura("player", 1, "PLAYER|HELPFUL")
UnitBuff("player", 1)
UnitBuff("player", 1, "PLAYER")
UnitBuff("player", 1, "HELPFUL")
UnitBuff("player", 1, "PLAYER|HELPFUL")

Not Working:
UnitAura("player", 1, "PLAYER")

That last one has no output, unlike the rest. So I suspect this is an issue with the WoW API, and not WAs.

I'll keep this open ticket open for now to bring this to the WA team's attention, in case it may be desirable to modify the implementation for WA_GetUnitBuff() to tack on "HELPFUL" in the filter (similar to WA_GetUnitDebuff() which tacks on "HARMFUL"), which would solve this issue for WA_GetUnitBuff(). However, even with this change, WA_GetUnitAura() would still be broken when only using "PLAYER" as the filter.

commented

Thanks for the investigation, we'll take a look at what we can do.

commented

Thanks for looking into it, @InfusOnWoW! Should I close this ticket now since you've addressed what you could? Sorry, new at this :(

@NokuraWoW I'm not 100% sure of the exact scope of issues (could possibly effect other filters too), but as far as what I was experiencing, tacking on "HELPFUL" or "HARMFUL" would at least correct the issue with the "PLAYER" filter if you must use UnitAura/WA_GetUnitAura(). Alternatively, you could avoid using the "PLAYER" filter for the time being if you're checking for self-applied auras that can only ever come from your own player.

commented

After a bit of testing, it is indeed broken on 8.2.5. I'm not 100% sure in what way, but there doesn't appear to be any realistic workaround possible. Thus I'll change WA_GetUnitBuff to use a explicit HELPFUL filter and for the rest Blizzard needs to fix UnitAura. I did inform them that I believe there's a bug, but usually those kind of things only get solved in the next patch.

commented

Hey so is there anything we can do on our side regarding this to temporarily fix the issue? even if its to edit each WA specifically?

commented

@MoonBunnie we close out (valid) bug tickets once a fix is available to the public. There’s no need for any additional action from you.

Thanks for the report and investigation, it was quite helpful.

commented

Thanks @MoonBunnie It seems the weak aura compilation I am using also incorporates your feral bleed power weak aura, I edited that one to match your update and it is working. Thanks mate