Commit Graph

46 Commits

Author SHA1 Message Date
Brues 841399a0c7 classicapi migration 2026-05-29 22:56:12 -05:00
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 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 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 b18e6ffa67 refresh buff durations on player 2026-05-21 02:35:46 -05: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 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 f18d732991 fixed a missing guid check
fixed a missing guid check
2026-02-18 13:52:34 +01:00
Meow 7165be5636 fix for nameplates sometimes not showing casttimes of mobs
fix for nameplates sometimes not showing casttimes of mobs
2026-02-18 13:37:40 +01:00
Meow 5d0e195d1e performance update
performance update
2026-01-03 12:58:31 +01:00
shagu 73561eda4a compat: make hooksecurefunc append by default 2025-07-30 20:18:52 +02:00
Kyriakos (Dominick) Sidiropoulos 5a7ee5277b libcast: optimize spell cast hooks
- move rank & texture caching to CastCustom
- extend CastCustom with additional arguments
- remove action id scanning from CastSpellByName
2024-06-07 09:02:22 +02:00
Kyriakos (Dominick) Sidiropoulos b7289a702c libcast: make post-hook update last cast texture
we now set lastcasttex from the texture returned by libspell.GetSpellInfo in "CastSpellByName" post-hook
2024-06-04 08:55:56 +02:00
Kyriakos (Dominick) Sidiropoulos 0bd90d47b4 libcast: reuse spellname and texture from previous call
- introduce a guard-close in case the spell is phony
- reuse the spell-name and texture returned by GetSpellInfo()
2024-06-04 08:49:37 +02:00
shagu f5a47b8fbc libcast: handle interrupts correctly 2024-05-15 07:50:58 +02:00
shagu 314b0bca2e libcast: reuse string variables in spell detection 2023-10-03 13:22:25 +02:00
shagu 80f5b9ef0d libpredict: add library to handle heal predictions
* move "prediction" from module into a library
* reduce the resize and trigger calls on unitframes
* improve performance by caching frames and events
* introduce later API commands such as:
    - UnitGetIncomingHeals(unit)
    - UnitHasIncomingResurrection(unit)
* update unitframes to make use of new api calls
* delay spell cache loading to not overwrite previous
* remove all unitframe specific code from library
2020-11-27 15:22:01 +01:00
shagu c331a5e248 libcast: assign tooltip scanner only once on use 2020-11-19 15:33:52 +01:00
shagu 747847ea95 libcast: multi-shot is also affected by attack speed
sources:
https://www.curseforge.com/wow/addons/aimedshotcastbarclassic
https://github.com/Aviana/YaHT/blob/master/YaHT.lua
https://www.reddit.com/r/classicwow/comments/f2n9d6/hunter_rapid_fire_question/
2020-11-19 14:58:22 +01:00
shagu bc41bc9306 libcast: allow to hook and inject custom durations 2020-11-16 21:22:30 +01:00
shagu 24ffe289aa libcast: add icon for aimed and multi shot 2020-09-10 17:27:44 +02:00
shagu dcb0ac5b07 libcast: abort on invalid custom casts 2020-02-24 16:43:44 +01:00
shagu 2a98fa59da libcast: add spell rank detection 2020-01-31 22:45:20 +01:00
shagu 89fec7abdc castbar: prefer unitstrings over names 2019-08-30 19:57:45 +02:00
shagu 67837b4767 libcast: rename texture to a unique variable name 2019-05-19 10:55:27 +02:00
shagu 970fbb2abd libcast: check for spell icons before using it 2019-05-05 14:15:51 +02:00
shagu a236cc9b6e libcast: check for icon field before using it 2019-04-22 04:32:26 +02:00
shagu f205aaa864 libcast: cache detected cast icons 2019-04-20 20:11:44 +02:00
shagu c10f4f0ea1 libcast: fix icon texture path for enemycasts 2019-04-20 19:46:25 +02:00
shagu 70d5a22ad2 libcast: scan for icons on action and attach them 2019-04-20 19:30:18 +02:00
shagu 9761bbbfab libcast: properly return textures on own casts 2019-04-15 18:29:27 +02:00
Road-block e50fabfff9 core: global environment cleanup 2019-03-31 14:59:21 +02:00
shagu b9177abc15 libcast: use new cmatch for pattern matching 2018-12-02 14:47:04 +01:00
shagu 3db0f569b9 libcast: correct channel delay calculation 2018-11-10 13:34:28 +01:00
shagu 3c4cf6c478 libcast: remove obsolete events from customcasts 2018-11-02 16:00:16 +01:00
shagu be913eac86 libcast: update documentation 2018-11-01 15:37:04 +01:00
shagu 5dfe5a4899 compat: initial layout of client abstraction api 2018-11-01 14:55:29 +01:00
shagu 0e2303ae1e libs: skip library loading if already existing 2018-09-30 13:44:03 +02:00
shagu 7ecac458ac api: use dynamic shortcut for string.gfind 2018-09-28 22:53:16 +02:00
shagu ce587837d9 libcast: curse of tongues doesn't affect aimedshot 2018-09-03 21:46:48 +02:00
shagu 7292ae19a8 libcast: only update player delay on active casts 2018-08-10 17:02:38 +02:00
shagu 8fb69e0181 libcast: reduce table creations 2018-08-09 18:57:22 +02:00
Road-block 44ffb10024 libtipscan: add new tooltip scanning library 2018-07-31 21:23:01 +02:00
shagu 22ecbeafa5 libcast: avoid castbar events during scanning 2018-06-25 20:26:32 +02:00
shagu 9eb2b97f57 libcast: add global library for cast detection 2018-06-01 20:58:44 +02:00