# HG changeset patch # User contrebasse # Date 1298838250 -3600 # Node ID f861e1c0535bfc3154f40d451639cb3c317e4dec # Parent f50094e780739f2c687994aa8361d61866464479 Take into account that sheathing while drawing doesn't actually sheath diff -r f50094e78073 -r f861e1c0535b Degaine.lua --- a/Degaine.lua Sun Feb 27 20:44:53 2011 +0100 +++ b/Degaine.lua Sun Feb 27 21:24:10 2011 +0100 @@ -53,6 +53,7 @@ local t_lastGossipClosed = 0 --local wasMounted = IsMounted() -- handle mounts with UNIT_AURA local isTradeSkill = false +local t_lastDegaine = 0 -- Time of the last draw --------------------------------------------------------------- @@ -76,6 +77,7 @@ if t_left<=0 then ToggleSheath() DegaineFrame:SetScript("OnUpdate", nil) + t_lastDegaine = GetTime() end end local start = function(arg_delay) @@ -84,7 +86,7 @@ --DEFAULT_CHAT_FRAME:AddMessage("Go !") --@end-debug@ - if Degaine_isAuto and not InCombatLockdown() then + if Degaine_isAuto and (GetTime()-t_lastDegaine)>1 and not InCombatLockdown() then t_left = arg_delay or delay DegaineFrame:SetScript("OnUpdate", Degaine_OnUpdate) end