Commit Graph

175 Commits

Author SHA1 Message Date
roby-brok e017dbf515 Fix guards, cache keys and comparisons that never match (#40)
* chat: detect whispers before the timestamp is prepended

Whisper detection tests for the whisper colour code at position 1, but the
timestamp is prepended first, so with timestamps enabled the code is no longer
at position 1 and every whisper failed the test -- losing both the recolour and
the correct chat-history entry.

(cherry picked from commit 4b69d597631c422d9360a94ff129323288a28cc2)

* macrotweak + libpredict: inverted install guard, misspelled globals

macrotweak: _AddHistoryLine is the backup slot this block creates, so it is nil
until line 18 runs. Guarding on its truthiness meant the chat-history filter
never installed at all -- macro calls kept landing in chat input history.

libpredict: UKNOWNBEING / UNKOWNBEING are misspelled, so both resolve to nil and
the guards never matched the real UNKNOWNBEING. Neutral if the global is absent
on this client, correct if present.

Not needed: his libpredict already fixed the always-true
'event == "A" or "B"' condition (libs/libpredict.lua:828).

(cherry picked from commit 4068110dc4134823f1c09f60ca5f8959302cd14f)

* mapreveal: look the explore cache up by the key it is actually stored under

explorecaches is keyed by the plain area name (line ~160), but the hover frame
carried only a decorated 'mapFileName (area)' display string, so every lookup
missed and the hover highlight never fired. Store the plain name alongside it
and key off that; the tooltip keeps the decorated string.

(cherry picked from commit 5e6fe969a03a88c68e28614548b9d44db562ab9a)

* socialmod: don't clobber the friend-online match with the offline one

The offline match was assigned unconditionally over the online match, so a
friend coming online never had lastseen recorded.

(cherry picked from commit ad927806c46042163f84bde4db1082726bedf28b)

* swingtimer: off-hand weapons are inventory type 22, not 21

The off-hand slot accepts one-hand (13) and off-hand (22) weapons. Type 21 is
INVTYPE_WEAPONMAINHAND and can never be equipped there, so the off-hand swing
timer never recognised a real off-hand weapon.

The other two swingtimer fixes are not needed here: his hunter check already
uses UnitClassBase (locale-independent, better than our UnitClass second
return), and his generic on-next-swing detection covers Raptor Strike without
our hardcoded spell-id list.

(cherry picked from commit 9ab7f5f7224d12361ca6cd5a49181cbb4bebd387)

* superwow: compare the version numerically, not by exact string

SUPERWOW_VERSION == "1.5" silently disables the GUID-to-name combat text hook
on any release past 1.5. Currently 1.5 here, so this is forward-compat only.

Not needed: the clickthrough slash commands already go through
RegisterSlashCommand, which writes _G properly.

(cherry picked from commit 82a37752a5782479849ce7e1304c24733c2ff97a)

* api: measure a real pixel against UIParent, not the uiScale cvar

The uiScale cvar caps at 1.0 while both the pixelperfect module and the
firstrun slider push UIParent past it via SetScale, and it is ignored entirely
while useUiScale is off, so borders came out the wrong thickness on the
Huge/Large presets. Ask the frame for its effective scale instead, and guard an
unparseable gxResolution.

Also cache GetItemLinkByName and count its failures: the scan walked every id
on each call with no memory, so an unresolvable name hitched on every tooltip
hover. Raise the ceiling from 25818 to 61000 as well -- Octo/Turtle custom
items live well past the vanilla range and never resolved.

(cherry picked from commit dac2d3416aef85a4c4b71c0239d93d309e76e30b)

* init: load pixelperfect first so GetPerfectPixel caches the right scale

pixelperfect sets the UI scale that GetPerfectPixel measures against, and that
value is cached on first use. Loading it 56th baked in the previous scale.

(cherry picked from commit dd89a210330583f890a51a82b29e968f3ad36b34)

* modules: route two global overrides through _G so they leave the sandbox

pfUI.env has __index but no __newindex, so a bare global assignment inside a
RegisterModule closure is written into the sandbox table and never reaches _G.
unitxp's BattlefieldFrame_Show override therefore never fired the BG queue-pop
notification, and RaidFrame.lua never saw GROUP_REPLACE_PARTY.

The slash-command half of this fix is not needed here: RegisterSlashCommand
already writes through _G.

(cherry picked from commit 617c8320aca2465af62cf0ff5be7dceaed29a3b2)

* bags: remove the duplicate search OnHide handler

Two byte-identical frame.search OnHide handlers were installed back to back;
the second overwrote the first, so the first was dead code.

(cherry picked from commit e77650448b92e5d7f18ae58632e4531cb2813ea6)

* buffwatch: invalidate the filter cache when a skill is listed

fcache is built once per config table and never cleared, so ctrl/shift-clicking
a skill onto the whitelist or blacklist had no effect until the next reload.

* roll: actually capture the everyone-passed subject

strfind(LOOT_ROLL_ALL_PASSED, LOOT_ROLL_PASSED) has no captures, so `everyone`
was always nil, never reached the blacklist, and "Everyone has passed on: X"
was recorded as a real player passing.

Builds a sample from LOOT_ROLL_ALL_PASSED and runs the same LOOT_ROLL_PASSED
match the scanner uses, so the subject is captured the way it will actually
appear.
2026-08-10 01:13:32 -05:00
Brues fe0ec82ede Route config color strings through GetStringColor cache
Replace raw strsplit(",", ...) color parsing across action bars, chat,
nameplates, third-party skins, player, and roll with the cached
GetStringColor / GetStringColorObject helpers, dropping the per-build
string-table allocations they created.
2026-08-04 22:27:43 -05:00
Brues 6d1bfe805e Use UnitClassBase for class detection 2026-07-30 01:26:29 -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 5772cf2f91 GetUnitData -> GetUnitInfo
avoid clash
2026-06-17 20:19:42 -05:00
Brues 1fd7895ca7 move away from RAID_CLASS_COLORS dependency 2026-05-28 13:06:00 -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 ba566cdd53 phase 2 removing tbc
Strip dead pfUI.client > 11200 and pfUI.expansion == "tbc" branches now
that vanilla is the only supported client.

- pfUI.lua: hardcode expansion = "vanilla"; collapse force_region matrix
- compat/vanilla.lua, libs/{libcast,libdebuff,libtotem,libunitscan,
  focus}: drop always-false early-returns
- api/unitframes.lua: delete TargetBuffOnUpdate poller + tbc visibility
  and secure-template branches; click-cast keeps only vanilla path
- api/ui-widgets.lua: unconditional EffectiveScale divide
- env/tables.lua: drop unused focus/focustarget pfValidUnits entries
- modules/actionbar.lua: simplify EnablePaging, drop ButtonSwitch/
  petvisibility, unwrap prowl block, single keybind-remap path
- modules/{castbar,chat,cooldown,loot,questitem,totems}: unwrap
  always-true conditionals
- modules/nameplates.lua: cfg-only fake-cooldown gate, unwrap overlap/
  clickthrough + mouselook blocks
- modules/friends.lua + skins/blizzard/friends.lua: maxtab = 4
- skins/blizzard/{help,game_menu,questlog}: drop tbc-only branches
2026-05-25 18:40:17 -05:00
Brues 1d27f7bed3 class color cleanup 2026-05-23 02:56:00 -05:00
Brues 67146ef3a4 begin utilizing ClassicAPI 2026-05-16 13:02:38 -05:00
Meow 37beca7103 New throttling menu
New throttling menu
2026-02-06 08:07:33 +01:00
Meow e83ff80538 Version 6.1.1 - Chat & Nameplate Level Fixes
Bugfixes:
- Fixed targeting high-level players overwriting known level with -1
- Chat now shows "??" instead of -1 for unknown levels
- Nameplates now use stored level from database after reload
- Nameplate level color now uses difficulty color when loaded from DB

Config Changes:
- Chat player level display now disabled by default
2026-01-08 19:02:02 +01: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 b183b20c71 chat: only remove actual combat log frames 2025-06-12 15:39:27 +02:00
shagu 492bdc0b5e chat: set max lines before history is added 2024-11-23 23:59:03 +01:00
shagu 242574c03a chat: add option to set maximum number of chat lines 2024-11-23 23:52:43 +01:00
shagu 43954c487b chat: use parent to determine docked state
Remove every texture of the chat frame and only restore background
for chat frames that are not docked to the left or the right side.
2023-10-03 15:11:14 +02:00
shagu 866ebdc234 chat: use original background for undocked windows 2023-10-03 14:55:03 +02:00
shagu 42f0bff21e chat: allow users to set chat backgrounds 2023-10-03 14:42:06 +02:00
Cameron Weaver (Clutch) 3cb2c70385 chat: option to /who search unknown names 2023-07-24 13:13:05 +02:00
shagu 580eb9a6ac chat: disable game function that closes chat windows
The 'GetChatWindowInfo' function returns shown as 'false' while the UIParent is hidden (Alt+Z).
Based on that return value, the 'FloatingChatFrame_Update' would remove every chat frame,
that isn't tabbed while the interface is hidden. With this overwrite we prevent the original
'FloatingChatFrame_Update' function from being called during that time to avoid this behaviour.
2023-06-29 10:54:39 +02:00
shagu ebaebc6304 chat: set the default chat on login 2023-04-13 11:17:54 +02:00
Pizzahawaiii f8a25a4fbd chat: fix tab text color
The previous implementation looked like the intention was to use a
slightly darker pastel version of the player's class color for the
chat tab texts. But the parens around the addition were forgotten,
which led to the tab text color bring brighter instead of darker.
2022-12-26 10:34:01 +01:00
shagu 81d5dafbd5 chat: remove obsolete alwaysshow option 2022-09-30 16:42:59 +02:00
shagu 629d9be550 chat: only display dock while meters are off 2022-05-27 16:58:19 +02:00
shagu 0214eebf36 core: switch from mousedown to drag functions
Due to crashes/freezes while moving some frames, one possible
reason could be that pfUI was using OnMouseDown and OnMouseUp
to run its frame-moving code. I have noticed better performance
when using the intended functions, OnDragStart and OnDragStop
to move frames.

This commit changes every occurrence of such functions and splits
drag and click into seperate functions where required.
2022-05-07 21:35:52 +02:00
shagu 616b726a76 chat: adjust chat history colors 2021-01-20 16:35:20 +01:00
shagu ffcda0b044 chat: add option to display chat history 2021-01-18 17:36:09 +01:00
shagu c4e0bb7a76 chat: detect and disable chat parsing on combatlog 2021-01-18 16:12:41 +01:00
shagu 8a1842e2af chat: use unified function for chat hooks 2021-01-18 16:11:45 +01:00
shagu 7669e64173 core: remove leftover semicolons 2020-08-15 19:29:24 +02:00
shagu d8e73910b9 chat: remove chat background textures 2020-07-24 02:57:24 +02:00
shagu 66853c1a10 chat: only respect combatlogpanel if exists 2020-04-09 17:05:04 +02:00
shagu 451395a8c3 chat: set custom position for combatlog tab 2020-04-09 16:59:27 +02:00
shagu d8b021c3c4 chat: add option to disable frame shadows 2020-03-17 21:14:40 +01:00
shagu 5619fcbe55 chat: use border spacing for alignment 2020-03-13 16:12:58 +01:00
shagu 3334c7469f modules: make all modules aware of the new borders 2019-12-18 18:54:09 +01:00
shagu f4db399d08 chat: try to match extended clinks first 2019-10-29 07:24:18 +01:00
shagu 1588f9ad5d chat: replace all kind of clinks with real links 2019-10-28 20:27:35 +01:00
shagu ef3ec0bb9c chat: fix clink messages for tbc 2019-09-25 14:45:47 +02:00
shagu 02c1863ab4 chat: add additional tbc chat channels 2019-09-25 14:45:23 +02:00
shagu e0f448ea78 chat: disable padding when panel is invisible 2019-08-05 18:02:25 +02:00
shagu 884775d902 chat: remove additional colons from player links 2019-08-02 17:34:15 +02:00
shagu 9ed82476bc chat: hook set alpha and avoid chat update loop 2019-07-30 22:47:45 +02:00
shagu 708df6b6c5 chat: restore chat tab alpha on flash events 2019-07-30 22:08:03 +02:00
shagu 9ad1f5eb2e chat: use a proper hook to disable fadeout 2019-07-30 21:53:53 +02:00
shagu af824f17d3 chat: fix playername colors for tbc 2019-07-19 19:26:13 +02:00
shagu 0cd47b60ba chat: add missing pairs in iteration 2019-07-19 19:25:54 +02:00