From 14db8cbe37cca406f5a79f3fd568d3d6802f653c Mon Sep 17 00:00:00 2001 From: Darthpred Date: Wed, 15 Oct 2014 21:30:29 +0400 Subject: [PATCH] Fix LFR role icons + a failsafe for other icons --- ElvUI_SLE/modules/chat.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ElvUI_SLE/modules/chat.lua b/ElvUI_SLE/modules/chat.lua index f60c68a..90b743e 100644 --- a/ElvUI_SLE/modules/chat.lua +++ b/ElvUI_SLE/modules/chat.lua @@ -194,11 +194,11 @@ local function GetChatIcon(sender) return leader end - return + return "" end function CH:GetPluginReplacementIcon(arg2, arg6, type) - local icon + local icon = "" if arg6 and (strlen(arg6) > 0) then if ( arg6 == "GM" ) then --If it was a whisper, dispatch it to the GMChat addon. @@ -217,7 +217,6 @@ function CH:GetPluginReplacementIcon(arg2, arg6, type) end else icon = GetChatIcon(arg2) - if(lfgRoles[arg2] and SLE:SimpleTable(lfgChannels, type)) then icon = lfgRoles[arg2]..icon end @@ -243,9 +242,8 @@ function CH:CheckLFGRoles() if(UnitExists(unit..i) and not UnitIsUnit(unit..i, "player")) then role = UnitGroupRolesAssigned(unit..i) local name, realm = UnitName(unit..i) - if(role and name) then - name = realm and name..'-'..realm or name..'-'..PLAYER_REALM; + name = realm ~= '' and name..'-'..realm or name ..'-'..PLAYER_REALM; lfgRoles[name] = rolePaths[role] end end -- 1.7.9.5