modification of unless
Sidoine De Wispelaere [01-23-09 - 19:18]
modification of unless
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@6 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/Ovale.lua b/Ovale.lua
index a762cef..ea52206 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -530,11 +530,15 @@ function Ovale:CalculerMeilleureAction(element)
self:Print(element.type)
end
local tempsA = Ovale:CalculerMeilleureAction(element.a)
- if (tempsA~=nil) then
+ if (tempsA==0) then
return nil
end
local tempsB = Ovale:CalculerMeilleureAction(element.b)
- return tempsB
+ if (tempsA==nil or tempsA>tempsB) then
+ return tempsB
+ else
+ return nil
+ end
elseif (element.type == "or") then
if (Ovale.trace) then
self:Print(element.type)