Quantcast

Allow global bindings to also use friend/enemy

James Whitehead II [10-09-10 - 13:29]
Allow global bindings to also use friend/enemy
Filename
Utils.lua
diff --git a/Utils.lua b/Utils.lua
index 4e65566..e4f8a7c 100644
--- a/Utils.lua
+++ b/Utils.lua
@@ -224,14 +224,18 @@ end
 function addon:ShouldSetBinding(binding, global)
     local apply = false

-    -- Check for global bindings first
-    if binding.sets.global and global then
-        apply = true
-    elseif binding.sets.global and (not global) then
-        apply = false
+    -- Check for global bindings first in isolation
+    if binding.sets.global then
+        if global then
+            return true
+        else
+            return false
+        end
+    elseif global then
+        return false
     end

-    if binding.sets.enemy or binding.sets.friend and not binding.sets.global then
+    if binding.sets.enemy or binding.sets.friend then
         apply = true
     end