54 Commits

Author SHA1 Message Date
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 b18e6ffa67 refresh buff durations on player 2026-05-21 02:35:46 -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 cc11831ada fixed heals being shown as prediction on hostile targets. 2026-03-30 16:21:25 +02: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 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 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 e939f1f96a added debug message
added debug message
2026-03-02 13:33:49 +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 c16e0c7c38 libpredict comment changes
Changed my german comments to english comments =D
2026-03-02 08:54:37 +01:00
Meow 3fbce5be8f libpredict.lua changes!
* Removed SuperWoW dependency (UNIT_CASTEVENT removed)
* Replaced SPELLCAST_START/STOP/FAILED/INTERRUPTED/DELAYED with Nampower equivalents (SPELL_START_SELF, SPELL_GO_SELF, SPELL_FAILED_SELF, SPELL_DELAYED_SELF)
* Replaced CHAT_MSG_SPELL_SELF_BUFF text parsing with SPELL_HEAL_BY_SELF for accurate heal amounts including crit detection
* Routed SPELL_START_SELF/OTHER, SPELL_GO_SELF/OTHER, SPELL_FAILED_OTHER through existing libdebuff hook system to avoid duplicate event registration
* Added 60-second resurrection timer: symbol persists after successful cast even if caster attempts and cancels a second cast
* Added GUID->Name cache for reliable target resolution when casting resurrection on dead players (UnitExists returns nil for corpses)
* Auto-enables NP_EnableSpellHealEvents CVar required for SPELL_HEAL_BY_SELF
2026-03-02 08:51:23 +01:00
Meow f1048bd7bb Revert "possible fix for libpredict to not show resses that are canceled."
This reverts commit 947b11f918.
2026-02-20 20:25:16 +01:00
Meow 947b11f918 possible fix for libpredict to not show resses that are canceled.
possible fix for libpredict to not show resses that are canceled.
2026-02-20 19:03:28 +01:00
Meow 9055dad52f fixed healcomm and libpredict not sharing same stop messages
fixed healcomm and libpredict not sharing same stop messages
2026-02-20 04:38:05 +01:00
Meow 8248e4ed91 possible fix for healpredicts with queued casting
possible fix for healpredicts with queued casting
2026-02-18 22:45:07 +01:00
Meow 3cf64ceffd string.find fix - missing parameters, thanks to jrc13245
string.find fix - missing parameters, thanks to jrc13245
2026-02-16 05:52:42 +01:00
Meow f7bcad6266 fixed a typo
fixed a typo
2026-02-11 19:41:44 +01:00
Meow b2fc8a73b1 fixed libpredict not showing own heals/resses
- Thanks at liiora for reporting this.
- Short explain, the new libpredict uses nampower for it's prediction, in all my tests i had a lots of debug messages added to track if everything works. Seeing my own messages twice i assumed, i can improve the performance by ignoring "player".  This also bugged the self-prediction because now your own abilitys were ignored. (FIXED NOW)
2026-02-10 08:51:00 +01:00
Meow f43b8f19f8 update for libdebuff
Read the readme!
Version push
2026-02-06 16:32:13 +01:00
Meow 37beca7103 New throttling menu
New throttling menu
2026-02-06 08:07:33 +01:00
Meow 54355c9019 enhanced merge into master
Final release!
2026-02-04 22:48:30 +01:00
Meow 10a1def220 4 possibles fixes.
1. Healpredict working properly together with Healcomm users.
2. Hots duration timers shared across all pfui users in the raid/group
3. Fix for nameplates vibrating when zoom is activve.
2026-01-10 00:37:23 +01:00
Meow 5d0e195d1e performance update
performance update
2026-01-03 12:58:31 +01:00
shagu 2e5ed4d7e7 libpredict: use selfcast if addons set true as target 2025-08-16 09:56:39 +02:00
shagu 73561eda4a compat: make hooksecurefunc append by default 2025-07-30 20:18:52 +02:00
shagu 32b14706f8 libpredict: update renew set bonus duration 2025-05-25 17:05:51 +02:00
shagu 060f8de940 libpredict: increase default renew duration to 15 2025-05-25 14:49:36 +02:00
shagu af2278da6b libpredict: add support for on-self in cast hook 2025-04-20 12:08:25 +02:00
shagu bedd293ce7 libpredict: add support for target arg in cast hook 2025-04-19 23:32:48 +02:00
shagu 925654fe09 libpredict: add fallback target to self 2025-03-28 21:35:01 +01:00
shagu 7fb0cf6d98 libpredict: decrease timeout for spellcast fails 2025-03-28 20:47:14 +01:00
shagu 3fa7a775f6 libpredict: cache next target while regrowth is pending 2025-03-28 19:34:05 +01:00
shagu 6ee877f42c libpredict: use locales for all hardcoded spells 2025-03-28 19:13:33 +01:00
shagu 934600c2ea libpredict: save regrowth target on spellcast start 2025-03-28 18:48:25 +01:00
shagu 5113ff9c74 libpredict: rework regrowth timer delay 2025-03-28 18:24:59 +01:00
shagu 532f1c7e57 libpredict: skip aura updates on disabled unitframes 2024-11-04 15:26:24 +01:00
shagu 4cec209e4d libpredict: calculate timeleft in GetHotDuration 2024-11-04 15:19:40 +01:00
shagu 3d3e550ee0 libpredict: trigger aura events of relevant unitframes 2024-11-04 15:17:56 +01:00
gwetchen 59b92d7ede libpredict: count tierset bonus on each item tooltip 2024-11-04 14:17:04 +01:00
shagu d9aa50decb libpredict: align hot prediction with other functions 2024-11-04 13:18:21 +01:00
shagu ffca176694 libpredict: add prediction without group 2024-11-04 12:44:25 +01:00
shagu 5f62acacb1 libpredict: convert strings into locale tables 2024-11-04 12:25:03 +01:00
gwetchen b423b9b32d libpredict: add healcomm compability for vanilla hots 2024-11-04 12:13:19 +01:00
shagu 225a84bc8d libpredict: check and abort on empty heal values 2023-07-29 15:44:49 +02:00
shagu 337a1b9519 libpredict: check for mouseover before using it 2023-03-23 09:29:12 +01:00
shagu 44bce4e3e9 prediction: check assist to identify valid unit 2023-03-10 22:02:52 +01:00