From 1c31a42980a643fafb481bfc023b34f2287a64f0 Mon Sep 17 00:00:00 2001 From: shagu Date: Mon, 4 Aug 2025 09:08:00 +0200 Subject: [PATCH] chat-links: disable chat parser in combat log --- mods/chat-links.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/mods/chat-links.lua b/mods/chat-links.lua index 681d680..e6f6701 100644 --- a/mods/chat-links.lua +++ b/mods/chat-links.lua @@ -194,7 +194,16 @@ 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].HookAddMessage 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].HookAddMessage and isCombat < 5 then _G["ChatFrame"..i].HookAddMessage = _G["ChatFrame"..i].AddMessage _G["ChatFrame"..i].AddMessage = function(frame, text, a1, a2, a3, a4, a5) if text then