From facbc953f6ac7b1c87c22f07aafab1a1f5ff78cd Mon Sep 17 00:00:00 2001 From: "Johnny C. Lam" Date: Sun, 10 Nov 2013 00:29:43 +0000 Subject: [PATCH] Allow for combo-point finishers to specify the minimum CPs required. Combo-point finishers are tagged as combo=0 in SpellInfo(), and Ovale does extra processing for CP finishers to keep track of their state. However, some finishers can be cast with no CPs, e.g., glyphed Savage Roar. git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1138 d5049fe3-3747-40f7-a4b5-f36d6801af5f --- OvaleBestAction.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/OvaleBestAction.lua b/OvaleBestAction.lua index 9890f89..2311a13 100644 --- a/OvaleBestAction.lua +++ b/OvaleBestAction.lua @@ -685,9 +685,12 @@ function OvaleBestAction:GetActionInfo(element) -- Spell requires a stance that player is not in. return nil end - if si.combo == 0 and OvaleState.state.combo == 0 then - -- Spell is a combo point finisher, but player has no combo points on the target. - return nil + if si.combo == 0 then + local minCombo = si.minCombo or 1 + if OvaleState.state.combo < minCombo then + -- Spell is a combo point finisher, but player has too few combo points on the target. + return nil + end end for _, powerType in pairs(OvalePower.SECONDARY_POWER) do if si[powerType] and si[powerType] > OvaleState.state[powerType] then -- 1.7.9.5