superwow: replace self-healing hexcode with unit

This commit is contained in:
shagu
2025-02-15 17:11:42 +01:00
parent 653a7d15e4
commit 9cbb5d1b67
+14
View File
@@ -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)