Commit Graph
25 Commits
Author SHA1 Message Date
Brues f37ea00226 Give pfUI its own EventRegistry and move event-only frames onto it
pfUI.events was a bare CallbackRegistry for pfUI's custom events. Build it
from ClassicAPI's EventRegistry instead, so the same object also takes game
events through RegisterFrameEventAndCallback, sharing one frame for all of
them.

Move the frames that existed only to listen for a few events onto it:
libspell, focus, pixelperfect, innervatecall, loothistory, unusable,
equipmentmanager (bank + window refresh), the actionbar grid, updatenotify,
turtle-wow's steady shot, nampower's spell queue, superwow's group tracking
and unitxp's notifications, plus newitem and mapreveal, which used the
global EventRegistry. Handlers take their payload as arguments instead of
the event/arg globals, and the per-frame PLAYER_LOGOUT teardown goes away,
since the registry unregisters its frame on logout.
2026-10-30 12:37:56 -05:00
Brues cae7c2d68a Guard unusable bag refresh against the bank frame not existing yet 2026-10-23 02:39:42 -05:00
Brues fbb0c4c254 Refresh unusable bag tint when item requirements change 2026-10-23 02:00:27 -05:00
Brues 6936fd894b Replace unusable tooltip scan with C_PlayerInfo.CanUseItem
The libtipscan approach scanned each bag/bank item's tooltip for red
text, then had to carve out broken (0-durability) items since those also
color red. C_PlayerInfo.CanUseItem checks item requirements directly
(proficiency, level, class/race, skill/spell/rep) and ignores item
state, so broken-but-equippable gear is never flagged and the durability
exclusion drops out entirely. Bank slots resolve through
C_Container.GetContainerItemID(-1, slot) instead of the inventory-slot
workaround the scanner needed.
2026-07-12 13:48:36 -05:00
Brues 13a08b0ea3 Restore hooksecurefunc 2026-07-09 23:01:52 -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 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
Brues d27db55abf modernize monkey-patched hooks to hooksecurefunc
sellvalue.lua: SetItemRef hook follows the same pattern questitem.lua
got earlier — replaces the local-Hook + _G.SetItemRef monkey-patch with
hooksecurefunc, drops the string.find link-parser, and reads itemID
directly from ItemRefTooltip:GetItem after the original populates the
tooltip. The OnShow path also moves from libtooltip:GetItemLink/GetItemID
to GameTooltip:HasItem/GetItem (libtooltip:GetItemCount stays — it's
populated by libtooltip's own SetBagItem hook and carries the stack
count, which GetItem doesn't return).

unusable.lua: the two post-hooks (pfUI.bag.UpdateSlot and
BankFrameItemButton_UpdateLock) are textbook hooksecurefunc cases —
both ran the original then did extra work, no conditional skip or
return-value tampering. The table form of hooksecurefunc handles
pfUI.bag.UpdateSlot cleanly.
2026-05-21 17:04:00 -05:00
Meow 34f5c3eb02 Version 6.1.0 - Raid/Party Frame Fixes
Bugfixes:
- Fixed 40-yard range check not working for raid/party frames
- Fixed aggro indicator not displaying properly on raid/party frames
- Improved aggro cache to only cache positive results for instant detection
- Fixed HP/Mana not updating with "Use Raid Frames for group" enabled
- Added SuperWoW nil-check for SpellInfo
- Added missing events: PARTY_MEMBER_ENABLE, PARTY_MEMBER_DISABLE, PLAYER_UPDATE_RESTING

UI Improvements:
- Share/Hoverbind buttons now show warning when module is disabled
2026-01-08 12:25:18 +01:00
Meow 5d0e195d1e performance update
performance update
2026-01-03 12:58:31 +01:00
shagu 6dd1a389f5 unusable: use hook based button updates 2025-04-11 17:01:23 +02:00
shagu f7c8fdd886 unusable: always rely on button caches again 2024-04-23 17:57:17 +02:00
shagu b3d4eb4288 unusable: rework module and rewrite caching logic 2024-04-21 15:03:09 +02:00
shagu e6fa2d842b unusable: remove debug function 2024-02-26 16:50:57 +01:00
shagu a0789f26df unusable: trigger directly from bags module 2024-02-26 16:50:57 +01:00
shagu 4ebff6ba09 unusable: enable module for tbc clients 2021-12-24 12:30:02 +01:00
shagu e9237b59b2 core: use concrete string based client checks 2019-06-10 17:06:31 +02:00
shagu 5d7a82127a unusable: add option to choose the color 2018-08-08 23:39:59 +02:00
Road-block a095b1c005 unusable: add module to tint unusable bagslots 2018-07-31 21:23:38 +02:00
shagu 9329bbe6ba unusable: remove broken module
This module was not ready to be pulled into master. Sorry for the inconveniences.

After the initial fixes I made, there are still some points open:
* dead code for merchant window (no difference to stock ui)
* dead code for mail window (no difference to stock ui)
* bugs out when receiving mails (quickfix broke recipes)
2018-06-16 19:42:37 +02:00
shagu c50af0e264 unusable: clear tooltip color before scanning next 2018-06-16 19:34:52 +02:00
shagu 79072ec75d unusable: remove useless bankslot iteration 2018-06-15 20:57:38 +02:00
shagu be62a224ea unusable: fix and trigger make-usable function 2018-06-15 20:45:42 +02:00
shagu f1b46a1869 unusable: directly match rgb values 2018-06-14 20:51:31 +02:00
BenDol 9a47e69a50 unusable: bag module to indicate unusable items 2018-06-14 20:20:11 +02:00