social-colors: disable chat parser in combat log

This commit is contained in:
shagu
2025-08-04 09:38:26 +02:00
parent 1c31a42980
commit cf85403570
+10 -1
View File
@@ -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