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".
The per-unit cache reset only fired when the plate's name changed, so
pool reuse between same-named units (player "Ironforge Guard" → NPC
"Ironforge Guard") carried the previous unit's cache.player into the
next OnDataChanged call. GetUnitInfo then returned the wrong table's
class, unittype flipped to FRIENDLY_PLAYER, and the bar drew in MAGE
class color. Gate the reset on cachedGuid changes too.
Stores cache.player as true/false/nil instead of "PLAYER"/"NPC" so it
flows straight into GetUnitInfo as the isPlayer hint — both in
OnDataChanged and the wait_for_scan retry, which previously dropped
the hint and ping-ponged the flag every frame.
Hoists the name-change reset above the GetUnitInfo lookup and folds the
two UnitIsPlayer call sites into one. The earlier shape resolved
cache.player upfront from cachedGuid, then redundantly re-resolved from
unitstr after the name-change reset — and the upfront block could read
stale cache.player on plate reassignment, passing a wrong isPlayer hint
to GetUnitInfo.
GetUnitInfo() probed the players table first, so an NPC sharing a name
with a known player (e.g. Chromie) inherited the player's class, level,
and guild. Adds an isPlayer hint to GetUnitInfo and resolves each
plate's actual unit type from its cached GUID via UnitIsPlayer before
the lookup. The plate's cache.player gates further work.
Routes player and nameplate castbar progress through
PixelUtil.SetStatusBarValue so a 1.4s cast on a narrow bar no longer
shimmers across fractional pixels as it ticks. Adds GetMinMaxValues /
GetValue handlers to pfUI's custom StatusBar so PixelUtil can read the
current range.
ClassicAPI's SlashCommandsRegistry now owns the canonical /focus and
/clearfocus commands (matching modern Blizzard's no-alias convention
and delegating to the engine's FocusUnit / ClearFocus polyfills).
pfUI no longer needs to register them.
The TargetByName-based name-resolution workflow that the old
SlashCmdList.PFFOCUS provided ("/focus Hogger" → swap-target, capture
focus) doesn't fit the modern /focus contract, which only takes unit
tokens. Move that behavior into a separate /focusname (alias
/pffocusname) so users who relied on typed names still have a path —
just under a different command name.
In ButtonMacroScan, when SuperCleveRoidMacros manages the slot
(CleveRoids.IsManagedAction), leave spellslot/booktype unset and return
early. This lets the button's icon, cooldown, and tooltip flow through
the addon's hooked GetActionTexture / GetActionCooldown /
GameTooltip:SetAction so they follow the active conditional dynamically,
instead of being frozen to the first statically-scanned spell.
Six allocation sites firing per visible plate per central tick (or per
throttled OnDataChanged tick) were generating heavy GC pressure visible
in pfDebug's analyzer:
- IterDebuffs callback in PlateCacheDebuffs was a fresh closure per call.
Hoisted to a module-level function with state in _pcdSelf / _pcdNow /
_pcdId, matching the pattern the icon-grid IterDebuffs already used.
- string.format("%.2f", remaining) in UpdateCastbar fired every frame per
active castbar. Factored into SetCastbarText helper that compares a
rounded integer (centi- or deci-seconds) and only formats + SetTexts
when the displayed value would actually change. lastTextTick reset
alongside lastEndTime so back-to-back casts don't collide.
- guid.."target" concat in GetCombatStateColor hit Lua's string intern
pool every call. Cached in guidTargetTokenCache, evicted alongside
the other per-guid caches in NAME_PLATE_UNIT_REMOVED.
- plate.name:SetText was unconditional; moved inside the existing
plate.cache.name change gate so it only fires on real unit changes.
- plate.level:SetText (string.format) was unconditional; gated behind a
new (level, elite) cache so the format only runs on level-up or
elite-state flips.
- C_NamePlate.GetNamePlates() poll every 0.5s allocated a fresh Lua
table just to read its length. Replaced with a visiblePlateCount
counter maintained event-driven from NAME_PLATE_UNIT_ADDED/_REMOVED.
- Switch the four GUID reads in OnDataChanged from plate.parent:GetName(1)
(SuperWoW idiom) to plate.cachedGuid (set by NAME_PLATE_UNIT_ADDED via
UnitGUID(token)). Move the initial OnDataChanged call out of
OnConfigChange's CREATE path so it runs after UNIT_ADDED has populated
cachedGuid; re-add it explicitly in the user-config-change loop.
- Reject GetUnitField's health/maxHealth when maxHealth == 100 — the
engine writes (hp_percent, 100) into UnitFields for non-detailed units
(UPDATE_PARTIAL packets carry percent only). Without this guard,
Nampower's raw field read returns the percent and the nameplate displays
"5 / 100" as if it were real HP. Mirrors libhealth's heuristic so we
fall through to its estimator instead.
- New config: nametextpos (LEFT/CENTER/RIGHT, defaults to CENTER).
Decouple the bar's anchor from the name so the name's JustifyH can
shift left/right without dragging the bar with it.
Replaces the SelectQuestLogEntry-based scrape (1..50 quest indices, save/
restore log selection, per-quest GetQuestLogQuestText + GetNumQuestLeaderBoards
+ GetQuestLogLeaderBoard, string-blob with _obj_req_ markers, substring-by-
name match in AddTooltip) with a single C_QuestLog.GetQuestIDForLogIndex +
C_QuestLog.GetQuestDetails round-trip per quest.
Build an itemID-keyed { index, count } map up front and look up directly
in AddTooltip. Fixes false matches where an item name happens to substring-
match unrelated quest text.
* equipmentmanager
* use BAG_UPDATE_DELAYED
* CharacterFrame.backdrop doesn't on creation so check onShow
* adjust button positioning
* Show Equipment Set tooltip
* fix icon select scrolling issue
* Equip Set on double click
* slot tooltips: use location-aware GameTooltip methods
Branch on EquipmentManager_GetLocationData: SetBagItem for bagged items,
SetInventoryItem for equipped, fall back to SetInventoryItemByID for
missing or unresolved entries. Surfaces durability/charges/enchants in
the tooltip when the item is reachable.
Also cache C_EquipmentSet.GetItemLocations once per Refresh and store
it on each slot button instead of re-fetching inside the missing-item
border branch.
* purg esome comments
* use GameTooltip_Hide from !!!classicapi
* moved flyout to character frame
* ignore item icon shows on item slots now
* defer ignored-slot toggles until Save
Toggling a slot's ignored state in the flyout no longer immediately
calls SaveEquipmentSet. Instead the change is recorded in a per-set
pendingIgnoredToggles table; the overlay reflects the effective
state (persisted XOR pending) so the user sees the visual change
right away, and Save commits the toggles by replaying them into
ClassicAPI's session ignored list before SaveEquipmentSet.
Pending toggles clear on Save (committed) and on set deletion.
* overhaul icon picker
* fixed width
* fixed issue where selected icon got cleared out
* correct flyout button order
* backport more equipment manager icons
* refactor window
* fixed gear menu
* remove set cap
* bump minimum classicapi version
* bump minimum version to 1.3.3
* row menu: close on outside click
GLOBAL_MOUSE_DOWN fires regardless of which frame absorbs the click
and (unlike a veil frame) doesn't consume the original event, so
clicking another row's gear closes the old menu and opens the new
one in a single click. The gear's own OnClick handles the same-row
toggle close, since GLOBAL_MOUSE_DOWN's anchorBtn check excludes it.
Bumps minimum ClassicAPI to 1.3.4 for GLOBAL_MOUSE_DOWN /
IsMouseButtonDown.
* use pfUI.path
* comment cleanup
* bump min classicapi version
---------
Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>
Adds a Fizzle-style durability label to each character pane slot.
Renders at the bottom of the slot icon as "N%" colored by the existing
DURABILITY_THRESHOLD_COLORS table (red < orange < yellow < invasion <
green), or hidden when the item has no durability stat (necks, rings,
trinkets) or the slot is empty.
api/api.lua: new pfUI.api.CreateFontString(f, key, layer, size, flags,
font) helper following the CreateBackdrop pattern — idempotent
get-or-create that attaches the FontString to the parent frame as the
named field. Defaults to pfUI.font_default at C.global.font_size with
OUTLINE on the OVERLAY layer.
skins/blizzard/character.lua: scoreText migrated from the inline
"if not frame.scoreText then ..." block to the new helper as a working
example; new durabilityText created the same way at BOTTOM/size 10.
Durability render added to RefreshCharacterSlot — runs on every
PaperDollItemSlotButton_Update so equip/unequip/repair/damage all
refresh automatically.
api/config.lua + modules/gui.lua: new C.character.inventory.durability
toggle (default "1"). GUI lives under a new top-level "Character" tab
→ "Inventory" sub-tab, leaving room for future "Reputation" / "Skills"
sub-tabs at the same level.
pfUI's built-in sorter (modules/bags.lua) always creates the sort
buttons on the right/left bag frames now, so the third-party
RegisterBagSort path's "if not pfUI.bag.right.sort" guard would skip
button-creation entirely — yet still set pfUI.thirdparty.bagsort to
the registering addon's name. Net effect: user installed SortBags or
MrPlow, our internal sort runs anyway. Silent override of user intent.
Strip the dead button-creation paths; rebind the existing buttons'
OnClick + OnEnter to the registered third-party functions instead.
Third-party addons now actually fire when the user clicks. -53 lines.
Inline the bag sorter from Bagnon/lib/BagSort.lua — two-pointer stack
consolidation, then a category-then-name sort with poor (gray) items
placed back-to-front so they sit at the end of the last bag. Sort
buttons land in the existing button row on both the bag (right) and
bank (left) frames.
Fixes a destructuring mismatch in the port: pfUI's compat/vanilla.lua
shims GetItemInfo to the modern 10-field return signature (inserts nil
for itemLevel between quality and minlevel), so itype/subtype sit at
positions 6/7 — not 5/6 like the Bagnon original assumes against raw
vanilla. Without the extra placeholder every item fell through to the
"non-gear by quality" bucket.
* focus: migrate to FocusUnit / "focus" token / PLAYER_FOCUS_CHANGED
ClassicAPI now polyfills modern WoW's focus system: FocusUnit / ClearFocus
+ "focus" / "focustarget" unit tokens accepted by every UnitX function +
PLAYER_FOCUS_CHANGED event. Drop pfUI's GUID-juggling pseudo-frame.
- env/tables.lua: add "focus" and "focustarget" to pfValidUnits — the
focus frames now follow the standard event-driven CreateUnitFrame path
with f.label = "focus"
- modules/focus.lua: rewrite. Slash commands use FocusUnit / ClearFocus
directly; no more manual frame.label/unitname/id manipulation. /focus
<name> still does a target-swap to resolve names → units, then
FocusUnit("target") captures the GUID before the target is restored.
PLAYER_FOCUS_CHANGED triggers immediate frame refresh on assign/clear.
- api/unitframes.lua: delete the pseudo-focus block (per-tick "scan all
units for matching name" loop) and the "focus"/"focustarget" special-
case in the visibility branch — "focus" is now a real token.
- modules/castbar.lua: bind the focus castbar to unitstr = "focus" once;
drop the OnUpdate that synced pfUI.castbar.focus from
pfUI.uf.focus.label/unitname. UnitGUID("focus") resolves at read time.
- Drop C_Minimap.SetFocusByGUID / SetFocusByName / ClearFocus calls —
C_Minimap subscribes to PLAYER_FOCUS_CHANGED on its own.
Net -183 lines. Focus stops being a pfUI-special pseudo-frame and
becomes "just another unit token" — same treatment as target/player.
* add nameplate to valid units
---------
Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>
* nameplates: drive discovery + GUID lookup via C_NamePlate
ClassicAPI now provides the modern C_NamePlate API and the matching
NAME_PLATE_CREATED / NAME_PLATE_UNIT_ADDED / NAME_PLATE_UNIT_REMOVED
events. Replace the WorldFrame:GetChildren polling + manual GUID
dictionary with event-driven plumbing.
- Drop the per-tick WorldFrame:GetNumChildren / GetChildren scan
- Delete IsNamePlate() border-texture filter (events only deliver
nameplate frames)
- Delete the guidRegistry table + its OnShow/OnUpdate maintenance;
every lookup now goes through C_NamePlate.GetNamePlateForGUID
- Move per-GUID cache cleanup (debuffCache / threatMemory /
combatColorCache / libdebuff_casts) from the OnUpdate visibility
scan to a NAME_PLATE_UNIT_REMOVED handler — fires exactly once
per unit going out of range
- NAME_PLATE_CREATED drives nameplates.OnCreate; NAME_PLATE_UNIT_ADDED
sets cachedGuid and drives nameplates.OnShow (so OnCreate no longer
calls OnShow directly and no longer HookScripts the parent)
- visiblePlateCount uses table.getn(C_NamePlate.GetNamePlates())
Net -64 lines, with a meaningful reduction in per-tick CPU (no more
WorldFrame child iteration + region/texture filter every 50ms).
* nameplates: switch UNIT_ADDED/REMOVED handlers to nameplateN tokens
ClassicAPI's NAME_PLATE_UNIT_ADDED / _REMOVED events now ship the
"nameplateN" unit token as arg1 (matching modern WoW) instead of the
GUID string.
- UNIT_ADDED: resolve plate via C_NamePlate.GetNamePlateForUnit(arg1);
derive the cache-key GUID via UnitGUID(arg1)
- UNIT_REMOVED: same lookup pattern; compute UnitGUID(arg1) inside the
handler before the slot recycles (per docs guarantee)
The other six GetNamePlateForGUID call sites (libdebuff aura callbacks,
UNIT_FLAGS_GUID, PLAYER_TARGET_CHANGED, combo-point handler, castbar
frame) stay on the GUID flavor — they receive real GUIDs from other
event paths.
---------
Co-authored-by: Brues <5278969+brues-code@users.noreply.github.com>
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
Per-hour numbers are too coarse to feel actionable while watching a
tent fill — switching to /min so the displayed rate updates in a more
useful range for the actual sampling cadence.
The data frame now subscribes to UPDATE_EXHAUSTION and stores a sliding
5-minute window of (time, exhaustion) samples. The XP tooltip uses the
first/last samples in the window to compute rest gain per hour, and
projects time to reach UnitXPMax * 1.5 at the current rate.
Useful for Turtle WoW's tent mechanic — when you stand under a tent
you accumulate rested XP at an accelerated rate, and now you can see
how long until you cap.
Samples reset on PLAYER_ENTERING_WORLD (zone change can change the
gain rate) and PLAYER_LEVEL_UP (Blizzard rescales exhaustion
proportionally on level-up so prior samples no longer describe the
same gain curve).
The rate/time lines only appear when there are at least 2 samples in
the window and the gain is positive — so they stay hidden when not
actively gaining rested XP.