37 Commits

Author SHA1 Message Date
Brues 6e7361c543 Removed redundant compare.basestats setting
Just disable the module if you don't want stat comparison
2026-07-11 12:43:15 -05:00
Brues 13a08b0ea3 Restore hooksecurefunc 2026-07-09 23:01:52 -05:00
Brues 31c95606d0 Refactor turtle/Nampower checks and libdebuff cleanup
Replace ad-hoc Turtle/Nampower detection with global TURTLE_WOW_VERSION and EventUtil startup flow. Remove legacy IsTurtleWoW and manual PLAYER_ENTERING_WORLD frame; use EventUtil.ContinueOnPlayerLogin. Clean up libdebuff by removing combo-point capture, GetEnhancedDebuffs API, and noisy startup messages; rely on Nampower/AURA_CAST and database fallback for durations. Fix tooltip compare shift handling (cache shift state and pass through). Update xpbar to use TURTLE_WOW_VERSION. Purpose: simplify startup, avoid duplicated logic, and rely on modern APIs for accurate durations.
2026-07-05 23:47:39 -05:00
Brues 3fe072c594 Route hooksecurefunc callers through pfUI.hooksecurefunc; global belongs to ClassicAPI
pfUI's Lua hooksecurefunc lived in pfUI.env and shadowed ClassicAPI's C
global for all pfUI code. Replace it with a thin pfUI.hooksecurefunc shim
that keeps the missing-target no-op our call sites rely on (ClassicAPI
errors on a nil target) and delegates the actual hook to _G.hooksecurefunc.

Migrated all 70 internal call sites (modules/libs/skins) to
pfUI.hooksecurefunc; bare hooksecurefunc now resolves to ClassicAPI's C
version everywhere. Dropped the unused prepend path and the orphaned
pfUI.hooks table.
2026-07-05 14:58:26 -05:00
Brues a17229abb1 GetLootSlotItemLink should be GetLootSlotLink 2026-07-04 13:12:40 -05:00
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 0f97e8b0bd eqcompare: skip paperdoll owners in showalways mode
Comparing an equipped slot's tooltip against itself is pointless — every
delta is zero. Skip that case when `showalways=1`. Shift-hover still
forces the comparison unconditionally.
2026-07-02 01:50:48 -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 439d5a397a eqcompare: numeric InventoryType lookup, drop bagtypes/itemtypes locales
Both sub-tables carried per-locale strings only so pfUI's own code could
match against localized text. ClassicAPI's numeric item APIs replace
both:

- GetBagFamily now reads classID/subClassID from C_Item.GetItemInfoInstant
  and switches on the numbers (class 1 = Container, class 11 = Quiver).
- eqcompare pulls the itemID from GameTooltip:GetItem(), fetches the
  numeric invType via C_Item.GetItemInventoryTypeByID, and looks up the
  destination slot(s) in a numeric slotTable keyed by Enum.InventoryType.
  Pair-slot invtypes (finger / trinket / one-hand weapon) list both
  destinations directly, so the "_other" string-concat hack is gone.

Removes the setglobal INVTYPE_* injection, the tooltip text scan, and
the itemtypes + bagtypes locale sub-tables across all 7 files.
2026-07-01 15:43:03 -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
shagu f6b63e676d eqcompare: precache tooltip side table 2025-04-20 14:15:51 +02:00
shagu 879107f87d eqcompare: enable wrap text flag for each line 2025-04-06 15:01:55 +02:00
shagu 9bf9eb2bf5 eqcompare: show currently equipped header 2025-03-18 18:43:40 +01:00
shagu c74170f053 eqcompare: check for tooltip text before using it 2022-01-20 10:37:16 +01:00
shagu 7669e64173 core: remove leftover semicolons 2020-08-15 19:29:24 +02:00
shagu 3334c7469f modules: make all modules aware of the new borders 2019-12-18 18:54:09 +01:00
shagu e9237b59b2 core: use concrete string based client checks 2019-06-10 17:06:31 +02:00
Road-block 755eb617ec eqcompare: prevent an error on missing target stat 2018-11-02 09:56:52 +01:00
shagu 5dfe5a4899 compat: initial layout of client abstraction api 2018-11-01 14:55:29 +01:00
shagu 9fa7efa4ad eqcompare: round comparison values 2018-08-15 23:21:17 +02:00
shagu 44a4aa522c eqcompare: add proper support for atlasloot 2018-08-08 18:48:26 +02:00
shagu aec86c843b eqcompare: fix bad formatting 2018-08-06 23:37:10 +02:00
shagu 7f65c4115e eqcompare: reduce memory load of item comparison 2018-08-05 21:36:42 +02:00
shagu 6c15e3c723 eqcompare: make sure the GetText() returns a value 2018-07-30 23:55:59 +02:00
shagu 0c1f876c56 eqcompare: don't add attribute comparison twice 2018-07-07 16:28:02 +02:00
shagu a153dcbb45 eqcompare: add option to disable base-stat compare 2018-07-07 04:42:28 +02:00
shagu 2293b8e2b7 eqcompare: adjust comparison appearance 2018-07-07 04:36:12 +02:00
BenDol 90647f9e46 eqcompare: compare basic stats on items 2018-07-07 04:36:12 +02:00
shagu 512a0798b3 eqcompare: use more generic tooltip function 2017-12-08 18:06:52 +01:00
shagu 0526bf9e33 eqcompare: simplify projectile slot 2017-09-24 18:26:24 +02:00
shagu 6e26336d36 api: rework of locale system 2017-02-26 21:29:27 +01:00
shagu 1766dd4ba0 api: use C for config 2017-02-26 20:42:08 +01:00
shagu 5a60812786 api: replace getglobal 2017-02-26 20:19:22 +01:00
shagu a7355e8ad6 tooltip: option to always show vendor and comparison 2016-12-27 14:37:51 +01:00
shagu 79e771c79d eqcompare: add equip compare tooltips 2016-12-21 14:07:34 +01:00