From 9cbb5d1b671efadc5cfebb21351d13bb1d7e60de Mon Sep 17 00:00:00 2001 From: shagu Date: Sat, 15 Feb 2025 17:11:42 +0100 Subject: [PATCH] superwow: replace self-healing hexcode with unit --- modules/superwow.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/superwow.lua b/modules/superwow.lua index b2d442df..9637f3f7 100644 --- a/modules/superwow.lua +++ b/modules/superwow.lua @@ -32,6 +32,20 @@ pfUI:RegisterModule("superwow", "vanilla", function () DEFAULT_CHAT_FRAME:AddMessage("-> https://github.com/balakethelock/SuperWoW/releases/") end + if SUPERWOW_VERSION == "1.5" then + QueueFunction(function() + local pfCombatText_AddMessage = _G.CombatText_AddMessage + _G.CombatText_AddMessage = function(message, a, b, c, d, e, f) + local match, _, hex = string.find(message, ".+ %[(0x.+)%]") + if hex and UnitName(hex) then + message = string.gsub(message, hex, UnitName(hex)) + end + + pfCombatText_AddMessage(message, a, b, c, d, e, f) + end + end) + end + -- Add support for guid based focus frame if SUPERWOW_VERSION and pfUI.uf and pfUI.uf.focus then local focus = function(unitstr)