diff SecureMenu.lua @ 103:c8d527a9fb3a v1.0beta11

Better manage combat and secure buttons
author contrebasse
date Sat, 21 May 2011 14:19:33 +0200
parents e3147b41ea9d
children 618163a6d970
line wrap: on
line diff
--- a/SecureMenu.lua	Fri May 20 23:28:41 2011 +0200
+++ b/SecureMenu.lua	Sat May 21 14:19:33 2011 +0200
@@ -324,7 +324,10 @@
 -- Fill the window and open it
 function A.externalCraftWindow(itemID,superItemID)
 	-- Do not open during combat
-	if InCombatLockdown() then return end
+	if InCombatLockdown() then
+		A.Error(SPELL_FAILED_AFFECTING_COMBAT)		
+		return
+	end
 
 	-- Save the tradeskill
 	A.currentTradeSkill = GetTradeSkillLine()