* Currently in patch 2.2 Blizzard changed the unit attribute resolution. As a result, a unit attribute of "nil" is different from a unit attribute that has never been set. This release works around this issue by only setting the attribute if you've set it in your configuration.
James Whitehead II [09-27-07 - 18:18]
* Currently in patch 2.2 Blizzard changed the unit attribute resolution. As a result, a unit attribute of "nil" is different from a unit attribute that has never been set. This release works around this issue by only setting the attribute if you've set it in your configuration.
* If you set the "unit" argument for a given custom type, and then clear it, you will need to reload your UI in order to get teh change applied. This should not affect the average user in any way.
diff --git a/Clique.lua b/Clique.lua
index 7b54731..e1a3cee 100644
--- a/Clique.lua
+++ b/Clique.lua
@@ -401,11 +401,15 @@ function Clique:SetAttribute(entry, frame)
elseif entry.type == "action" then
frame:SetAttribute(entry.modifier.."type"..button, entry.type)
frame:SetAttribute(entry.modifier.."action"..button, entry.arg1)
- frame:SetAttribute(entry.modifier.."unit"..button, entry.arg2 or "mouseover")
+ if entry.arg2 then
+ frame:SetAttribute(entry.modifier.."unit"..button, entry.arg2)
+ end
elseif entry.type == "pet" then
frame:SetAttribute(entry.modifier.."type"..button, entry.type)
frame:SetAttribute(entry.modifier.."action"..button, entry.arg1)
- frame:SetAttribute(entry.modifier.."unit"..button, entry.arg2 or "mouseover")
+ if entry.arg2 then
+ frame:SetAttribute(entry.modifier.."unit"..button, entry.arg2)
+ end
elseif entry.type == "spell" then
local rank = tonumber(entry.arg2)
local cast = string.format(rank and L.CAST_FORMAT or "%s", entry.arg1, rank)
@@ -415,13 +419,17 @@ function Clique:SetAttribute(entry, frame)
frame:SetAttribute(entry.modifier.."bag"..button, entry.arg2)
frame:SetAttribute(entry.modifier.."slot"..button, entry.arg3)
frame:SetAttribute(entry.modifier.."item"..button, entry.arg4)
- frame:SetAttribute(entry.modifier.."unit"..button, entry.arg5 or "mouseover")
+ if entry.arg5 then
+ frame:SetAttribute(entry.modifier.."unit"..button, entry.arg5)
+ end
elseif entry.type == "item" then
frame:SetAttribute(entry.modifier.."type"..button, entry.type)
frame:SetAttribute(entry.modifier.."bag"..button, entry.arg1)
frame:SetAttribute(entry.modifier.."slot"..button, entry.arg2)
frame:SetAttribute(entry.modifier.."item"..button, entry.arg3)
- frame:SetAttribute(entry.modifier.."unit"..button, entry.arg4 or "mouseover")
+ if entry.arg4 then
+ frame:SetAttribute(entry.modifier.."unit"..button, entry.arg4)
+ end
elseif entry.type == "macro" then
frame:SetAttribute(entry.modifier.."type"..button, entry.type)
if entry.arg1 then
@@ -440,13 +448,19 @@ function Clique:SetAttribute(entry, frame)
frame:SetAttribute(entry.modifier.."type"..button, entry.type)
elseif entry.type == "target" then
frame:SetAttribute(entry.modifier.."type"..button, entry.type)
- frame:SetAttribute(entry.modifier.."unit"..button, entry.arg1 or "mouseover")
+ if entry.arg1 then
+ frame:SetAttribute(entry.modifier.."unit"..button, entry.arg1)
+ end
elseif entry.type == "focus" then
frame:SetAttribute(entry.modifier.."type"..button, entry.type)
- frame:SetAttribute(entry.modifier.."unit"..button, entry.arg1 or "mouseover")
+ if entry.arg1 then
+ frame:SetAttribute(entry.modifier.."unit"..button, entry.arg1)
+ end
elseif entry.type == "assist" then
frame:SetAttribute(entry.modifier.."type"..button, entry.type)
- frame:SetAttribute(entry.modifier.."unit"..button, entry.arg1 or "mouseover")
+ if entry.arg1 then
+ frame:SetAttribute(entry.modifier.."unit"..button, entry.arg1)
+ end
elseif entry.type == "click" then
frame:SetAttribute(entry.modifier.."type"..button, entry.type)
frame:SetAttribute(entry.modifier.."clickbutton"..button, getglobal(entry.arg1))