Back out part of r649 for handling combo points.
Johnny C. Lam [03-02-13 - 17:58]
Back out part of r649 for handling combo points.
Combo points should still be updated in OvaleState to reflect attacks that
have been cast but not yet arrived at their target (either damaging or
missing the target). OvaleComboPoints will update combo points to reflect
"crit combo" events only after the attacks have landed, not after
spellcast.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@711 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleState.lua b/OvaleState.lua
index 79b1ad5..75e068e 100644
--- a/OvaleState.lua
+++ b/OvaleState.lua
@@ -195,29 +195,26 @@ function OvaleState:AddSpellToStack(spellId, startCast, endCast, nextCast, nocd,
end
end
- --[[
- This section is not needed since self.state.combo tracks OvaleComboPoints, which updates
- the number of combo points even before the spell has been "successfully" cast.
-
- --Points de combo
+ -- Combo points
if newSpellInfo.combo then
if newSpellInfo.combo == 0 then
self.state.combo = 0
- else
+ elseif newSpellInfo.combo > 0 then
self.state.combo = self.state.combo + newSpellInfo.combo
if OvaleData.className == "ROGUE" and self:GetAura("player", 121471, true) then
-- Shadow Blades generates an extra combo point.
self.state.combo = self.state.combo + 1
end
- end
- if self.state.combo < 0 then
- self.state.combo = 0
- end
- if self.state.combo > MAX_COMBO_POINTS then
- self.state.combo = MAX_COMBO_POINTS
+ if self.state.combo > MAX_COMBO_POINTS then
+ self.state.combo = MAX_COMBO_POINTS
+ end
+ else -- newSpellInfo.combo < 0
+ self.state.combo = self.state.combo + newSpellInfo.combo
+ if self.state.combo < 0 then
+ self.state.combo = 0
+ end
end
end
- ]]--
--Runes
if newSpellInfo.frost then