Quantcast

bug with eclipse

Sidoine De Wispelaere [11-13-11 - 11:46]
bug with eclipse

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@430 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
Condition.lua
Ovale.lua
diff --git a/Condition.lua b/Condition.lua
index 2c01d59..3fe217c 100644
--- a/Condition.lua
+++ b/Condition.lua
@@ -562,11 +562,7 @@ Ovale.conditions=
 	end,
 	--Compare to eclipse power. <0 lunar, >0 solar
 	Eclipse = function(condition)
-		--if condition.now==1 then
-			return compare(Ovale.state.eclipse, condition[1], condition[2])
-		--else
-		--	return compare(Ovale.state.nextEclipse, condition[1], condition[2])
-		--end
+		return compare(Ovale.state.eclipse, condition[1], condition[2])
 	end,
 	EffectiveMana = function(condition)
 		local limit = GetManaTime(condition[2], true)
diff --git a/Ovale.lua b/Ovale.lua
index 4bb8f07..7662807 100644
--- a/Ovale.lua
+++ b/Ovale.lua
@@ -1460,8 +1460,6 @@ function Ovale:AddSpellToStack(spellId, startCast, endCast, nextCast, nocd)

 	local newSpellInfo = self.spellInfo[spellId]

-	self.state.eclipse = self.state.nextEclipse
-
 	--On enregistre les infos sur le sort en cours
 	self.attenteFinCast = nextCast
 	self.currentSpellId = spellId
@@ -1691,8 +1689,6 @@ function Ovale:InitCalculerMeilleureAction()
 	self.state.mana = UnitPower("player")
 	self.state.shard = UnitPower("player", 7)
 	self.state.eclipse = UnitPower("player", 8)
-	self.state.nextEclipse = self.state.eclipse
-	self.state.nextEclipseTime = self.currentTime
 	self.state.holy = UnitPower("player", 9)
 	if self.className == "DEATHKNIGHT" then
 		for i=1,6 do