From 36b5ac5b58dc2e7aaa1e472e3719af2ca4619a11 Mon Sep 17 00:00:00 2001 From: Taracque Date: Mon, 3 Sep 2012 20:28:06 +0200 Subject: [PATCH] =?UTF-8?q?Added=20more=20Runic=20Power=20checks=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DKCrutch.lua | 17 ++++++++++++----- DKCrutch.toc | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/DKCrutch.lua b/DKCrutch.lua index b143642..89f288d 100644 --- a/DKCrutch.lua +++ b/DKCrutch.lua @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- DKCrutch 0.5.3 +-- DKCrutch 0.5.4 -- -- Death Knight rune tracker and ability advisor ------------------------------------------------------------------------------- @@ -8,7 +8,7 @@ DKCrutch = {Locals = {}} local L = DKCrutch.Locals -DKCrutch.versionNumber = '0.5.3' +DKCrutch.versionNumber = '0.5.4' DKCrutch.talent = "" DKCrutch.isEnabled = false DKCrutch.talentUnsure = true @@ -631,7 +631,10 @@ function DKCrutch:AdviseFrostAbility() -- Frost Strike if Killing Machine Procs local fscd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Frost Strike"]) if (fscd) and (fscd <= 1) and (DKCrutch:hasBuff("player", DKCrutch.SpellList["Killing Machine"])) then - return "Frost Strike" + local _, _, _, cost = GetSpellInfo(DKCrutch.SpellList["Frost Strike"]) + if (UnitPower("player", 6) >= cost) then + return "Frost Strike" + end end -- Obliterate if 2 death/unholy runes are up and Killing Machine Procs @@ -778,9 +781,13 @@ function DKCrutch:AdviseUnholyAbility() -- Death coil if Sudden Doom proc, or runic power > 90 local dccd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Death Coil"]) + local _, _, _, cost = GetSpellInfo(DKCrutch.SpellList["Death Coil"]) if (dccd) and (dccd <= 1) and ( - (DKCrutch:hasBuff("player", DKCrutch.SpellList["Sudden Doom"])) or - (UnitPower("player", 6) > 90) + ( + (DKCrutch:hasBuff("player", DKCrutch.SpellList["Sudden Doom"])) and + (UnitPower("player", 6) >= cost) + ) + or (UnitPower("player", 6) > 90) ) then return "Death Coil" end diff --git a/DKCrutch.toc b/DKCrutch.toc index fa099b1..534fca7 100644 --- a/DKCrutch.toc +++ b/DKCrutch.toc @@ -2,7 +2,7 @@ ## Title: DKCrutch ## Notes: Death Knight rune tracker and rotation helper ## Author: Taracque, Dšgrov‡s of Arathor -## Version: 0.5.3 +## Version: 0.5.4 ## SavedVariables: DKCrutchDB ## OptionalDeps: ## Dependencies: -- 1.7.9.5