librange was a per-frame position scanner: it swept party/raid unit
tokens, cached each one's distance via UnitPosition, and answered range
queries from that cache. All of it existed only because 1.12 had no cheap
way to check an arbitrary unit's distance. ClassicAPI's UnitInRange does
exactly that C-side (fixed 40y healing range, position miss reported via
the second return), so the whole library collapses to a direct call.
Wins from dropping the cache:
- No staleness. The scanner's zone-death and roster-reindex bugs simply
can't exist without a cache to go stale, so this supersedes the
keep-alive fixes from 756e8840.
- All classes get target-frame range fading. The old target path faked a
40y check via IsActionInRange on a healing spell found on the action
bar, so classes without such a spell (GetRangeSlot returned nil) never
had a working target range check.
The rangecheck == "0" master switch used to be enforced by hiding the
scanner; with no scanner, move that gate into pfUI.api.UnitInRange so
disabling the check still means nothing fades. Threshold is now 40y (the
ClassicAPI constant) rather than the old 45y. Drop the now-dead
rangechecki (Range Check Interval) setting, its GUI row, and migration.
Mirror the druid-stealth page switch for priests: swap to the auto page
(8) while in Shadowform, back to the default page when it drops. Driven
by UPDATE_SHAPESHIFT_FORM (form ID 28), which fully covers shadowform on
its own -- no prowl-style stealth substate to chase.
Fold the new state into the existing prowl machinery instead of
duplicating it: prowl/shadowform are mutually exclusive by class, so one
shared `formpaging` flag and one page constant serve both, and the
OnUpdate switch collapses to a single class-gated block.
New module built on ClassicAPI's C_NewItems + BAG_NEW_ITEMS_UPDATED.
Glows bag slots (bags 0-4) holding items acquired since login, keyed on
item GUID so the flag survives rearranging. Hovering an item
acknowledges it (RemoveNewItem); closing the bags clears the rest via
ClearAll. Glow is UI-ActionButton-Border, sized off the slot width so it
tracks the icon_size config.
To stay decoupled from the bag frames, the bag module now broadcasts a
reusable "bag:closed" event through pfUI.events from its OnHide (carrying
the container so subscribers can tell backpack from bank), guarded so the
initial setup Hide() doesn't fire a phantom close.
Config: appearance.bags.newitem + newitem_color, with GUI toggles.
The castbar options were one long list. Break them into four subentries
under the Castbar parent (matching the Settings/Actionbar layout):
General (fonts, colors, texture, disable-blizzard) plus one page each for
Player, Target, and Focus. Drops the now-redundant per-unit header rows.
Adds per-unit (player/target/focus) dropdowns to align the castbar
spell name (left text) and cast timer (right text) Left/Center/Right.
Both share a castbaralign dropdown; defaults preserve current behavior
(name LEFT, timer RIGHT). Applied at castbar creation, so takes effect
on /reload like the other castbar options.
Drop the manual C_Item.GetItemStatDelta rendering (inline annotations
and bottom-block summary) in favor of driving native shopping tooltips
via SetHyperlinkCompareItem — the 3.3.5 flow now available through
ClassicAPI. Way less code, and Blizzard's own comparison rendering
handles all stat types uniformly.
Also revert the mode dropdown back to a single basestats checkbox — the
new implementation doesn't distinguish base vs extended (Blizzard's
tooltip shows everything the item exposes), so the two-level control
was redundant. Existing basestats configs pass through unchanged.
AtlasLootTooltip now goes through the shared HookTooltip helper instead
of a bespoke OnShow shim.
Replace the two-checkbox arrangement (Compare Base Stats + Compare
Extended Stats, with the latter gated on the former) with a single
"Item Comparison" dropdown offering Off / Base / Extended. Migrate
existing configs.
Also route CreateConfig's value-change sites through pfUI.events
("config:changed", category, config) so callers can react to arbitrary
setting changes without frame-specific plumbing. Use it here to grey
out "Always Show Item Comparison" when the mode is Off.
Refactor delta rendering:
- extendedstats on -> all stats (base + extended + DPS + block value)
appended at the bottom via AddDoubleLine
- extendedstats off -> base stats annotated inline; nothing at the bottom
Requires ClassicAPI's 60-line tooltip fix so the bottom block isn't
truncated. DPS and block value were previously extended-only inline
matches — moved into BASE_STAT_KEYS so they also show at the bottom.
Also extract MakeDependent(child, parent) helper from the local
gate-lambda in gui.lua so the base/extended checkbox pairing generalizes.
Replaces the twin-tooltip text extraction/comparison pair
(ExtractAttributes + CompareAttributes) with a single delta pull from
ClassicAPI's C_Item.GetItemStatDelta(equippedLink, newLink).
Base stats (Str/Agi/Sta/Int/Spi/Mana/Health + Armor + resistances) stay
annotated inline on their existing tooltip line: iterate the tooltip's
FontString regions (no more _G["...TextLeft"..i] name lookup), match the
"+N Foo" prefix, look up the trailing noun in a label→key map, append
(+delta)/(-delta) from the ClassicAPI delta table.
Extended stats (attack power / ranged AP / spell damage/healing / crit
ratings / hit ratings / mana regen / defense / DPS) don't emit their own
line — vanilla mixes them into equip-spell descriptions ("Equip:
Increases your critical strike chance by 1%") — so aggregate them into
a "Compared to equipped:" block at the bottom via AddDoubleLine. New
`tooltip.compare.extendedstats` config knob (default 1) gates that
block; it depends on `basestats` being on (its GUI checkbox grays out
otherwise). DPS rounded to one decimal — ClassicAPI derives it from
damage/delay so it lands as a raw float.
Random-suffix bonuses ("of the Bear" etc.) now count correctly since
GetItemStatDelta walks item-record + equip-spell auras + suffix
enchants server-side.
New tooltip.movespeed config knob (default off, checkbox in the GUI's
tooltip page). When on, the unit tooltip gains a "Speed: N%" line where
N is the unit's run speed normalized to vanilla's 7.0 yd/s base — 100
unmounted, 160 on a 60% mount, 200 on epic, less under snares.
Uses runSpeed (return 2 of GetUnitSpeed), not currentSpeed, so the
number reflects what the unit *would* be running at — visible even
while they're standing still. runSpeed is 0 for out-of-range units, so
the line is skipped in that case.
The player frame's "Effective Haste" mode was hardcoded talent-position
scrapes: GetTalentInfo(1, 16) for the Mage "Accelerated Arcana"
(flat 5%) and GetTalentInfo(1, 14) for the Warlock "Rapid Deterioration"
(3% per rank), folded into the displayed haste % via
`(1 / (modCastSpeed * modCastingTime) - 1) * 100`.
That's two problems in one:
- Hardcoded talent indices and effect percentages — brittle to any
Turtle tree reshuffle or retune.
- Conceptually muddled: it folds gear-haste and talent-cast-reduction
into one number that's hard to read as anything specific. The actual
effective cast time is already shown on the cast bar via
C_Spell.UnitCastingInfo (engine helper accounts for SpellMod op 10).
Drop modCastingTime, the LEARNED_SPELL_IN_TAB watcher frame that
maintained it, the per-class talent scrape, and the hasteMode == "2"
display branch. Collapse the now-binary "display_haste" config from a
3-option dropdown to a checkbox. Users on legacy "2" will see the
checkbox unchecked once and can re-enable with a single click.
Hook DoTradeSkill to capture the requested count, then on the first
SPELLCAST_START of an isTradeskill cast stretch endTime to span all
crafts so the player bar fills continuously across the chain. Mid-chain
SPELLCAST_START / SPELL_START_SELF events refresh the "(N)" remaining
label and reset a per-craft spark that crosses the bar once per craft.
SPELL_GO_SELF counts completions; SPELLCAST_STOP no-ops while merged.
Gated by a new C.castbar.player.mergetradeskill knob (default on).
With every external caller of libdebuff:UnitDebuff / :UnitOwnDebuff
now on C_UnitAuras, the two public per-aura readers and the
nameplate-side cache they were feeding have no consumers.
- libs/libdebuff.lua: removes libdebuff:UnitDebuff (~120 lines),
libdebuff:UnitOwnDebuff (~75 lines), the _ownDebuffSortFunc helper,
and the local cache table. The slotOwnership / ownDebuffs /
allAuraCasts / pendingCasts bookkeeping stays — GetBestAuraCast
(libpredict) and GetEnhancedDebuffs (CleveRoids) still read it, and
the event handlers maintain it. GetSlotCaster / GetDebuffSlotMap
stay too; the DEBUFF_ADDED_OTHER handler and the debug printer use
them. File goes 2010 → 1870 lines.
- modules/nameplates.lua: deletes PlateCacheDebuffs (was already
rewritten on C_UnitAuras and unused once the display loop bypassed
the cache), PlateUnitDebuff, the cachedVerify scaffolding, and the
nameplate.UnitDebuff / nameplate.CacheDebuffs registrations.
- api/config.lua + modules/gui.lua: drops the now-defunct
"guessdebuffs" knob — its only effect was gating the dead cache.
Splits the ClassicAPI version check into a hard floor (MIN, manual)
and a soft target (LATEST, pinned by the release workflow). Below MIN
pfUI disables itself entirely as before; between MIN and LATEST it
runs normally but fires a delayed chat nudge after PLAYER_LOGIN with
the available update. PLAYER_LOGIN handlers swap to
EventUtil.ContinueOnPlayerLogin so we don't have to spin a frame for
each branch.
URLs centralize on toc X-Website fields. pfUI.lua factors out
ClassicAPIReleaseUrl(version) sourcing from !!!ClassicAPI's metadata;
modules/gui.lua and libs/libdebuff.lua replace hardcoded
me0wg4ming/pfUI links with GetAddOnMetadata(pfUI.name, "X-Website")
lookups.
release.yml gains a pre-package step that queries ClassicAPI's latest
release tag, packs it (X*10000 + Y*100 + Z), and seds only the LATEST
line in pfUI.lua so the published zip ships with the correct soft
target.
- 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.
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.
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
- Decouple OnValueChanged from OnDataChanged to prevent expensive
full updates on every HP tick
- Replace UnitAffectingCombat(guid) with GetUnitField(flags) bitcheck
and add 0.2s per-GUID throttle cache for GetCombatStateColor
- Gate HP bar SetMinMaxValues/SetValue and text formatting behind
hp/hpmax change detection
- Inline castbar update into per-plate OnUpdate loop, remove dedicated
castbarFrame overhead
- Switch debuff slot cache from name-keyed to slot-index-keyed to fix
timer reset bug when debuffs shift after expiry
- Add raidGuidCache (rebuilt on RAID_ROSTER_UPDATE/PARTY_MEMBERS_CHANGED)
for O(1) offtank target-name lookup
- Add UNIT_FLAGS_GUID event support for instant combat flag notification
(Nampower)
- Extract RebuildOfftanks() to ensure offtanks table is populated at
startup, not only on config change
- Reuse childs table across scan ticks to reduce GC pressure
- Add zoominstant config option to skip zoom animation
- Add combatColorCache cleanup on plate hide and combat leave
Please report any bugs that appear after this change, since it is a huge change.
Added Range Check Mode dropdown (Vanilla / UnitXP) and UnitXP Range Threshold input field under the 40y-Range Check settings in the GUI
In UnitXP mode, UnitInRange bypasses librange entirely and queries UnitXP("distanceBetween") directly with the configured yard threshold
librange scan loop is disabled when UnitXP mode is active — no TargetUnit cycling, no spellbook scanning, no combat interruption
Fixed UnitInRange referencing librange as an undefined local instead of pfUI.api.librange, which caused silent nil returns