Skip to content

Commit

Permalink
fix afk/dnd on chat
Browse files Browse the repository at this point in the history
  • Loading branch information
kodewdle committed Apr 1, 2024
1 parent fc75691 commit 17dd243
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions ElvUI/Core/Modules/Chat/Chat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1763,25 +1763,18 @@ function CH:ChatFrame_ReplaceIconAndGroupExpressions(message, noIconReplacement,
end

-- copied from ChatFrame.lua
local function GetPFlag(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17)
-- Renaming for clarity:
local specialFlag = arg6
local zoneChannelID = arg7
--local localChannelID = arg8

local function GetPFlag(specialFlag, zoneChannelID, localChannelID)
if specialFlag ~= '' then
if specialFlag == 'GM' or specialFlag == 'DEV' then
-- Add Blizzard Icon if this was sent by a GM/DEV
return [[|TInterface\ChatFrame\UI-ChatIcon-Blizz:12:20:0:0:32:16:4:28:0:16|t ]]
elseif E.Retail then
if specialFlag == 'GUIDE' then
if _G.ChatFrame_GetMentorChannelStatus(CHATCHANNELRULESET_MENTOR, GetChannelRulesetForChannelID(zoneChannelID)) == CHATCHANNELRULESET_MENTOR then
return NPEV2_CHAT_USER_TAG_GUIDE
end
elseif specialFlag == 'NEWCOMER' then
if _G.ChatFrame_GetMentorChannelStatus(PLAYERMENTORSHIPSTATUS_NEWCOMER, GetChannelRulesetForChannelID(zoneChannelID)) == PLAYERMENTORSHIPSTATUS_NEWCOMER then
return _G.NPEV2_CHAT_USER_TAG_NEWCOMER
end
elseif specialFlag == 'GUIDE' and E.Retail then
if _G.ChatFrame_GetMentorChannelStatus(CHATCHANNELRULESET_MENTOR, GetChannelRulesetForChannelID(zoneChannelID)) == CHATCHANNELRULESET_MENTOR then
return NPEV2_CHAT_USER_TAG_GUIDE
end
elseif specialFlag == 'NEWCOMER' and E.Retail then
if _G.ChatFrame_GetMentorChannelStatus(PLAYERMENTORSHIPSTATUS_NEWCOMER, GetChannelRulesetForChannelID(zoneChannelID)) == PLAYERMENTORSHIPSTATUS_NEWCOMER then
return _G.NPEV2_CHAT_USER_TAG_NEWCOMER
end
else
return _G['CHAT_FLAG_'..specialFlag]
Expand Down Expand Up @@ -1920,7 +1913,7 @@ function CH:MessageFormatter(frame, info, chatType, chatGroup, chatTarget, chann
end

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

0 comments on commit 17dd243

Please sign in to comment.