Windfury!: turn on combat text events, hide Blizzard's text

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-11-16 20:22:39 +00:00
parent 75cff180cb
commit ee9509e52d
3 changed files with 51 additions and 2 deletions

View file

@ -215,6 +215,41 @@ events:SetScript("OnEvent", function(self, event, arg1)
play()
end)
-- Combat text ---------------------------------------------------------------
-- The client only sends combat COMBAT_TEXT_UPDATE events (damage, extra
-- attacks) while Scrolling Combat Text is on. If it was off, turn it on and
-- keep Blizzard's floating text hidden, so the screen looks the same.
local function hideBlizzardText()
if not db.hideBlizzardText or not CombatText then return end
CombatText:Hide()
if not CombatText.windfuryHooked then
CombatText.windfuryHooked = true
CombatText:HookScript("OnShow", function(self)
if db.hideBlizzardText then self:Hide() end
end)
end
end
local fct = CreateFrame("Frame")
fct:RegisterEvent("PLAYER_LOGIN")
fct:RegisterEvent("ADDON_LOADED")
fct:SetScript("OnEvent", function(_, event, name)
if event == "ADDON_LOADED" then
if name == "Blizzard_CombatText" then hideBlizzardText() end
return
end
if not C_CVar.GetCVarBool("enableFloatingCombatText") then
local ok, err = pcall(C_CVar.SetCVar, "enableFloatingCombatText", "1")
if ok and C_CVar.GetCVarBool("enableFloatingCombatText") then
db.hideBlizzardText = true
else
print("|cff66ccffWindfury!|r couldn't turn on Scrolling Combat Text: " .. tostring(err))
end
end
hideBlizzardText()
end)
-- Debug log (temporary) -----------------------------------------------------
-- COMBAT_TEXT_UPDATE never saw a proc in game. Log the player's own casts and
-- buffs gained, by readable name, to find another event that carries it.