What is the issue?
This could very well be a problem with my understanding seeing as I'm not a native speaker.
From the Docs.
Return a checker suitable for out-of-range checking on friendly units, that is, a checker whose range is equal or larger than the requested range.
the range to check for.
checker, range pair or nil if no suitable checker is available. range is the actual range the returned checker checks for.
Please provide any additional information below.
The way I understand this (and the equivalent :GetHarmMinChecker(range)) from the colored part is that:
If I feed the library a valid range (eg. 20y) it will return me a function that I can call on a (friendly|hostile) unit.
I can then call checker("target") and if my target is 20 or more yards from me the checker will return true.
This perception at least is reinforced from the 'suitable for out-of-range checking on units' part.
That's not what happens.
checker(unit) returns true when I'm 'inside' the passed range (ie 'in range') and nil when I'm 'outside' ('out of range')
I can make this work in my addon obviously by inverting 'my logic' but I wanted to be sure this is not a bug to be fixed in the Lib which would have me make changes further down the road.
Thanks for reading :)
- 3 comments