From dce786770637f8de5a549d7d6459606742780041 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Sat, 9 Oct 2010 14:29:42 +0100 Subject: [PATCH] Allow global bindings to also use friend/enemy --- Utils.lua | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) 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 -- 1.7.9.5