Commit Graph

352 Commits

Author SHA1 Message Date
brues-code 75c4657ab9 ClassicAPI flavor TOCs, and drop the multi-client scaffolding (#53)
* nameplates: source totem icons from UnitCreatedBySpell

Read the totem's icon from the totem-drop spell (UnitCreatedBySpell +
GetSpellTexture) instead of the self-aura at index 1 plus a
UNIT_SPELLCAST_SUCCEEDED capture for active totems. The drop spell is a
broadcast descriptor field present for every summoned unit in range, so
it resolves immediately for passive and active totems alike and gives the
totem's own icon rather than the attack-spell proxy. Drops the
UNIT_SPELLCAST_SUCCEEDED registration and handler.

Re-read the spell each render and key the cached texture on the spell id
so an in-place totem swap (same unit, new drop spell -- no plate re-add)
refreshes the icon without needing the plate to leave and re-enter view.

* CAPI min bumped to 1.13.1

* Gracefully disable pfUI when ClassicAPI is missing

Add API_Check.lua as the first TOC entry. When the ClassicAPI DLL is
absent or below the minimum version it sets pfUI_disabled and stands up
an inert stub so the rest of the addon no-ops instead of flooding load
errors: modules and skins register their bodies into no-ops, and the
setfenv'd api/lib files run inside an environment where CreateFrame and
any missing global resolve to a null object -- so no real frames or live
handlers are created and missing API calls just return null. pfUI.lua
bails early on pfUI_disabled.

* auras: scan through GetAuraSlots instead of by-index loops

Every aura scan loop (unit frame buffs/debuffs, dispel indicators, buff and
custom indicators, player buff frame, buffwatch bars, tooltip buff row) now
enumerates a unit's auras once with C_UnitAuras.GetAuraSlots and reads each
aura by slot id via the positional C_UnitAuras.UnitAuraBySlot. The by-index
getters re-walk the aura array from slot 0 on every call, so a per-button
loop over them was quadratic in the aura count; one enumeration plus a
by-slot read per aura is linear.

pfUI.api.ScanAuraSlots(unit, filter, buf, max) wraps GetAuraSlots' fill-a-
table form (table as the 5th argument) so no vararg Lua frame is involved:
Lua 5.0 allocates an `arg` table for every vararg call, which showed up as
nameplate OnUpdate/OnEvent memory growth in the first cut of this change.

Single by-index reads in tooltip and click handlers are unchanged (one call
each, and SetUnitAura takes the same index).

Requires the ClassicAPI build that adds GetAuraSlots' fill form; on an older
DLL the 5th argument is ignored and ScanAuraSlots would read the first slot
id as the count.

* Show Faction/Race icons in chat

* Load pfUI through ClassicAPI's flavor TOCs

ClassicAPI redirects the read of pfUI\pfUI.toc to a flavored file whenever
the DLL is installed, so which TOC the client opens already answers whether
ClassicAPI is there. Split the manifest three ways and let that do the work:

  pfUI.toc             fallback, reached only when ClassicAPI is missing;
                       loads API_Check.lua and nothing else
  pfUI_ClassicAPI.toc  full addon, every non-Turtle client
  pfUI_Turtle.toc      full addon plus init\turtle.xml, on Turtle

The fallback TOC declares no SavedVariables. It used to, while API_Check.lua
reset pfUI_profiles to an empty table on the disabled path -- which truncated
the player's profiles on logout.

With the missing-DLL case handled by TOC selection, API_Check.lua drops the
null object stub that kept the other ~140 files quiet, along with
pfUI_disabled and the now unreachable early return in pfUI.lua. It keeps the
version gate, which still matters: the flavor redirect landed in ClassicAPI
v1.11.0, below the v1.13.1 pfUI needs, so an old DLL still gets served a
flavor TOC. pfUI.lua also loses a verbatim duplicate of the whole check.

Turtle-only files move to init\turtle.xml: modules\turtle-wow.lua (its
TURTLE_WOW_VERSION guard is now redundant) and the lft, turtle_shop,
barbershop, transmog and ebc skins. turtle-wow registers last instead of
75th of 84; the only ordering it relies on is pfUI.chat, registered 8th.

pfSellData moves to env\selldata.lua, listed only in pfUI_ClassicAPI.toc,
since turtle-wow.lua replaces the table wholesale on Turtle. env\tables.lua
keeps an empty declaration so sellvalue.lua has something to index when the
turtle-wow module is disabled.

The release workflow pinned PFUI_CLASSIC_API_LATEST in pfUI.lua, which has
not held that constant since it moved to API_Check.lua, so the pin was
silently doing nothing. It also switches to brues-code/packager@vCAPI, which
recognizes the _ClassicAPI and _Turtle suffixes and applies the TOC build
type filters to them.

* Split the vendor price tables into their own manifests

Turtle's pfSellData moves out of modules\turtle-wow.lua into
env\selldata_turtle.lua, matching env\selldata.lua for the stock list, and
each is pulled in by the manifest for its client: init\stock.xml from
pfUI_ClassicAPI.toc, init\turtle.xml from pfUI_Turtle.toc. Either way it
loads after init\env.xml and replaces the empty pfSellData declared there.

Turtle's prices used to be assigned inside the turtle-wow module body, which
put them on pfUI.env and skipped them entirely when that module was
disabled. At file scope they land on _G and apply either way.

* Drop the vanilla compat layer

compat\vanilla.lua named the handful of things that differed between clients
back when pfUI targeted several. Only one client remains, so every constant
had exactly one value. Inline each at its use site and delete the file,
init\compat.xml, and both TOC entries.

  COOLDOWN_FRAME_TYPE                    -> "Model"
  LOOT_BUTTON_FRAME_TYPE                 -> "LootButton"
  MINIMAP_TRACKING_FRAME                 -> _G.MiniMapTrackingFrame
  FRIENDS_NAME_LOCATION                  -> "ButtonTextNameLocation"
  EVENTS_MINIMAP_ZONE_UPDATE             -> the event list, in panel.lua
  MICRO_BUTTONS                          -> a local in panel.lua
  NAMEPLATE_OBJECTORDER                  -> a local in nameplates.lua
  ACTIONBAR_SECURE_TEMPLATE_BAR/_BUTTON  -> nil, so the argument goes away

NAMEPLATE_FRAMETYPE and PLAYER_BUFF_START_ID had no readers left.

RunMacroText moves to pfUI.lua. compat\vanilla.lua was setfenv'd into the
pfUI environment, so the function only ever existed on pfUI.env; at file
scope it lands on _G as a real export instead. Nothing in pfUI calls it, and
ClassicAPI neither defines nor looks for a RunMacroText global -- it does
the same throwaway edit box natively in src/macro/Execute.cpp and only
defers to a global RunMacro.

* bump CAPI min to 11303

* auras: uncap the self-debuff tooltip lookup

With selfdebuff on, the displayed debuff list is PLAYER-filtered while
GameTooltip:SetUnitAura indexes the unfiltered HARMFUL list, so both
handlers map one to the other by matching name + sourceGUID. That mapping
scanned slots 1..16 only.

The unfiltered harmful list is not capped at 16. Once a unit's 16 debuff
slots are full the server parks further debuffs in buff slots, and
C_UnitAuras classifies by the aura's polarity flag rather than its slot
range, so it reports those as harmful too -- verified live at 18 harmful on
a 20-aura target. Past the sixteenth the lookup found nothing and fell
through to the raw filtered index, opening the wrong tooltip or none.

Both now enumerate however many harmful auras the unit actually has, via
ScanAuraSlots, which also drops the per-index rescan the by-index accessor
was doing. Each handler gets its own slot buffer: OnEnter can fire while a
refresh is showing/hiding frames under the cursor, so sharing the refresh
buffer could clobber a scan mid-walk.

The nameplate module still collects at most 16 debuffs per plate. That one
is a display cap matching its 16 configured icon frames, not an aura-count
assumption, so it is left alone.

* bump CAPI min to 11304
2026-09-04 19:57:57 -05:00
Brues 685ecb4a3e Removed !!!ClassicAPI from toc dependencies
Addon is now baked into the DLL and !!!ClassicAPI will always load before pfUI so this only served to confuse users
2026-08-18 10:35:31 -05:00
Brues ee17a39445 updatenotify: isolate fork from upstream pfUI traffic + handle dev builds
Switches the addon-message prefix to "pfUI-brues" so we don't share an
inbound queue with upstream pfUI installs at all — they don't register
a listener for this prefix, so our broadcasts get dropped at the engine
level instead of needing branch-string filtering on their end. The
"main" branch tag stays as a tiebreaker for any future fork variant
sharing this prefix.

Source/dev installs leave the toc Version as "@project-version@" until
release tooling substitutes it. pfUI.lua now stamps those as "dev" with
major/minor/fix=0 instead of silently falling back to 1.2.0, and
updatenotify short-circuits on pfUI.version.string == "dev" before
broadcasting so dev installs don't ship a stale low version to everyone
in guild/raid. Single source of truth — the dev marker lives in pfUI.lua.

URLs centralize via the toc's X-Website. updatenotify and firstrun read
it via GetAddOnMetadata + string.format("%s"), and all eight translation
files swap their hardcoded shagu.org references for the same %s slot.

Drive-bys: groupsize math uses ClassicAPI's IsInRaid/IsInGroup; toc
Author typo "modfied" → "modified".
2026-06-22 13:51:00 -05:00
Brues 1a7532195a added !!!ClassicAPI to deps 2026-05-28 12:41:50 -05:00
Meow ef9495bf88 version push and readme update 2026-03-28 14:46:15 +01:00
Meow 54bcfe87a1 version push 2026-03-22 12:26:26 +01:00
Meow 9fa7fd2fff version push
version push
2026-03-04 02:36: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 5bdb7f97f3 version push - read the readme for more details
version push - read the readme for more details
2026-02-28 08:29:04 +01:00
Meow 65f20e39c6 forced version push
forced version push
- fixed healpredicts for target and player frame
2026-02-22 20:58:52 +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 7c91ccf360 small update
Please read the readme to see what has been changed.
2026-01-27 07:32:16 +01:00
Meow 6dd962fe69 version update push
version update push
2026-01-21 21:26:20 +01:00
Meow 0c4b85b721 update/fix
please read the readme for details
2026-01-11 21:32:12 +01:00
Meow 02e5ecdbeb 6.2.2 push
For more informations read the readme please!
2026-01-10 12:48:07 +01:00
Meow 4c8e424565 - New spell tracking!
For more informations read the latest changelogs in the readme!
2026-01-10 05:32:03 +01:00
Meow 77147242f4 v6.2.0 - HoT Timer System Overhaul & Nameplate Fixes
HoT Timer fixes (Regrowth duration, Instant-HoT detection, SuperWoW UNIT_CASTEVENT support, HealComm compatibility), Nameplate zoom/flicker fixes, Druid Rip/Rake combo point tracking, Ferocious Bite refresh fix, energytick talent filter.

See README.md for full changelog.
2026-01-10 03:42:42 +01:00
Meow e83ff80538 Version 6.1.1 - Chat & Nameplate Level Fixes
Bugfixes:
- Fixed targeting high-level players overwriting known level with -1
- Chat now shows "??" instead of -1 for unknown levels
- Nameplates now use stored level from database after reload
- Nameplate level color now uses difficulty color when loaded from DB

Config Changes:
- Chat player level display now disabled by default
2026-01-08 19:02:02 +01:00
Meow 07f23db45f Version push
Version push
2026-01-08 12:30:05 +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
shagu 2c14a8884f toc: bump version to 5.5.4 2025-07-24 21:28:31 +02:00
shagu cb0f8088a5 toc: bump version to 5.5.3 2025-07-24 09:50:53 +02:00
shagu 528bfb7d1f toc: bump version to 5.5.2 2025-07-22 21:55:25 +02:00
shagu 65e989469f toc: bump version to 5.5.1 2025-07-21 09:27:10 +02:00
shagu 8bede9db04 toc: bump version to 5.5.0 2025-07-21 00:12:09 +02:00
shagu f8cbb1e60a toc: bump version to 5.4.21 2025-06-05 22:31:57 +02:00
shagu 91ba6a22fe toc: bump version to 5.4.20 2025-05-25 17:24:25 +02:00
shagu c5967377df toc: bump version to 5.4.19 2025-05-25 14:36:31 +02:00
shagu af873fee62 toc: bump version to 5.4.18 2025-04-27 14:12:59 +02:00
shagu 8251bb6305 toc: bump version to 5.4.17 2025-04-07 09:24:07 +02:00
shagu 151d916474 toc: bump version to 5.4.16 2025-03-30 00:39:04 +01:00
shagu ec13e9b9cd toc: bump version to 5.4.15 2025-03-03 18:34:43 +01:00
shagu bd6af93a96 toc: bump version to 5.4.14 2025-02-15 17:26:09 +01:00
shagu 757f525ce9 toc: bump version to 5.4.13 2025-01-31 21:56:23 +01:00
shagu 91a602f0bb toc: bump version to 5.4.12 2025-01-04 18:20:32 +01:00
shagu 588a7a2c2a toc: bump version to 5.4.11 2024-11-09 11:55:38 +01:00
shagu fb9cf1c799 toc: bump version to 5.4.10 2024-11-06 08:16:15 +01:00
shagu b4afcbed04 toc: bump version to 5.4.9 2024-11-04 19:44:21 +01:00
shagu 82eee0c0c9 toc: bump version to 5.4.8 2024-11-03 12:35:31 +01:00
shagu d503aee6b1 toc: bump version to 5.4.7 2024-09-28 11:15:00 +02:00
shagu 67f366dd47 toc: bump version to 5.4.6 2024-08-10 08:23:15 +02:00
shagu c6574adb58 toc: bump version to 5.4.5 2024-05-19 21:52:18 +02:00
shagu 604f455042 toc: bump version to 5.4.4 2024-05-10 10:04:55 +02:00
shagu 23c8f2744a toc: bump version to 5.4.3 2024-05-10 09:43:34 +02:00
shagu dd839f0db9 toc: bump version to 5.4.2 2024-02-26 16:50:57 +01:00
shagu 145f725b36 toc: bump version to 5.4.1 2023-11-26 08:48:43 +01:00
shagu fc361152a1 toc: bump version to 5.4.0 2023-11-03 15:28:49 +01:00
shagu 52fa6572a0 toc: bump version to 5.3.2 2023-07-24 13:14:53 +02:00