From cf854035700f7ae4f7f869ab82551fbf5b61d9b0 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 4 Aug 2025 09:08:37 +0200 Subject: [PATCH] social-colors: disable chat parser in combat log --- mods/social-colors.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mods/social-colors.lua b/mods/social-colors.lua index cb8ac3f..2b4d1be 100644 --- a/mods/social-colors.lua +++ b/mods/social-colors.lua @@ -21,7 +21,16 @@ local module = ShaguTweaks:register({ module.enable = function(self) do -- add class colors to chat for i=1,NUM_CHAT_WINDOWS do - if _G["ChatFrame"..i] and not _G["ChatFrame"..i].HookAddMessageColor and not Prat then + local isCombat = 0 + if _G["ChatFrame"..i] and _G["ChatFrame"..i].messageTypeList then + for _, msg in pairs(_G["ChatFrame"..i].messageTypeList) do + if strfind(msg, "SPELL", 1) or strfind(msg, "COMBAT", 1) then + isCombat = isCombat + 1 + end + end + end + + if _G["ChatFrame"..i] and not _G["ChatFrame"..i].HookAddMessageColor and not Prat and isCombat < 5 then _G["ChatFrame"..i].HookAddMessageColor = _G["ChatFrame"..i].AddMessage _G["ChatFrame"..i].AddMessage = function(frame, text, a1, a2, a3, a4, a5) if text then