From 8f64caff9a9bdf1a29fd205180741367e49a7943 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Fri, 15 Nov 2013 19:58:50 +0000 Subject: [PATCH] Start cooldowns in the simulator at the right time for channeled spells. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1180 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleCooldown.lua | 2 +- OvaleRunes.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/OvaleCooldown.lua b/OvaleCooldown.lua index 30e9815..01ba924 100644 --- a/OvaleCooldown.lua +++ b/OvaleCooldown.lua @@ -108,7 +108,7 @@ function OvaleCooldown:ApplySpellAfterCast(state, spellId, startCast, endCast, n if si then local cd = state:GetCD(spellId) if cd then - cd.start = startCast + cd.start = isChanneled and startCast or endCast cd.duration = si.cd or 0 cd.enable = 1 diff --git a/OvaleRunes.lua b/OvaleRunes.lua index 3bd1ef1..32feb8a 100644 --- a/OvaleRunes.lua +++ b/OvaleRunes.lua @@ -201,7 +201,8 @@ function OvaleRunes:ApplySpellAfterCast(state, spellId, startCast, endCast, next for i, name in ipairs(RUNE_NAME) do local count = si[name] or 0 while count > 0 do - state:ConsumeRune(endCast, name) + local attime = isChanneled and startCast or endCast + state:ConsumeRune(atTime, name) count = count - 1 end end -- 1.7.9.5