From 6c33e59560f65860c419a1b81e8a286f3c230f0a Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Fri, 23 Jan 2009 19:18:58 +0000 Subject: [PATCH] modification of unless git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@6 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Ovale.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 1.7.9.5