Update combo points when the target changes or when the player zones in.
Johnny C. Lam [04-01-13 - 01:39]
Update combo points when the target changes or when the player zones in.
This fixes a bug where having 3 CPs up on one target then switching targets
causes Ovale to assume there are still 3 CPs up on the new target.
Reported by @Erizura in an Ovale rogue forum thread.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@883 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleComboPoints.lua b/OvaleComboPoints.lua
index a556729..d83d8eb 100644
--- a/OvaleComboPoints.lua
+++ b/OvaleComboPoints.lua
@@ -30,14 +30,22 @@ OvaleComboPoints.combo = 0
function OvaleComboPoints:OnEnable()
if OvalePaperDoll.class == "ROGUE" or OvalePaperDoll.class == "DRUID" then
self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
+ self:RegisterEvent("PLAYER_ENTERING_WORLD", "Refresh")
+ self:RegisterEvent("PLAYER_LOGIN", "Refresh")
+ self:RegisterEvent("PLAYER_TARGET_CHANGED", "Refresh")
self:RegisterEvent("UNIT_COMBO_POINTS")
+ self:RegisterEvent("UNIT_TARGET", "UNIT_COMBO_POINTS")
end
end
function OvaleComboPoints:OnDisable()
if OvalePaperDoll.class == "ROGUE" or OvalePaperDoll.class == "DRUID" then
self:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
+ self:UnregisterEvent("PLAYER_ENTERING_WORLD")
+ self:UnregisterEvent("PLAYER_LOGIN")
+ self:UnregisterEvent("PLAYER_TARGET_CHANGED")
self:UnregisterEvent("UNIT_COMBO_POINTS")
+ self:UnregisterEvent("UNIT_TARGET")
end
end