Quantcast

Fix the time the a spell is ready if it requires runes that are on CD.

Johnny C. Lam [05-08-14 - 17:26]
Fix the time the a spell is ready if it requires runes that are on CD.

state:GetRunesCooldown() returns the number of seconds before all of the
rune conditions are met, so the actual time that the spell is ready is at
state.currentTime + state:GetRunesCooldown().

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1397 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleBestAction.lua
diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua
index fcf1240..fac8f31 100644
--- a/OvaleBestAction.lua
+++ b/OvaleBestAction.lua
@@ -789,7 +789,7 @@ function OvaleBestAction:GetActionInfo(element, state)

 				if si.blood or si.frost or si.unholy or si.death then
 					-- Spell requires runes.
-					local runecd = state:GetRunesCooldown(si.blood, si.unholy, si.frost, si.death, false)
+					local runecd = state.currentTime + state:GetRunesCooldown(si.blood, si.unholy, si.frost, si.death, false)
 					if runecd > actionCooldownStart + actionCooldownDuration then
 						actionCooldownDuration = runecd - actionCooldownStart
 					end