From ddc8cefb9c748f4c3b8ff93e84c86e1c18009368 Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Sun, 13 Jul 2014 11:31:52 +0000 Subject: [PATCH] Check that spell costs are positive before requiring them for spells. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1546 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleBestAction.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua index 29d1824..aac04fd 100644 --- a/OvaleBestAction.lua +++ b/OvaleBestAction.lua @@ -266,7 +266,7 @@ local function GetActionSpellInfo(element, state, target) elseif si.combo then -- Spell requires combo points. local cost = state:ComboPointCost(spellId) - if state.combo < cost then + if cost > 0 and state.combo < cost then Ovale:Logf("Spell ID '%s' requires at least %d combo points.", spellId, cost) meetsRequirements = false end @@ -275,7 +275,7 @@ local function GetActionSpellInfo(element, state, target) if si[powerType] then -- Spell requires "secondary" resources, e.g., chi, focus, rage, etc., local cost = state:PowerCost(spellId, powerType) - if state[powerType] < cost then + if cost > 0 and state[powerType] < cost then Ovale:Logf("Spell ID '%s' requires at least %d %s.", spellId, cost, powerType) meetsRequirements = false break -- 1.7.9.5