diff --git a/ElvUI/Core/Modules/Chat/Chat.lua b/ElvUI/Core/Modules/Chat/Chat.lua index 1464a4c771..107bcf0eef 100644 --- a/ElvUI/Core/Modules/Chat/Chat.lua +++ b/ElvUI/Core/Modules/Chat/Chat.lua @@ -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] @@ -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