diff Degaine.lua @ 23:44e8394d6982

Revert to disable everything in combat, as spells would mess with everything else
author contrebasse
date Fri, 10 Dec 2010 20:37:09 +0100
parents 4da97c12564f
children 3b1123f50be4
line wrap: on
line diff
--- a/Degaine.lua	Fri Dec 10 19:37:08 2010 +0100
+++ b/Degaine.lua	Fri Dec 10 20:37:09 2010 +0100
@@ -9,17 +9,17 @@
 --     (it's not possible to know if you were sitting or standing before)
 
 --@debug@
-local debug = false
+local debug = true
 --@end-debug@
 
 
 ---------------------------------------------------------------
 -- Globals to local
 ---------------------------------------------------------------
--- These need to be globals
+-- These need to be globals :
 -- GLOBALS: Degaine_ToggleAuto, Degaine_isAuto, BINDING_HEADER_DEGAINE
 
--- It doesn't matter if they are globals
+-- It doesn't matter if they are globals, rarely unsed :
 -- GLOBALS: DEFAULT_CHAT_FRAME
 
 -- Lua functions
@@ -207,8 +207,10 @@
 		t_lastGossipClosed = GetTime()
 
 	elseif event == "PLAYER_REGEN_ENABLED" then
+		--for k,_ in pairs(events1player) do DegaineFrame:UnregisterEvent(k) end
 		desactivate()
 	elseif event == "PLAYER_REGEN_DISABLED" then
+		--for k,_ in pairs(events1player) do DegaineFrame:RegisterEvent(k) end
 		activate()
 
 	elseif event == "ADDON_LOADED" and arg1==AddonName then
@@ -225,6 +227,7 @@
 -- Hook when standing up
 -- (Didn't work, see http://forums.wowace.com/showthread.php?p=310547#post310547)
 hooksecurefunc("SitStandOrDescendStart",start);
+hooksecurefunc("Dismount",start); -- works with GupPet but not with the default interface...
 
 
 ---------------------------------------------------------------