From f90279e0031e22b24ceded00bbf6bf26a38c3ef1 Mon Sep 17 00:00:00 2001 From: Brues <5278969+brues-code@users.noreply.github.com> Date: Sat, 31 Oct 2026 13:27:48 -0500 Subject: [PATCH] Drive the haste and spell power text from events Replace the 0.25s ticker with UNIT_SPELL_HASTE for haste and PLAYER_DAMAGE_DONE_MODS for spell power, which fires on the MOD_DAMAGE_DONE fields GetSpellBonusDamage reads. --- modules/player.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/modules/player.lua b/modules/player.lua index 7c2d166e..ed96a144 100644 --- a/modules/player.lua +++ b/modules/player.lua @@ -61,7 +61,7 @@ pfUI:RegisterModule("player", function () MAGE = 7, WARLOCK = 6, } - -- Compute and cache the haste/SP text; called from OnUpdate, throttled to 0.25s + -- Compute the haste/SP text; called on haste, spell power and config changes local function UpdateInfoText() local cfg = playerFrame.config if not cfg then @@ -124,9 +124,13 @@ pfUI:RegisterModule("player", function () end) end - -- Haste / spell-power overlay text — refreshes 4×/sec on its own ticker, - -- independent of the unit frame's OnUpdate cadence. - C_Timer.NewTicker(0.25, UpdateInfoText) + -- PLAYER_DAMAGE_DONE_MODS fires on the MOD_DAMAGE_DONE fields that + -- GetSpellBonusDamage reads, so gear, buffs and talents all reach it. + pfUI.events:RegisterFrameEventAndCallback("PLAYER_ENTERING_WORLD", UpdateInfoText) + pfUI.events:RegisterFrameEventAndCallback("PLAYER_DAMAGE_DONE_MODS", UpdateInfoText) + pfUI.events:RegisterFrameEventAndCallback("UNIT_SPELL_HASTE", function(_, unit) + if unit == "player" then UpdateInfoText() end + end) -- Replace default's RESET_INSTANCES button with an always working one UnitPopupButtons["RESET_INSTANCES_FIX"] = { text = RESET_INSTANCES, dist = 0 }