Quantcast

Allow for combo-point finishers to specify the minimum CPs required.

Johnny C. Lam [11-10-13 - 00:29]
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
Filename
OvaleBestAction.lua
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