From 983b534278d1178c8b0527f159b5557cf8a8f1a9 Mon Sep 17 00:00:00 2001 From: Taracque Date: Mon, 20 Oct 2014 14:50:07 +0200 Subject: [PATCH] Fixed Death Coil and Frost Strike cost watching --- DKCrutch.lua | 23 ++++++++--------------- DKCrutch.toc | 2 +- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/DKCrutch.lua b/DKCrutch.lua index 6fcbf44..57938db 100755 --- a/DKCrutch.lua +++ b/DKCrutch.lua @@ -1,5 +1,5 @@ ------------------------------------------------------------------------------- --- DKCrutch 1.0.0 +-- DKCrutch 1.0.1 -- -- Death Knight rune tracker and ability advisor ------------------------------------------------------------------------------- @@ -8,7 +8,7 @@ DKCrutch = {Locals = {}} local L = DKCrutch.Locals -DKCrutch.versionNumber = '1.0.0' +DKCrutch.versionNumber = '1.0.1' DKCrutch.talent = "" DKCrutch.talentUnsure = true DKCrutch.DebugMode = false @@ -737,8 +737,7 @@ function DKCrutch:AdviseBloodAbility() -- Death Coil if has enough runic power local dccd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Death Coil"]) - local _, _, _, cost = GetSpellInfo(DKCrutch.SpellList["Death Coil"]) - if (dccd) and (dccd <= 1) and (UnitPower("player", 6) > cost) then + if (dccd) and (dccd <= 1) and (UnitPower("player", 6) > 30) then return "Death Coil" end @@ -838,8 +837,7 @@ function DKCrutch:AdviseFrostAbilityDW() -- Frost DK DualWield priority -- Frost Strike if Killing Machine Procs OR Runic Power >= 90 local fscd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Frost Strike"]) if (fscd) and (fscd <= 1) and (DKCrutch:hasBuff("player", DKCrutch.SpellList["Killing Machine"]) or (UnitPower("player", 6) >= 90)) then - local _, _, _, cost = GetSpellInfo(DKCrutch.SpellList["Frost Strike"]) - if (UnitPower("player", 6) >= cost) then + if (UnitPower("player", 6) >= 40) then return "Frost Strike" end end @@ -868,8 +866,7 @@ function DKCrutch:AdviseFrostAbilityDW() -- Frost DK DualWield priority -- Frost Strike if (fscd) and (fscd <= 1) and (IsUsableSpell(DKCrutch.SpellList["Frost Strike"])) then - local _, _, _, cost = GetSpellInfo(DKCrutch.SpellList["Frost Strike"]) - if (UnitPower("player", 6) >= cost) then + if (UnitPower("player", 6) >= 40) then return "Frost Strike" end end @@ -972,8 +969,7 @@ function DKCrutch:AdviseFrostAbility() -- Frost Strike local fscd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Frost Strike"]) if (fscd) and (fscd <= 1) then - local _, _, _, cost = GetSpellInfo(DKCrutch.SpellList["Frost Strike"]) - if (UnitPower("player", 6) >= cost) then + if (UnitPower("player", 6) >= 40) then return "Frost Strike" end end @@ -1058,7 +1054,6 @@ function DKCrutch:AdviseUnholyAbility() -- Death Coil if runic power>90 local dccd = DKCrutch:GetSpellCooldownRemaining(DKCrutch.SpellList["Death Coil"]) - local _, _, _, cost = GetSpellInfo(DKCrutch.SpellList["Death Coil"]) if (dccd) and (dccd <= 1) and (UnitPower("player", 6) > 90) then return "Death Coil" end @@ -1091,11 +1086,10 @@ 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"])) and - (UnitPower("player", 6) >= cost) + (UnitPower("player", 6) >= 30) ) or (UnitPower("player", 6) > 90) ) then @@ -1123,8 +1117,7 @@ function DKCrutch:AdviseUnholyAbility() -- Death Coil if (dscd) and (dccd <= 1) and (IsUsableSpell(DKCrutch.SpellList["Death Coil"])) then - local _, _, _, cost = GetSpellInfo(DKCrutch.SpellList["Death Coil"]) - if (UnitPower("player", 6) >= cost) then + if (UnitPower("player", 6) >= 30) then return "Death Coil" end end diff --git a/DKCrutch.toc b/DKCrutch.toc index 2279642..15b3abd 100755 --- 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: 1.0.0 +## Version: 1.0.1 ## SavedVariables: DKCrutchDB ## OptionalDeps: ## Dependencies: -- 1.7.9.5