WeakAuras.CheckRange() function missing/bugged (classic)
msalte opened this issue · 5 comments
It seems like the function WeakAuras.CheckRange() is not available in the classic WeakAuras. When I try to call it in my custom trigger, BugGrabber/BugSack is able to pick up the following stack trace (unsure if relevant or helpful at all).
My custom trigger code:
function()
for unit in WA_IterateGroupMembers() do
local hasBuff = WA_GetUnitBuff(unit, "Battle Shout")
local inRange = WeakAuras.CheckRange(unit, 20, "<=")
if not hasBuff and inRange then
return true
end
end
return false
end
I asked about this on the WA discord and was encouraged to make an issue on GitHub. It was a known issue that a library hadn't been ported to classic just yet.
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
...
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
WeakAuras\AuraEnvironment.lua:27: in function <WeakAuras\AuraEnvironment.lua:26>
(tail call): ?
[string "--[[ Error in 'TEST' ]] return function() ..."]:4: in function <[string "--[[ Error in 'TEST' ]] return function() ..."]:1>
[C]: in function `xpcall'
WeakAuras\GenericTrigger.lua:541: in function <WeakAuras\GenericTrigger.lua:505>
WeakAuras\GenericTrigger.lua:658: in function `ScanEventsInternal'
WeakAuras\GenericTrigger.lua:619: in function `ScanEvents'
WeakAuras\GenericTrigger.lua:1296: in function <WeakAuras\GenericTrigger.lua:1294>```
I haven’t been paying much attention but I feel like there does exist a library now. @mrbuds am I right, or is my memory failing me?
The library is working now indeed, but it's less accurate than what we have on retail, for example it doesn't have an item/spell for 40y which is very common
for friendly 0-5-15-20-30-35
hostile 0-5-20-30-35
So i'm not sure if it's really a good idea to re-add it for classic, i think using custom code with IsSpellInRange is more accurate.
But i have a PR ready if you think we should re-add it.
Frankly, since you are the WA for Classic master chief maintainer. (A title I just made up.) It's your call.