Stash the player's class into the state machine via OvalePaperDoll.
Johnny C. Lam [04-06-14 - 18:48]
Stash the player's class into the state machine via OvalePaperDoll.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1287 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvalePaperDoll.lua b/OvalePaperDoll.lua
index 2b453db..94c941a 100644
--- a/OvalePaperDoll.lua
+++ b/OvalePaperDoll.lua
@@ -535,6 +535,8 @@ local statePrototype = OvalePaperDoll.statePrototype
--</private-static-properties>
--<state-properties>
+-- Player's class.
+statePrototype.class = nil
-- Player's level.
statePrototype.level = nil
-- Player's chosen specialization/mastery.
@@ -546,6 +548,7 @@ statePrototype.snapshot = nil
--<public-static-methods>
-- Initialize the state.
function OvalePaperDoll:InitializeState(state)
+ state.class = nil
state.level = nil
state.specialization = nil
state.snapshot = nil
@@ -553,6 +556,7 @@ end
-- Reset the state to the current conditions.
function OvalePaperDoll:ResetState(state)
+ state.class = self_class
state.level = self.level
state.specialization = self.specialization
local now = API_GetTime()