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

[Enhancement] Check range to friendly target during combat with IsActionInRange() #37

Open
Anonomit opened this issue Nov 8, 2024 · 0 comments

Comments

@Anonomit
Copy link
Contributor

Anonomit commented Nov 8, 2024

Tl;DR: There's a workaround for checking range to friendly targets in combat, but the player would need to sacrifice some actionbar space.

The range check restrictions prevent checking if an item is in range of a friendly target during combat, but they do not prevent checking if an actionbar slot is in range. For example, putting a bandage on my bar allows me to check if a friendly target is within 15 yards of me during combat. I'm referring to this as a "pivot point" - so having a bandage on my bars would add a pivot point at 15 yards, and that would result in two cases when checking range: 0-15 yards, or 15+ yards.

As a proof of concept, I've created a small (unpublished) addon which hooks into LibRangeCheck-3.0 and increases the granularity of GetRange() during combat. It does this by monitoring the actionbar for items/macros that it can use. For Classic Era, I have pivot points every 5 yards up to 50 yards away, and another at 100 yards. This does require an item/macro to be on the bar for each pivot point. In this case, 12 actionbar slots are required for maximum granularity. Macros work too (/use item:1251), and the item does not need to be owned by the player.

Is this a method that LibRangeCheck-3.0 would be interested in implementing? A lot of older content is lacking visual indicators for AoE/chain effects, which makes range checking very important on certain fights (C'thun, Kel'Thuzad, etc.). It is skirting around Blizzard's intended restrictions though, so my worry is that it could just result in harsher restrictions in the future. The tradeoff to this method is that it requires the player to sacrifice some actionbar space for more accurate range checking, which is obviously not an intuitive mechanic.

Side note: I have more pivot points than LibRangeCheck-3.0 normally has because I'm using my own custom list of items for range checking. Currently I only have updated item lists for Classic builds of the game. I do plan to install retail at some point and then PR with updated items for every game version.

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

1 participant