Files
pfUI/modules/notify.lua
Brues c18b0eafcd Trim DLL integrations to what ClassicAPI doesn't cover
Keep the DLL features with no ClassicAPI equivalent and move the rest
onto ClassicAPI:

- Nampower: spell queue indicator, swing timer queue colors, Steady Shot
  cast bar, one-press totem sets, /disenchantall, feign death health
- UnitXP_SP3: behind indicator (now in target.lua) and the precise range
  check mode
- SuperWoW: group tracking on the minimap
- Target distance moves to UnitDistanceSquared, OS notifications to
  FlashClientIcon (now a global setting that fires on BG queue pops, not
  on opening the battlemaster), /pfcast and /castfocus to
  C_Spell.CastAtUnit
- The reactive spell indicator gets its own module and an event
  (ACTIONBAR_UPDATE_USABLE); its OnUpdate sat on a hidden frame and
  never ran
- /pfdll moves to its own module and reports UnitXP too

Drop /clickthrough, /pfunitxp, the SuperWoW combat text GUID hook
(SuperWoW 2.2 already swaps combat log GUIDs for names), the old
SuperWoW enchant link shim, the uncalled distance/targeting/mark
helpers and the config keys nothing read.
2026-11-15 21:28:58 -06:00

22 lines
820 B
Lua

-- Flash the taskbar button on whispers, ready checks and battleground
-- queue pops, so they reach an alt-tabbed player. FlashClientIcon does
-- nothing while WoW is in the foreground.
pfUI:RegisterModule("notify", function ()
if C.global.notify ~= "1" then return end
local function Flash() FlashClientIcon() end
pfUI.events:RegisterFrameEventAndCallback("CHAT_MSG_WHISPER", Flash)
pfUI.events:RegisterFrameEventAndCallback("READY_CHECK", Flash)
-- a queue pop turns a battlefield's status to "confirm"
local popped = {}
pfUI.events:RegisterFrameEventAndCallback("UPDATE_BATTLEFIELD_STATUS", function()
for i = 1, MAX_BATTLEFIELD_QUEUES do
local confirm = GetBattlefieldStatus(i) == "confirm"
if confirm and not popped[i] then Flash() end
popped[i] = confirm
end
end)
end)