29 Commits

Author SHA1 Message Date
Brues 73b409fb88 Route slash registration through pfUI.api.RegisterSlashCommand
The RegisterSlashCommand helper in api/api.lua was effectively unused
(only macrotweak called it); every other command hand-rolled the
SLASH_*/SlashCmdList pair. Convert the existing manual registrations to
the helper with force=true, preserving the current always-bind behavior
while centralizing the pattern behind one code path (and its _G. and
conflict-check handling).

Left as-is: pfUI.lua's /rl, /pfui, /gm (registered before api.lua
defines the helper) and the vendored libs' debug commands.
2026-07-13 00:06:20 -05:00
Brues 9b7aca8541 show CLASSIC_API_VERSION in /pfdll 2026-06-27 19:20:06 -05:00
Brues b79132b9f4 casts: route everything through C_Spell, drop libcast + libdebuff_casts
ClassicAPI's recent C_Spell additions cover remote-unit casts natively
(SMSG_SPELL_START co-hook caching per caster GUID), so the two parallel
cast trackers pfUI was running — libcast.lua and the libdebuff_casts
table inside libdebuff.lua — can both retire.

Migrations:
- modules/castbar.lua: focus/player cast-info gathering reads
  C_Spell.UnitCastingInfo / UnitChannelInfo directly. Fallback ladder
  (libdebuff_casts → pfGetCastInfo → pfGetChannelInfo) collapses into a
  single call. Pushback handlers stop writing back into a non-existent
  cache; the local this.endTime is the source of truth.
- modules/nameplates.lua: GetCastInfo(guid) now resolves to a unit token
  via UnitTokenFromGUID and queries C_Spell, returning the same compact
  struct shape downstream code expected. UpdateCastbar collapses from a
  three-branch hierarchy (dead IterDebuffs / libdebuff_casts / libcast)
  to one C_Spell read.
- modules/afkcam.lua: pfGetCastInfo+pfGetChannelInfo round-trip becomes
  a single C_Spell.UnitCastingInfo("player") or UnitChannelInfo fallback.
- libs/libpredict.lua: HealComm timing uses C_Spell on the sender's unit
  token after a small group-roster walk to resolve the sender's name.

Deletions:
- libs/libcast.lua entirely (-571 lines) plus its init/libs.xml entry.
- libdebuff_casts / libdebuff_item_icons tables and their write sites
  in libs/libdebuff.lua (the SPELL_START_*, SPELL_GO_*, SPELL_FAILED_*
  event handlers stop maintaining them but keep firing the
  libdebuff_*_hooks broadcast surface for actionbar / swingtimer /
  libtotem). SPELLCAST_CHANNEL_STOP now reads the active channel from
  C_Spell.ChannelInfo.
- modules/superwow.lua's supercast block — UNIT_CASTEVENT writes into
  libcast.db are redundant now that C_Spell co-hooks the same packet.
- The cast-bar item-icon override that swapped in a potion/trinket
  icon for item-triggered casts. Spell icon stays; the item-icon
  metadata path (libdebuff_item_icons) went with libdebuff_casts.

Steady Shot synthetic cast bar — Turtle WoW-specific:
- castbar.lua gains a pfUI.synthetic_casts[unit] fallback that fires
  only when C_Spell returns nil, so abilities the engine treats as
  instant but which have a meaningful wait window can still render a
  cast bar.
- modules/turtle-wow.lua replaces the old libcast.customcast block with
  a Nampower SPELL_QUEUE_EVENT subscriber. ON_SWING_QUEUED matching
  the localized "Steady Shot" name writes a 1.4s synthetic entry;
  ON_SWING_QUEUE_POPPED clears it; castbar's endMs guard self-expires
  the entry as a safety net. Note: haste scaling (libcast.ApplyShotHaste)
  is gone — bar may finish slightly early under +ranged haste buffs.

Net: 152 insertions, 972 deletions.
2026-06-25 01:18:22 -05:00
Brues 66c8e5a0b1 slash: write SLASH_* keys to _G inside module bodies
pfUI module bodies run under pfUI.env (setfenv in LoadModule), which
proxies reads to _G via __index but has no __newindex. Bare
"SLASH_FOO = ..." assignments therefore land on pfUI.env, not on _G,
and WoW's slash dispatcher reads _G.SLASH_* directly — so the slash
command never registered. SlashCmdList[KEY] assignments happened to
work because the table is read first (falls through), then the key
write hits the real global table.

/pfunitxp, /clickthrough, /ct, /disenchantall, /dea — all silently
broken until now. Fixed by prefixing SLASH_* writes with _G.
2026-06-22 14:27:20 -05:00
Brues 841399a0c7 classicapi migration 2026-05-29 22:56:12 -05:00
Brues 710be52f35 phase 3 removing tbc
Drop the now-vestigial expansion plumbing.

- Delete modules/thirdparty-tbc.lua + its xml Include
- Strip 10 tbc-tagged CreateConfig calls in modules/gui.lua
- Drop the expansion arg from CreateConfig() signature + the disabled-
  entry rendering path that depended on it
- Drop the showdisabled GUI toggle + its default
- Simplify pfUI:RegisterModule / pfUI:RegisterSkin to (name, func) only
- Strip the leading version arg ("vanilla:tbc", etc.) from all 114
  Register call sites
- Delete the pfUI.expansion variable
2026-05-25 18:50:53 -05:00
Brues b18e6ffa67 refresh buff durations on player 2026-05-21 02:35:46 -05:00
Meow d208885c16 Show proper charges for items in bags with nampower 2026-03-23 12:41:24 +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 221f015677 Changed Spellinfo into GetSpellRec for nampower only support
Changed Spellinfo into GetSpellRec for nampower only support
2026-02-17 01:29:27 +01:00
Meow def000a7c4 Refactoring: Nampower Integration & SuperWoW Cleanup
* Replaced SuperWoW GUID with native Turtle WoW GUID in focus system
* Added memoization API for `/pfcast` and `/castfocus` performance boost
* Moved Druid mana bar from superwow.lua to nampower.lua
* Cleaned up superwow.lua - removed duplicate/migrated code
* Updated GUI: "Druid Settings" replaces "SuperWoW Settings" header
* Focus system now standalone - no SuperWoW dependency required
2026-02-16 14:20:31 +01:00
Meow 54355c9019 enhanced merge into master
Final release!
2026-02-04 22:48:30 +01:00
Meow 02e5ecdbeb 6.2.2 push
For more informations read the readme please!
2026-01-10 12:48:07 +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 033809b9fd superwow: disable combat log parsers of libcast 2025-05-29 18:29:59 +02:00
shagu ebff20b965 superwow: improve libdebuff selfcast detection 2025-05-25 17:23:20 +02:00
shagu 035c4de1ca superwow: add support for native mouseover casts 2025-05-18 19:21:02 +02:00
shagu f1e92fc128 superwow: rename druid mana status bar frame 2025-05-02 00:28:36 +02:00
shagu fa431cd2f1 superwow: add druid mana bar to player frame 2025-04-25 15:55:44 +02:00
shagu 9cbb5d1b67 superwow: replace self-healing hexcode with unit 2025-02-15 17:11:42 +01:00
shagu 427461a1d4 superwow: add native guid based focus frames 2025-01-12 12:00:06 +01:00
shagu 2963f7e1e0 superwow: disable spell and enchant link workarounds 2024-11-07 21:15:37 +01:00
shagu de3f366ebf superwow: convert enchanting links back and forth 2024-11-07 12:17:26 +01:00
shagu c3336a19e6 superwow: remove unfinished spell link conversion 2024-11-07 10:09:37 +01:00
shagu b72247c8da superwow: convert enchant links to spell links 2024-11-06 23:07:01 +01:00
shagu 641476c1bc superwow: ignore buff procs during cast 2024-08-10 08:19:06 +02:00
shagu b49afcaba9 superwow: only remove existing entries on fail 2024-05-10 10:33:35 +02:00
shagu 77763cd95d superwow: move into its own module
Moving superwow integration from thirdparty into a seperate module.
It's a client mod, not an addon and therefore should not bloat the
thirdparty section that is already huge enough.

It was a mistake to treat it as an addon-compat in first place.

Now having it as a seperate module also allows it to grow better
over time as new SuperWoW features are integrated into pfUI.
2024-05-10 10:02:58 +02:00