Quantcast

terrible bug with "or"

Sidoine De Wispelaere [12-06-09 - 15:46]
terrible bug with "or"

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@158 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Ovale.lua
Ovale.toc
diff --git a/Ovale.lua b/Ovale.lua
index 5dae2b3..feb0958 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -1318,6 +1318,18 @@ function Ovale:CalculerMeilleureAction(element)

 		local startA, endA = Ovale:CalculerMeilleureAction(element.a)
 		local startB, endB = Ovale:CalculerMeilleureAction(element.b)
+		if isBefore(endA,self.currentTime) then
+			return startB,endB
+		elseif isBefore(endB,self.currentTime) then
+			return startA,endA
+		end
+
+		if isBefore(endA,startB) then
+			return startA,endA
+		elseif isBefore(endB,startA) then
+			return startB,endB
+		end
+
 		if isBefore(startA, startB) then
 			startB = startA
 		end
diff --git a/Ovale.toc b/Ovale.toc
index deab059..c68b6e0 100644
--- a/Ovale.toc
+++ b/Ovale.toc
@@ -3,7 +3,7 @@
 ## Notes: Show the icon of the next spell to cast
 ## Notes-frFR: Affiche l'icône du prochain sort à lancer
 ## Author: Sidoine
-## Version: 3.2.24
+## Version: 3.2.25
 ## OptionalDeps: Ace3, ButtonFacade, Recount
 ## SavedVariables: OvaleDB
 ## SavedVariablesPerCharacter: OvaleDBPC