Raise an Ovale event for a spec change to help synchronize modules.
Johnny C. Lam [10-23-13 - 07:19]
Raise an Ovale event for a spec change to help synchronize modules.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1101 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvalePaperDoll.lua b/OvalePaperDoll.lua
index 7250039..d6c3263 100644
--- a/OvalePaperDoll.lua
+++ b/OvalePaperDoll.lua
@@ -383,8 +383,16 @@ function OvalePaperDoll:UpdateDamage(event)
Ovale:DebugPrintf(OVALE_PAPERDOLL_DEBUG, " %s = %f", OVALE_SNAPSHOT_STATS.offHandWeaponDamage, self.stat.offHandWeaponDamage)
end
+function OvalePaperDoll:UpdateSpecialization(event)
+ local newSpecialization = API_GetSpecialization()
+ if self.specialization ~= newSpecialization then
+ self.specialization = newSpecialization
+ self:SendMessage("Ovale_SpecializationChanged", self.specialization)
+ end
+end
+
function OvalePaperDoll:UpdateStats(event)
- self.specialization = API_GetSpecialization()
+ self:UpdateSpecialization(event)
self:COMBAT_RATING_UPDATE(event)
self:MASTERY_UPDATE(event)
self:PLAYER_DAMAGE_DONE_MODS(event, "player")