Tidy up for 0.9.3: Shagu overlap warning, readme rewrite
- Warn once in chat when ShaguTweaks Debuff Timer draws on target debuffs. - Use STANDARD_TEXT_FONT for timers and stack counts. - Clean up comments and dead code; add .gitattributes and .gitignore. - Rewrite README (ClassicAPI version table, ShaguTweaks compatibility); move history to CHANGELOG.md. - Tests: 19 scenarios, no machine-specific paths. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019W3rwutyoLNHxXPycYWSMc
This commit is contained in:
@@ -1,71 +1,72 @@
|
||||
# TargetFrameBuff v0.9.2
|
||||
# TargetFrameBuff
|
||||
|
||||
Shows up to 32 upper-row icons and 16 lower-row debuffs on the default target frame.
|
||||
The existing 5-11-11-5 buff layout and 4-4-8 debuff layout are preserved.
|
||||
With ClassicAPI, harmful auras beyond the first 16 use available upper-row icons.
|
||||
Shows up to **32 buffs** and **16 debuffs** on the default target frame of a
|
||||
1.12 client (tested target: Turtle WoW 1.18.1). Buffs sit above the frame in
|
||||
rows of 5-11-11-5, debuffs below it in rows of 4-4-8.
|
||||
|
||||
With the optional [ClassicAPI](https://github.com/brues-code/ClassicAPI) client
|
||||
mod it also adds countdown text, stack counts, debuff-type borders, a gold
|
||||
border on enemy buffs you can remove, optional cooldown sweeps, and accurate
|
||||
tooltips. Without ClassicAPI it behaves like the original: more icons, no timers.
|
||||
|
||||
## Installation
|
||||
|
||||
Back up your existing TargetFrameBuff folder, then replace it with the TargetFrameBuff
|
||||
folder from the ZIP under Interface/AddOns. Restart the client or reload the UI.
|
||||
ClassicAPI is optional; version 1.17.3 was reviewed for this update.
|
||||
For working reverse sweeps and edges, use ClassicAPI 1.17.1 or newer.
|
||||
1. Copy the `TargetFrameBuff` folder into `Interface/AddOns`, replacing any older copy.
|
||||
2. Restart the client (or `/reload`).
|
||||
3. Optional: install ClassicAPI.
|
||||
|
||||
## Changes in v0.9.2
|
||||
## ClassicAPI
|
||||
|
||||
- ClassicAPI 1.17.10+: use UNIT_AURA_DELTA for applications, removals, stack changes
|
||||
and timing-only refreshes; no periodic aura polling on this path. Rebuild the
|
||||
displayed snapshot to preserve filtered ordering and tooltip index alignment.
|
||||
- Older ClassicAPI retains the 0.5-second fallback below.
|
||||
- Hide native cooldown numbers on our sweeps to prevent duplicate text when
|
||||
countdownForCooldowns is enabled; retain TargetFrameBuff's text controls.
|
||||
- Disable the sweep expiration flash and clear removed/disabled sweeps where supported.
|
||||
- Spellbook and player-pet changes refresh capability-dependent aura presentation.
|
||||
| Version | What you get |
|
||||
| --- | --- |
|
||||
| none | 32 buffs and 16 debuffs, no timers, borders or sweeps |
|
||||
| 1.17.x | Timers, stack counts, borders; auras are re-read every 0.5 s |
|
||||
| 1.17.10+ | Event-driven updates (`UNIT_AURA_DELTA`), no polling |
|
||||
| 1.17.11+ | **Recommended.** Fixes the reverse sweep briefly showing a bright icon just before an aura ends |
|
||||
|
||||
## Earlier changes (v0.9.1)
|
||||
|
||||
- Refresh auras on target changes and target aura events, with a 0.5-second fallback.
|
||||
- Update only active countdowns every 0.2 seconds using cached expiration; stop
|
||||
countdown work when none remain. Silent timing changes can take up to 0.5 seconds to appear.
|
||||
- Use GetAuraSlots with reusable buffers and UnitAuraBySlot where available; retain
|
||||
the positional UnitAura fallback for older ClassicAPI. Slot IDs never survive a scan.
|
||||
- Display stack counts for upper-row buffs and overflow debuffs, with debuff-type borders.
|
||||
- Gold borders identify enemy buffs ClassicAPI says you or your pet can remove.
|
||||
- Optional reverse cooldown sweeps; countdown and stack text draw above the sweep.
|
||||
- Saved settings, a ClassicAPI AddOn Options panel, and vanilla-compatible slash commands.
|
||||
- Guard against an aura disappearing immediately before its tooltip opens.
|
||||
Harmful auras beyond the first 16 use free buff-row slots. ClassicAPI decides
|
||||
aura order and lists your own auras first.
|
||||
|
||||
## Settings
|
||||
|
||||
Run /tfb to open AddOn Options when available, or show command help otherwise.
|
||||
`/tfb` opens the AddOn Options panel (or prints help if the client has none).
|
||||
|
||||
| Command | Action |
|
||||
| --- | --- |
|
||||
| /tfb timers on or off | Toggle countdown text (default on) |
|
||||
| /tfb highlight on or off | Toggle removable-buff borders (default on) |
|
||||
| /tfb sweeps on or off | Toggle cooldown sweeps (default off) |
|
||||
| /tfb size 6-20 | Set countdown font size (default 9) |
|
||||
| /tfb warning 0-30 | Seconds remaining at which text turns red (default 5) |
|
||||
| /tfb reset | Restore defaults |
|
||||
| Command | Action | Default |
|
||||
| --- | --- | --- |
|
||||
| `/tfb timers [on\|off]` | Countdown text | on |
|
||||
| `/tfb highlight [on\|off]` | Gold border on removable enemy buffs | on |
|
||||
| `/tfb sweeps [on\|off]` | Reverse cooldown sweeps | off |
|
||||
| `/tfb size 6-20` | Countdown font size | 9 |
|
||||
| `/tfb warning 0-30` | Seconds left at which text turns red | 5 |
|
||||
| `/tfb reset` | Restore defaults | |
|
||||
|
||||
Without ClassicAPI the original native aura display remains available without timers,
|
||||
highlighting or sweeps. Settings are retained for use when ClassicAPI is installed.
|
||||
Settings are saved and kept even while ClassicAPI is absent.
|
||||
|
||||
## Timing limitations
|
||||
## Compatibility with ShaguTweaks
|
||||
|
||||
ClassicAPI timings are best-effort. Unobserved applications and certain max-stack
|
||||
refreshes can have unknown expiration. Unknown or expired timers hide their text
|
||||
and sweep; the icon stays visible while the aura remains listed by the API.
|
||||
ClassicAPI controls aura ordering and puts your own auras first.
|
||||
Checked against the upstream [ShaguTweaks](https://github.com/shagu/ShaguTweaks) source.
|
||||
|
||||
## Validation
|
||||
| ShaguTweaks option | Effect | What to do |
|
||||
| --- | --- | --- |
|
||||
| **Unit Frames > Debuff Timer** | Conflict. Adds its own timer text, sweep and green stack count to debuffs 1-16, on top of ours. It ignores overflow debuffs in the buff row. | Disable it. TargetFrameBuff prints a warning in chat if it detects it. Alternatively use `/tfb timers off` and `/tfb sweeps off`. |
|
||||
| Cooldown Numbers | No conflict found. It only hooks `CooldownFrame_SetTimer`; our sweeps use `SetCooldown`. | Keep. |
|
||||
| Dark UI Elements | Adds a dark border to every `TargetFrameBuff*` button. Ours draws above it, so the gold removable-buff border should stay visible. | Not verified in-game. |
|
||||
| Target Castbar | Positions the castbar from debuff 7 and 11 being shown. With the 4-4-8 layout it can sit over the second and third debuff rows. | Disable it or move the castbar if it overlaps. |
|
||||
| Move Unit Frames | Buff and debuff buttons are children of `TargetFrame`, so they follow it. | Keep. |
|
||||
|
||||
17 automated scenarios passed using Lua 5.1 with a simulated WoW API; XML parses.
|
||||
This is not a live WoW 1.12/1.18.1 test or an exact Lua 5.0 runtime test.
|
||||
See VALIDATION.md for remaining in-game checks.
|
||||
## Notes
|
||||
|
||||
Based on https://wow.curseforge.com/projects/project-949
|
||||
Original author: lua@lumpn.de (modified).
|
||||
- Timings from ClassicAPI are best effort. Unobserved applications and some
|
||||
max-stack refreshes have unknown expiration; their timer and sweep stay hidden
|
||||
while the icon remains.
|
||||
- This is not a live WoW test. See [VALIDATION.md](VALIDATION.md) for what was
|
||||
simulated and what to check in-game, and [CHANGELOG.md](CHANGELOG.md) for history.
|
||||
|
||||
## Development
|
||||
|
||||
Disable ShaguTweaks Unit Frames > Debuff Timer to prevent duplicate countdown text.
|
||||
Tests simulate the WoW API under Lua 5.1: `pip install lupa`, then `python3 tests/test_addon.py`.
|
||||
|
||||
## Credits
|
||||
|
||||
Based on [project-949](https://wow.curseforge.com/projects/project-949).
|
||||
Original author lua@lumpn.de; modified.
|
||||
|
||||
Reference in New Issue
Block a user