From c54b3c43d676d448395bbd004af7b6f265f18030 Mon Sep 17 00:00:00 2001 From: konaka <> Date: Sat, 27 Sep 2025 00:41:05 +0800 Subject: [PATCH] Fix a compability issue with Super API --- UnitXP_SP3_Addon.lua | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/UnitXP_SP3_Addon.lua b/UnitXP_SP3_Addon.lua index 57e9d31..17c24ff 100755 --- a/UnitXP_SP3_Addon.lua +++ b/UnitXP_SP3_Addon.lua @@ -139,6 +139,20 @@ end function UnitXP_SP3_detoured_CombatText_AddMessage(message, scrollFunction, r, g, b, displayType, isStaggered) if UnitXP_SP3_Addon["combatTextSP3"] then + -- Reported by Heallios + -- Super WoW/API is also hooking CombatText_AddMessage to process the message doing a GUID to name conversion. + -- However as UnitXP_SP3 would not call underlying function when using its own combat text facility, this conversion would be skipped. + -- For now, we copy pasTA Super WoW/API conversion code. + if SUPERWOW_VERSION then + message = gsub(message, "(%s%[)(0x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x%x)(%])", function(bracket1, hex, bracket2) + if UnitIsUnit(hex, "player") then + return nil; + else + return " [" .. UnitName(hex) .. "]"; + end + end); + end + if displayType == "crit" then pcall(UnitXP, "addCombatText", "crit", message, r, g, b); else @@ -493,7 +507,7 @@ function UnitXP_SP3_UI_OnClick(widget) xpsp3_editBox_FPScap:ClearFocus(); xpsp3_editBox_combatTextSP3_fontSize:ClearFocus(); - + skipUpdateMessage = false; if string.find(widget:GetName(), "_editBox_") then