639 Commits

Author SHA1 Message Date
Brues e5c51fff48 eqcompare: rewrite on top of ClassicAPI SetHyperlinkCompareItem
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.
2026-07-03 02:10:20 -05:00
Brues 6570afb70a eqcompare: collapse basestats/extendedstats checkboxes into a mode dropdown
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.
2026-07-02 03:05:56 -05:00
Brues 64c62a2a25 eqcompare: hook Set* via hooksecurefunc + unify base/extended stat block
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.
2026-07-02 01:22:10 -05:00
Brues dfbeeb454a eqcompare: use C_Item.GetItemStatDelta for the comparison math
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.
2026-07-01 17:03:32 -05:00
Brues 65678da3d2 tooltip: optional movement-speed line via GetUnitSpeed
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.
2026-06-27 19:28:40 -05:00
Brues c3829c2bd2 player: drop talent-side modCastingTime fudge from haste display
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.
2026-06-27 19:13:49 -05:00
Brues e0bcbbf2dc castbar: Quartz-style tradeskill merge with per-craft spark
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).
2026-06-26 18:43:31 -05:00
Brues be6ae25315 libdebuff/nameplates: drop dead per-aura readers and debuff cache
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.
2026-06-24 22:41:36 -05:00
Brues fd21b24a74 utilize C_UnitAuras for nameplate auras 2026-06-24 19:14:36 -05:00
Brues ff98dde670 classicapi: two-tier version check + drop hardcoded github URLs
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.
2026-06-22 15:06:04 -05:00
Brues 50d06f2e7a nameplates: cachedGuid + percent-mode guard + name text position
- 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.
2026-06-16 19:53:52 -05:00
Brues 671939fe9e add auto sort on open feature - disabled by default 2026-05-30 00:31:47 -05:00
Brues 07377ad92e rep remaining label 2026-05-29 21:30:43 -05:00
Brues 6af7da55d6 Reputation Frame: Enhance faction standing bars 2026-05-29 18:49:38 -05:00
Brues ed5ecb1f93 character: durability % per inventory slot
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.
2026-05-29 18:31:58 -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
Meow 9128f02133 Add fill order option for actionbars
- "Row-first" fills buttons left-to-right, top-to-bottom (1,2,3 / 4,5,6)
- "Column-first" fills top-to-bottom, left-to-right (1,3,5 / 2,4,6)
- "Auto" preserves the original behavior based on uneven orientation
2026-04-10 16:33:06 +02:00
Meow 5f9e69933f Revert "Added a fillmode variant to actionbars"
This reverts commit 0838c6ec3a.
2026-04-10 15:26:18 +02:00
Meow 0838c6ec3a Added a fillmode variant to actionbars 2026-04-10 15:24:39 +02:00
Meow 136aca02c5 Performance update for nameplates: optimize update loop, combat detection and debuff rendering
- 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.
2026-04-02 04:15:18 +02:00
Meow 1f72b93ea5 New feature for "Buff" > "Target Debuff Bar"
"Target Debuff Bar" should now correctly show only own debuffs (there will be still debuffs that are not shown up properly like AOE spells or procs)
2026-03-31 07:11:48 +02:00
Meow 491fcd51c8 New option to pick Original or pfui raid marks! 2026-03-31 02:20:53 +02:00
Meow e66062c3b6 pull request modification from @Doite for actionbar 2026-03-31 01:12:10 +02:00
Meow 3ecc52e4cc Revert "Fix for bar layout+alternatives+uneven orientation" 2026-03-30 18:53:48 +02:00
Meow 8ad254c01e Merge pull request #126 from florian-gustin/master
Maul Swing color timer
2026-03-30 17:04:21 +02:00
Player-Doite c29b69d469 Added and fixed form layout+ uneven orientation
Stance/Form/Aura bar layout fix (before wrong), plus support for uneven rows.
2026-03-26 19:06:25 +01:00
florian-gustin c777e3eaba Merge pull request #1 from me0wg4ming/master
Merging from official
2026-03-25 18:38:56 +01:00
Meow c746f391d0 forced reload for spellpower display 2026-03-24 14:31:26 +01:00
Meow bfe18170bf Revert "force reload for sp settings"
This reverts commit fcae37f9b0.
2026-03-24 13:36:03 +01:00
Meow fcae37f9b0 force reload for sp settings 2026-03-24 13:35:19 +01:00
FLORIAN GUSTIN fc73812baa adding maul queue 2026-03-24 02:37:08 +01:00
Meow 1e3c260e52 pull request merge
https://github.com/me0wg4ming/pfUI/pull/118
2026-03-23 11:37:31 +01:00
Meow 415e3b7a29 added missing nil check 2026-03-22 01:02:42 +01:00
Meow ad98484aa3 changed target/casting to Target now, we have new casting plates. 2026-03-21 08:12:01 +01:00
Meow a7bfff5d33 Added new throttle option for nameplate castbar 2026-03-21 08:05:45 +01:00
Meow 74a92dae07 fixed offsets not updating while being edited. 2026-03-19 08:54:46 +01:00
Meow c0bd8cb4cf swingtimer update 2026-03-04 22:40:08 +01:00
Meow fef9f1a515 show attack speed 2026-03-04 19:21:34 +01:00
Meow fa7e4f8b40 Range Check: UnitXP mode
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
2026-03-04 02:27:11 +01:00
Meow 36ff524af1 unitxp update
- Added a range indicator for target frame (no, there won't be additionally one for group, raid and focus... why? performance reasons...)
2026-03-04 01:55:18 +01:00
Meow f7d177d135 Revert "Add skin for StatCompare and fix BetterCharacterStats" 2026-03-01 07:41:57 +01:00
Meow 544eea9d74 Merge pull request #80 from K0lonel/master
Add skin for StatCompare and fix BetterCharacterStats

Pullrequest by: K0lonel
2026-03-01 02:29:11 +01:00
Meow b0f6984f22 Revert "Merge pull request #78 from me0wg4ming/revert-77-sp-haste-display"
This reverts commit 791feed6d0, reversing
changes made to 054149f0e2.
2026-03-01 02:13:25 +01:00
Kolonel 4fa94ef0b1 Add StatCompare configuration option 2026-03-01 02:27:36 +02:00
Meow 30d36a5af1 Revert "add optional sp/haste display to player frame" 2026-02-28 22:44:49 +01:00
pepopo978 3373751884 add optional sp/haste display to player frame 2026-02-28 12:41:34 -08:00
Meow bd36d91189 added option to show debuffs only for enemys OR friendly nameplates
added option to show debuffs only for enemys OR friendly nameplates
2026-02-28 21:32:17 +01:00
Meow 04a2413d72 renamed raidmers to marktracking for clarity
renamed raidmers to marktracking for clarity
2026-02-24 18:20:11 +01:00
Meow 236a2fce6c perf/fix: port experimental optimizations + focus rework + raidmarkers
Performance optimizations ported from experimental:
- libdebuff: replace 5s startup timer with next-frame defer
- libdebuff: use arg6 auraSlot directly (Nampower 2.29+) instead of GetDebuffSlotMap lookup
- libdebuff: invalidate slotMapCache on PLAYER_TARGET_CHANGED
- nameplates: detect Nampower 2.27.2+ for GUID-based nameplate lookup

Raidmarkers module ported from experimental:
- added raidmarkers.lua
- added config defaults and GUI section
- registered in modules.xml

focus.lua rework:
- removed CastSpellByNameNoQueue (Nampower's CastSpellByName now supports unit tokens/GUIDs natively)
- /focus Name: TargetByName with correct previous target restore + ClearTarget() fallback
- /focus Name: prefix match via SlashCmdList.TARGET when exact match fails
- suppress UI_ERROR_MESSAGE during targeting attempts

swingtimer fixes:
- non-Hunter ranged bar now fills left->right like MH/OH
- fix 1px artifact on Hunter bar center by using Hide() instead of SetWidth(0.1)
2026-02-22 19:08:37 +01:00
Meow 6f28fb3730 Added warn color for hunters ranged swing timers (hunters only)
Added warn color for hunters ranged swing timers (hunters only)
2026-02-20 16:01:01 +01:00