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

Range Check condition, handle 3rd state "nil" #598

Closed
mrbuds opened this issue Aug 5, 2018 · 8 comments · Fixed by #602
Closed

Range Check condition, handle 3rd state "nil" #598

mrbuds opened this issue Aug 5, 2018 · 8 comments · Fixed by #602
Labels
🐛 Bug This is a problem with WeakAuras.

Comments

@mrbuds
Copy link
Contributor

mrbuds commented Aug 5, 2018

The range check condition test is:
conditionTest = "state and state.show and (UnitExists('target') and WeakAuras.IsSpellInRange(state.spellname, 'target') == 1) == (%s == 1)",

isSpellInRange return
1 if in range
0 if not in range
nil if not applicable

It works good if we test "spell in range" is true
But if we test "spell in range" is false, the nil case is valid for this test which is wrong

@InfusOnWoW
Copy link
Contributor

I guess the correct check would be:
conditionTest = "state and state.show and (UnitExists('target') and WeakAuras.IsSpellInRange(state.spellname, 'target') == %s)"

For which spells does IsSpellInRange return nil?

@mrbuds
Copy link
Contributor Author

mrbuds commented Aug 5, 2018

With blackoutkick when i target myself
With Whirling Dragon Punch all the time it return nil

@InfusOnWoW
Copy link
Contributor

Can you test what I suggested?

@mrbuds
Copy link
Contributor Author

mrbuds commented Aug 5, 2018

Yes it fix it

@InfusOnWoW
Copy link
Contributor

Good, if you don't beat me to it, I'll do a PR tomorrow.

@emptyrivers emptyrivers added the 🐛 Bug This is a problem with WeakAuras. label Aug 5, 2018
@InfusOnWoW
Copy link
Contributor

I guess we need something similar for Item ranegs

@mrbuds
Copy link
Contributor Author

mrbuds commented Aug 5, 2018

not exactly the same
IsItemInRange return true, false or nil

@InfusOnWoW
Copy link
Contributor

Nice Blizzard!

It looks to me like the existing check should work then

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug This is a problem with WeakAuras.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants