Johnny C. Lam [11-10-13 - 00:31]
diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua
index 1d5a61e..c1a11d6 100644
--- a/OvaleBestAction.lua
+++ b/OvaleBestAction.lua
@@ -125,14 +125,14 @@ local function ComputeAction(element)
start = OvaleState.currentTime
end
- Ovale:Logf("start=%f attenteFinCast=%s [%d]", start, OvaleState.attenteFinCast, element.nodeId)
+ Ovale:Logf("start=%f nextCast=%s [%d]", start, OvaleState.nextCast, element.nodeId)
-- If the action is available before the end of the current spellcast, then wait until we can first cast the action.
- if start < OvaleState.attenteFinCast then
+ if start < OvaleState.nextCast then
local si = OvaleState.currentSpellId and OvaleData.spellInfo[OvaleState.currentSpellId]
if not (si and si.canStopChannelling) then
-- not a channelled spell, or a channelled spell that cannot be interrupted
- start = OvaleState.attenteFinCast
+ start = OvaleState.nextCast
else
-- This is a channelled spell that can be interrupted, so wait till the next tick.
-- "canStopChannelling=N" means that there are N total ticks in the channelled spell.
@@ -145,7 +145,7 @@ local function ComputeAction(element)
scaling = 1
end
numTicks = floor(si.canStopChannelling * scaling + 0.5)
- local tick = (OvaleState.attenteFinCast - OvaleState.startCast) / numTicks
+ local tick = (OvaleState.nextCast - OvaleState.startCast) / numTicks
local tickTime = OvaleState.startCast + tick
Ovale:Logf("%s start=%f", spellId, start)
for i = 1, numTicks do
diff --git a/OvaleFrame.lua b/OvaleFrame.lua
index 20ddf2d..1ea2b5e 100644
--- a/OvaleFrame.lua
+++ b/OvaleFrame.lua
@@ -218,8 +218,8 @@ do
end
end
-- Dans le cas de canStopChannelling, on risque de demander d'interrompre le channelling courant, ce qui est stupide
- if start and OvaleState.currentSpellId and OvaleState.attenteFinCast and spellId == OvaleState.currentSpellId and start<OvaleState.attenteFinCast then
- start = OvaleState.attenteFinCast
+ if start and OvaleState.currentSpellId and OvaleState.nextCast and spellId == OvaleState.currentSpellId and start < OvaleState.nextCast then
+ start = OvaleState.nextCast
end
if (node.params.nocd and start~=nil and OvaleState.now<start-node.params.nocd) then
icons[1]:Update(element, nil)
diff --git a/OvaleIcone.lua b/OvaleIcone.lua
index 2d31216..7c1e43a 100644
--- a/OvaleIcone.lua
+++ b/OvaleIcone.lua
@@ -97,8 +97,9 @@ local function Update(self, element, minAttente, actionTexture, actionInRange, a
end
local red
- if (minAttente > actionCooldownStart + actionCooldownDuration + 0.01 and minAttente > OvaleState.now
- and minAttente>OvaleState.attenteFinCast) then
+ if minAttente > actionCooldownStart + actionCooldownDuration + 0.01
+ and minAttente > OvaleState.now
+ and minAttente > OvaleState.nextCast then
self.icone:SetVertexColor(0.75,0.2,0.2)
red = true
else
diff --git a/OvaleState.lua b/OvaleState.lua
index efe2f55..c340c8e 100644
--- a/OvaleState.lua
+++ b/OvaleState.lua
@@ -62,7 +62,7 @@ OvaleState.powerRate = nil
OvaleState.currentSpellId = nil
OvaleState.now = nil
OvaleState.currentTime = nil
-OvaleState.attenteFinCast = nil
+OvaleState.nextCast = nil
OvaleState.startCast = nil
OvaleState.endCast = nil
OvaleState.gcd = 1.5
@@ -146,7 +146,7 @@ function OvaleState:Reset()
self.currentTime = self.now
Ovale:Logf("Reset state with current time = %f", self.currentTime)
self.currentSpellId = nil
- self.attenteFinCast = self.now
+ self.nextCast = self.now
self:InvokeMethod("ResetState")
@@ -191,7 +191,7 @@ function OvaleState:ApplySpell(spellId, startCast, endCast, nextCast, nocd, targ
end
-- Update the latest spell cast in the simulator.
- self.attenteFinCast = nextCast
+ self.nextCast = nextCast
self.currentSpellId = spellId
self.startCast = startCast
self.endCast = endCast
@@ -206,7 +206,7 @@ function OvaleState:ApplySpell(spellId, startCast, endCast, nextCast, nocd, targ
self.currentTime = self.now
end
- Ovale:Logf("Apply spell %d at %f currentTime=%f nextCast=%f endCast=%f targetGUID=%s", spellId, startCast, self.currentTime, self.attenteFinCast, endCast, targetGUID)
+ Ovale:Logf("Apply spell %d at %f currentTime=%f nextCast=%f endCast=%f targetGUID=%s", spellId, startCast, self.currentTime, self.nextCast, endCast, targetGUID)
--[[
Apply the effects of the spellcast in three phases.