Skip to content

Commit 17dd243

Browse files
committed
fix afk/dnd on chat
1 parent fc75691 commit 17dd243

File tree

1 file changed

+9
-16
lines changed

1 file changed

+9
-16
lines changed

ElvUI/Core/Modules/Chat/Chat.lua

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,25 +1763,18 @@ function CH:ChatFrame_ReplaceIconAndGroupExpressions(message, noIconReplacement,
17631763
end
17641764

17651765
-- copied from ChatFrame.lua
1766-
local function GetPFlag(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17)
1767-
-- Renaming for clarity:
1768-
local specialFlag = arg6
1769-
local zoneChannelID = arg7
1770-
--local localChannelID = arg8
1771-
1766+
local function GetPFlag(specialFlag, zoneChannelID, localChannelID)
17721767
if specialFlag ~= '' then
17731768
if specialFlag == 'GM' or specialFlag == 'DEV' then
17741769
-- Add Blizzard Icon if this was sent by a GM/DEV
17751770
return [[|TInterface\ChatFrame\UI-ChatIcon-Blizz:12:20:0:0:32:16:4:28:0:16|t ]]
1776-
elseif E.Retail then
1777-
if specialFlag == 'GUIDE' then
1778-
if _G.ChatFrame_GetMentorChannelStatus(CHATCHANNELRULESET_MENTOR, GetChannelRulesetForChannelID(zoneChannelID)) == CHATCHANNELRULESET_MENTOR then
1779-
return NPEV2_CHAT_USER_TAG_GUIDE
1780-
end
1781-
elseif specialFlag == 'NEWCOMER' then
1782-
if _G.ChatFrame_GetMentorChannelStatus(PLAYERMENTORSHIPSTATUS_NEWCOMER, GetChannelRulesetForChannelID(zoneChannelID)) == PLAYERMENTORSHIPSTATUS_NEWCOMER then
1783-
return _G.NPEV2_CHAT_USER_TAG_NEWCOMER
1784-
end
1771+
elseif specialFlag == 'GUIDE' and E.Retail then
1772+
if _G.ChatFrame_GetMentorChannelStatus(CHATCHANNELRULESET_MENTOR, GetChannelRulesetForChannelID(zoneChannelID)) == CHATCHANNELRULESET_MENTOR then
1773+
return NPEV2_CHAT_USER_TAG_GUIDE
1774+
end
1775+
elseif specialFlag == 'NEWCOMER' and E.Retail then
1776+
if _G.ChatFrame_GetMentorChannelStatus(PLAYERMENTORSHIPSTATUS_NEWCOMER, GetChannelRulesetForChannelID(zoneChannelID)) == PLAYERMENTORSHIPSTATUS_NEWCOMER then
1777+
return _G.NPEV2_CHAT_USER_TAG_NEWCOMER
17851778
end
17861779
else
17871780
return _G['CHAT_FLAG_'..specialFlag]
@@ -1920,7 +1913,7 @@ function CH:MessageFormatter(frame, info, chatType, chatGroup, chatTarget, chann
19201913
end
19211914

19221915
-- Player Flags
1923-
local pflag = GetPFlag(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17)
1916+
local pflag = GetPFlag(arg6, arg7, arg8)
19241917
if not bossMonster then
19251918
local chatIcon, pluginChatIcon = specialChatIcons[arg12] or specialChatIcons[playerName], CH:GetPluginIcon(arg12, playerName)
19261919
if type(chatIcon) == 'function' then

0 commit comments

Comments
 (0)