Commit Graph

250 Commits

Author SHA1 Message Date
Brues ba566cdd53 phase 2 removing tbc
Strip dead pfUI.client > 11200 and pfUI.expansion == "tbc" branches now
that vanilla is the only supported client.

- pfUI.lua: hardcode expansion = "vanilla"; collapse force_region matrix
- compat/vanilla.lua, libs/{libcast,libdebuff,libtotem,libunitscan,
  focus}: drop always-false early-returns
- api/unitframes.lua: delete TargetBuffOnUpdate poller + tbc visibility
  and secure-template branches; click-cast keeps only vanilla path
- api/ui-widgets.lua: unconditional EffectiveScale divide
- env/tables.lua: drop unused focus/focustarget pfValidUnits entries
- modules/actionbar.lua: simplify EnablePaging, drop ButtonSwitch/
  petvisibility, unwrap prowl block, single keybind-remap path
- modules/{castbar,chat,cooldown,loot,questitem,totems}: unwrap
  always-true conditionals
- modules/nameplates.lua: cfg-only fake-cooldown gate, unwrap overlap/
  clickthrough + mouselook blocks
- modules/friends.lua + skins/blizzard/friends.lua: maxtab = 4
- skins/blizzard/{help,game_menu,questlog}: drop tbc-only branches
2026-05-25 18:40:17 -05:00
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 2f17546c1a UseAction hooks: GetActionInfo + GetMacroSpell, drop tooltip scans
The three UseAction hooks in libtotem / libpredict / libcast all did
the same dance: filter out macros via GetActionText, then tooltip-scan
the action to recover the spell name + rank. ClassicAPI's
GetActionInfo + GetMacroSpell make both steps unnecessary:

- GetActionInfo returns ("spell", spellID) or ("macro", macroSlot)
- GetMacroSpell resolves a macroSlot to (name, rank, spellID) at the
  highest known rank, parsed engine-side at macro save time

So macros are no longer skipped — they resolve to their cast spell
just like a raw spell action. libtotem queue gains a real spellID
(the previous "no spellId available, icon-based fallback" comment is
obsolete). libcast also wins: it can feed the resolved spellID
through FindSpellBookSlotByID + libspell.GetSpellInfo(slot, "spell")
without the name-with-rank-suffix string concat round-trip.

Drops libtipscan:GetScanner("prediction") usage in libtotem and
libpredict, and libtipscan:GetScanner("libcast") in libcast.
2026-05-21 16:45:57 -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
Brues 9b2001114d dedup shot-haste loops behind libcast.ApplyShotHaste
The three customcast handlers (Aimed Shot, Multi-Shot, Steady Shot) each
iterated 1..32 UnitBuff slots checking the same four icon paths for
haste-providing buffs. Lifted into libcast.ApplyShotHaste which iterates
the populated auras once via C_UnitAuras.GetUnitAuras and reads from a
single SHOT_HASTE lookup table. Three loop copies collapse to one helper.

Kept texture-keyed matching (rather than spellID) because the Naxx
trinket and Quick Shots procs have spell-ID variants across server
flavors but stable icons.
2026-05-21 03:20:20 -05:00
Brues c733d1b868 use GetItemInfoInstant 2026-05-21 03:10:37 -05:00
Brues 0fe0a64121 libspell uses ClassicAPI GetSpellInfo
GetSpellInfo internals now delegate to ClassicAPI's GetSpellInfo for the
DBC metadata read instead of scraping castTime/range out of the tooltip.
Drops the libtipscan dependency from libspell and the regex-based parsing
of SPELL_CAST_TIME_SEC/MIN/SPELL_RANGE. Same 8-value return shape so all
call sites (libtotem, libpredict, libcast, actionbar) continue working.
2026-05-21 02:56:58 -05:00
Brues b18e6ffa67 refresh buff durations on player 2026-05-21 02:35:46 -05:00
Brues 2eb7506f3c dont need to scan tooltip 2026-05-21 00:55:22 -05:00
Brues 29e841d9c4 libtooltip can just use GetItem from ClassicAPI 2026-05-18 13:19:59 -05:00
Brues 67146ef3a4 begin utilizing ClassicAPI 2026-05-16 13:02:38 -05:00
Meow 0ef3bd0148 fixed a bug where targeting an offline player predicted heals on them 2026-04-11 21:49:54 +02:00
Meow 10dee38b0f libpredict
Fixed heal prediction showing on hostile targets when healing friendly units via mouseover or click-to-cast
2026-04-03 05:32:55 +02:00
Meow 1b04754a30 fix for libdebuff
Fixed ownDebuffs being empty during AURA_CAST on first cast, preventing downrank detection from working correctly
2026-04-02 15:42:12 +02:00
Meow ca337259d1 removed duplicated debug 2026-04-02 14:55:21 +02:00
Meow a0a3ef09aa fix for wrong copied hook 2026-04-02 14:35:17 +02:00
Meow 442d4c7be7 hook for Downrank protection 2026-04-02 14:28:14 +02:00
Meow 0abb7b9929 Revert "added downrank check for hooks"
This reverts commit 79d0a401c9.
2026-04-02 14:24:01 +02:00
Meow 79d0a401c9 added downrank check for hooks 2026-04-02 14:03:46 +02:00
Meow aa2cb95ec2 Several changes
Fix stale debuff icons/tooltips on target frame after target swap
Fix debuffs not showing on nameplates for timer-less spells (e.g. Hurricane)
Fix buffwatch timer visually speeding up when another debuff fades
Remove 50ms aura cache (slotMapCache/auraFC) - caused stale debuff data
Remove "Show Only Own Debuffs" from unitframes and nameplates GUI
Force selfdebuff=0 for unitframes/nameplates on login to reset old SavedVariables
2026-03-31 19:51:36 +02:00
Meow 1f72b93ea5 New feature for "Buff" > "Target Debuff Bar"
"Target Debuff Bar" should now correctly show only own debuffs (there will be still debuffs that are not shown up properly like AOE spells or procs)
2026-03-31 07:11:48 +02:00
Meow cc11831ada fixed heals being shown as prediction on hostile targets. 2026-03-30 16:21:25 +02:00
Meow d3ee08c170 fix for castbar not resetting if timer duration is the same as before. 2026-03-30 03:19:11 +02:00
Meow 5be9b00623 added Spellcast_channel_stop to libdebuff 2026-03-29 21:24:58 +02:00
Meow c0c3f9a21c Fix for other channels to have a castbar again 2026-03-28 19:19:45 +01:00
Meow 2f61716858 fixed castbar not showing properly for abilitys like Hunter Volley 2026-03-28 12:46:44 +01:00
Meow 57cbf1d1b6 updated link for nampower installation guide. 2026-03-26 15:29:13 +01:00
Meow b041a16744 Update libpredict.lua 2026-03-25 10:57:47 +01:00
Meow 80fe64e997 advanced libpredict 2026-03-24 18:40:58 +01:00
Meow aa73e60372 prayer of healing fix - now always predicts the priests group/target 2026-03-24 12:35:56 +01: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 2ef9c5ee1e Refactor nameplate cast tracking to be fully GUID-based
Problem:
Since a recent Turtle-WoW update, nameplates would show the same castbar on all mobs sharing a name (e.g. multiple "Defias Rogue Wizard"). Additionally, a targeted mob that was not casting would incorrectly display the castbar of a nearby mob with the same name.

Changes:
**`modules/nameplates.lua`**
- Removed `hasNampower` version-sniffing entirely. Nampower is a hard requirement for pfUI; all related guards have been removed and the code runs unconditionally.
- Castbar lookup now always uses `nameplate.cachedGuid` directly — never `GetUnitGUID("target")` or a unit name string.
- Removed dead fallback block using `UnitCastingInfo("target")`.
- Restored fallback via `pfGetCastInfo(cachedGuid)` / `pfGetChannelInfo(cachedGuid)` (see libcast changes below) for casts not tracked by libdebuff (e.g. already-in-progress casts on login).

**`libs/libcast.lua`**
- Renamed `UnitCastingInfo` → `pfGetCastInfo` and `UnitChannelInfo` → `pfGetChannelInfo` to avoid confusion with the Blizzard API of the same name, which does not exist in Vanilla.
- Name-based fallback lookup (`libcast.db[unitName]`) is now skipped when a GUID is available. This prevents cast bleed between mobs that share a name.

**`libs/libpredict.lua`, `modules/castbar.lua`, `modules/afkcam.lua`**
- Updated all call sites to use the renamed `pfGetCastInfo` / `pfGetChannelInfo`.
2026-03-23 10:47:42 +01:00
Meow 68ff49be24 fixed castbar for channeling units 2026-03-22 10:38:53 +01:00
Meow a7bfff5d33 Added new throttle option for nameplate castbar 2026-03-21 08:05:45 +01:00
Meow 8dc9f1cd13 Reapply "fix for libtotem.lua crashing with Invalid spell slot"
This reverts commit 02d3cd8348.
2026-03-14 09:58:26 +01:00
Meow 02d3cd8348 Revert "fix for libtotem.lua crashing with Invalid spell slot"
This reverts commit cc61fbf6d7.
2026-03-14 09:56:20 +01:00
Meow cc61fbf6d7 fix for libtotem.lua crashing with Invalid spell slot 2026-03-14 09:52:16 +01:00
Meow c503635622 libtotem fix 2026-03-10 18:28:15 +01:00
Meow 48c5d50f51 Fix swing timer not resetting on resisted/missed spells
The swing timer now correctly resets when your spell is resisted or misses. Previously, a resisted Moonfire (for example) would not reset the swing timer bar even though the server had already reset your actual swing — causing the bar to desync until the next auto-attack.
2026-03-05 04:09:56 +01:00
Meow c0bd8cb4cf swingtimer update 2026-03-04 22:40:08 +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 f5d2c48933 more fixes for heal predictions
more fixes for heal predictions
2026-03-03 08:29:00 +01:00
Meow c8500efae9 fix for heal predictions with healcomm users
fix for heal predictions with healcomm users
2026-03-03 00:43:24 +01:00
Meow 3922d9879e fixed typos and cleaned up comments 2026-03-02 19:13:45 +01:00
Meow e939f1f96a added debug message
added debug message
2026-03-02 13:33:49 +01:00
Meow 958aff610b libdebuff version push for nampower - UPDATE!
libdebuff version push for nampower - UPDATE!
2026-03-02 13:09:19 +01:00
Meow b91ef05a96 SuperWoW dependency fully removed
Read the Readme for more informations please.
2026-03-02 13:05:22 +01:00
Meow c7aca0de99 GUID replacements
* Replace all `local _, guid = UnitExists(unit)` with `GetUnitGUID(unit)` (Nampower 3.0.0+)
* Bump minimum required Nampower version to 3.0.0
2026-03-02 10:41:49 +01:00
Meow 90fc2f83ff libdebuff
Making it as obviousl as i can for players to update...
2026-03-02 09:30:08 +01:00
Meow 668bb3d21f small update
small update
2026-03-02 09:21:15 +01:00