Commit Graph

26 Commits

Author SHA1 Message Date
Brues 314d89e30d librange.GetRangeSlot via GetActionInfo + GetMacroSpell
Replaces the texture-from-action + "no macro text" heuristic with a
proper resolve-to-spellID step. Macros that cast a 40y heal but
display a non-spell icon (custom macro icon, /castsequence wrappers,
etc.) now match correctly — the previous code missed them because
GetActionTexture returns the macro's icon, not the underlying spell's.

C_Spell.GetSpellTexture(spellID) returns the spell's intrinsic icon
path, which is what the class-spell table is keyed on, so the
texture-comparison logic is unchanged.
2026-05-21 16:48:02 -05:00
Brues 1012a67865 librange: rely on SuperWoW UnitPosition
Drops the three other range-check paths and the target-juggling
machinery they required:

- Nampower IsSpellInRange branch + spellbook-scan to find the spell name
- UnitXP_SP3 distance check (api.lua's UnitInRange wrapper still owns
  the UnitXP precise mode independently)
- Vanilla IsActionInRange fallback that briefly retargeted via
  TargetUnit / TargetLastTarget

With target-juggling gone, this also deletes the support scaffolding it
required: PlaySound override, TargetFrame_OnEvent swap, ReAttack /
lastattack restoration, the wand and combo-points detection frames
(both were suspension guards for target-juggling), the loot/inspect/
trade/combat skip-checks, librange's pfScanActive set/clear (focus.lua
still uses its own), and the librange_isLoggingOut crash workaround
the target-flip path needed.

Target case still uses IsActionInRange (vanilla-native, works for
hostile targets too); friendly party/raid/pet scan uses UnitPosition.
The friendly-only restriction on UnitPosition isn't an issue because
the scan list contains only friendlies anyway.

DPS classes (no 40y healing spell in `spells[class]`) now also get
party/raid range coloring; they only miss the target case, which is
unchanged from before.

328 → 166 lines.
2026-05-21 15:41:33 -05:00
Meow c45e6d5a7a Detect UnitXP_SP3 once at load instead of per tick
Thanks @OldManAlpha for pointing that out.
2026-03-23 11:21:11 +01:00
Meow fa7e4f8b40 Range Check: UnitXP mode
Added Range Check Mode dropdown (Vanilla / UnitXP) and UnitXP Range Threshold input field under the 40y-Range Check settings in the GUI
In UnitXP mode, UnitInRange bypasses librange entirely and queries UnitXP("distanceBetween") directly with the configured yard threshold
librange scan loop is disabled when UnitXP mode is active — no TargetUnit cycling, no spellbook scanning, no combat interruption
Fixed UnitInRange referencing librange as an undefined local instead of pfUI.api.librange, which caused silent nil returns
2026-03-04 02:27:11 +01:00
Meow b91ef05a96 SuperWoW dependency fully removed
Read the Readme for more informations please.
2026-03-02 13:05:22 +01:00
Meow 52e2755243 crash fix by jrc13245
- This possibily fixes a rare unitxp crash on logout. Credits go to:  jrc13245
2026-01-28 06:31:24 +01:00
Meow 564eee99e9 fixed shaman range check.
fixed shaman range check.
2026-01-21 09:39:09 +01:00
Meow 34f5c3eb02 Version 6.1.0 - Raid/Party Frame Fixes
Bugfixes:
- Fixed 40-yard range check not working for raid/party frames
- Fixed aggro indicator not displaying properly on raid/party frames
- Improved aggro cache to only cache positive results for instant detection
- Fixed HP/Mana not updating with "Use Raid Frames for group" enabled
- Added SuperWoW nil-check for SpellInfo
- Added missing events: PARTY_MEMBER_ENABLE, PARTY_MEMBER_DISABLE, PLAYER_UPDATE_RESTING

UI Improvements:
- Share/Hoverbind buttons now show warning when module is disabled
2026-01-08 12:25:18 +01:00
Meow 5d0e195d1e performance update
performance update
2026-01-03 12:58:31 +01:00
shagu ffd7d48fe2 librange: add z-axis to superwow range detection 2024-11-26 21:22:20 +01:00
shagu 4b50ea8972 librange: try to use superwow for range detection 2024-11-26 21:02:30 +01:00
shagu 7e0990c4e6 librange: disable 40y checks while in cat form 2024-05-23 10:37:31 +02:00
gwetchen d7a7387465 librange: skip rangescan when player has combo points
don't perform range checks while the player has combo points to avoid losing them
2024-02-16 09:29:00 +01:00
shagu 1d01a2b765 librange: disable target frame events during scan 2023-06-13 19:56:32 +02:00
shagu 1e8027e9c5 librange: pause 40y rangecheck during wand attacks 2021-10-24 15:18:02 +02:00
shagu 5b815a899b librange: disable target sounds during scan 2021-08-01 12:19:49 +02:00
shagu e23cac89d8 librange: skip on macro action slots 2020-12-30 16:28:33 +01:00
shagu 7a687aa9a0 librange: skip rangescan during auto-attack 2020-09-07 18:57:32 +02:00
shagu b896560761 librange: ignore empty buttons and macros 2020-06-17 21:08:38 +02:00
shagu 2492abf843 librange: abort on non-healing classes 2019-12-16 11:02:14 +01:00
shagu 13942d4c53 librange: use native rangechecker for tbc 2019-12-12 21:31:20 +01:00
shagu 8c337b3d2c librange: fix tbc variable load scoping 2019-04-07 11:08:51 +02:00
shagu cda0985fd5 librange: query player class only once 2019-03-31 14:59:21 +02:00
shagu 0e2303ae1e libs: skip library loading if already existing 2018-09-30 13:44:03 +02:00
shagu d609a088a5 librange: activate on login 2018-06-01 22:10:58 +02:00
shagu 4a0e327867 librange: transform module to library 2018-06-01 20:58:49 +02:00