comparison Profile.lua @ 305:0211bcdfab70 stable

Merge 1.1 beta 12 to stable
author Flick
date Wed, 14 Nov 2012 16:47:27 -0800
parents 0cb6a9944497
children
comparison
equal deleted inserted replaced
294:30c9bdaad7a3 305:0211bcdfab70
1 local _, ns = ... 1 local _, ns = ...
2 local ReAction = ns.ReAction 2 local ReAction = ns.ReAction
3 3
4 ReAction.PROFILEVERSION_LATEST = 2 4 ReAction.PROFILEVERSION_LATEST = 3
5 5
6 ReAction.defaultProfile = { 6 ReAction.defaultProfile = {
7 profile = { 7 profile = {
8 dbversion = nil, 8 dbversion = nil,
9 bars = { }, 9 bars = { },
137 end 137 end
138 138
139 db.profile.dbversion = 2 139 db.profile.dbversion = 2
140 end 140 end
141 141
142
143 if db.profile.dbversion < 3 then
144 -- upgrade to v3
145
146 -- totem multicast bar no longer part of wow
147 local totem = db:GetNamespace("Totem",true)
148 if totem then
149 wipe(totem)
150 end
151
152 -- remove any bars set as totem bars
153 for name, bar in pairs(db.profile.bars) do
154 if bar.type == "Totem" then
155 db.profile.bars[name] = nil
156 end
157 end
158
159 end
160
142 db.profile.dbversion = self.PROFILEVERSION_LATEST 161 db.profile.dbversion = self.PROFILEVERSION_LATEST
143 end 162 end
144 163
145 function ReAction:OnProfileChanged() 164 function ReAction:OnProfileChanged()
146 self:UpgradeProfile() 165 self:UpgradeProfile()