From 397df0a270eab73eae5968eeb9461e4a2020c11f Mon Sep 17 00:00:00 2001 From: Sidoine De Wispelaere Date: Sun, 17 Jan 2010 12:48:22 +0000 Subject: [PATCH] - priest: VT can be multidoted - Mana: better prediction for energy git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@204 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- Condition.lua | 9 ++++++++- defaut/Pretre.lua | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Condition.lua b/Condition.lua index 25a408a..e29d0da 100644 --- a/Condition.lua +++ b/Condition.lua @@ -189,10 +189,17 @@ local function nilstring(text) end end +local lastEnergyValue = nil +local lastEnergyTime + local function GetManaTime(mana, withBerserker) local _,className = UnitClass("player") if (className == "ROGUE" or (className == "DRUID" and GetShapeshiftForm(true) == 3)) then local current = Ovale.state.mana + if current~=lastEnergyValue then + lastEnergyValue = current + lastEnergyTime = Ovale.currentTime + end local rate= 10 if (className == "ROGUE") then local rush = Ovale:GetSpellInfoOrNil(13750) @@ -205,7 +212,7 @@ local function GetManaTime(mana, withBerserker) mana = mana/2 end end - local limit = math.ceil((mana - current) / rate + Ovale.currentTime) + local limit = math.ceil((mana - lastEnergyValue) / rate + lastEnergyTime) return limit else if Ovale.state.mana>=mana then diff --git a/defaut/Pretre.lua b/defaut/Pretre.lua index 5108e20..2dde6a0 100644 --- a/defaut/Pretre.lua +++ b/defaut/Pretre.lua @@ -64,7 +64,7 @@ if BuffPresent(SW stacks=5) and TargetDebuffExpires(SWP 0 mine=1) and TargetDead } #Refresh VT -unless CheckBoxOn(multidot) and OtherDebuffPresent(VT) +unless CheckBoxOn(multidot) { if TargetDebuffExpires(VT 1 mine=1 haste=spell) and TargetDeadIn(more 8) Spell(VT) -- 1.7.9.5