From 3f97f582b12fe759c0a71cb2749baed040608194 Mon Sep 17 00:00:00 2001 From: James Whitehead II Date: Thu, 14 Oct 2010 14:11:02 +0100 Subject: [PATCH] Do not allow AddBinding/DeleteBinding while in combat --- Clique.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Clique.lua b/Clique.lua index abb3849..c32f1d7 100755 --- a/Clique.lua +++ b/Clique.lua @@ -381,6 +381,10 @@ end -- } function addon:AddBinding(entry) + if InCombatLockdown() then + return false + end + -- TODO: Check to see if the new binding conflicts with an existing binding -- TODO: Validate the entry to ensure it has the correct arguments, etc. @@ -412,6 +416,10 @@ local function bindingeq(a, b) end function addon:DeleteBinding(entry) + if InCombatLockdown() then + return false + end + -- Look for an entry that matches the given binding and remove it for idx, bind in ipairs(self.bindings) do if bindingeq(entry, bind) then -- 1.7.9.5