From b097f1644279161f4dec75af99e3cf98478036b8 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Fri, 22 Oct 2010 11:49:16 +0100 Subject: [PATCH] Fix enemy/friend bindings when used with default/hovercast. Thanks to JTrent82 for the thorough bug report that helped me track this one down. --- Clique.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Clique.lua b/Clique.lua index 6de2578..33f9fcd 100755 --- a/Clique.lua +++ b/Clique.lua @@ -335,11 +335,25 @@ function addon:GetClickAttributes(global) -- then in the remapping. if entry.sets.friend then + if global then + -- A modified binding that uses friend/enemy must have the unmodified + -- 'unit' attribute set, in order to do the friend/enemy lookup. Add + -- that here. + bits[#bits + 1] = ATTR(prefix, "unit", suffix, "mouseover") + rembits[#rembits + 1] = REMATTR(prefix, "unit", suffix) + end local newbutton = "friend" .. suffix bits[#bits + 1] = ATTR(prefix, "helpbutton", suffix, newbutton) rembits[#rembits + 1] = REMATTR(prefix, "helpbutton", suffix) suffix = newbutton elseif entry.sets.enemy then + if global then + -- A modified binding that uses friend/enemy must have the unmodified + -- 'unit' attribute set, in order to do the friend/enemy lookup. Add + -- that here. + bits[#bits + 1] = ATTR(prefix, "unit", suffix, "mouseover") + rembits[#rembits + 1] = REMATTR(prefix, "unit", suffix) + end local newbutton = "enemy" .. suffix bits[#bits + 1] = ATTR(prefix, "harmbutton", suffix, newbutton) rembits[#rembits + 1] = REMATTR(prefix, "harmbutton", suffix) -- 1.7.9.5