diff 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
line wrap: on
line diff
--- a/Profile.lua	Fri Aug 05 16:28:13 2011 -0700
+++ b/Profile.lua	Wed Nov 14 16:47:27 2012 -0800
@@ -1,7 +1,7 @@
 local _, ns = ...
 local ReAction = ns.ReAction
 
-ReAction.PROFILEVERSION_LATEST = 2
+ReAction.PROFILEVERSION_LATEST = 3
 
 ReAction.defaultProfile = { 
   profile = {
@@ -139,6 +139,25 @@
     db.profile.dbversion = 2
   end
 
+
+  if db.profile.dbversion < 3 then
+    -- upgrade to v3
+
+    -- totem multicast bar no longer part of wow
+    local totem = db:GetNamespace("Totem",true)
+    if totem then
+      wipe(totem)
+    end
+
+    -- remove any bars set as totem bars
+    for name, bar in pairs(db.profile.bars) do
+      if bar.type == "Totem" then
+        db.profile.bars[name] = nil
+      end
+    end
+
+  end
+
   db.profile.dbversion = self.PROFILEVERSION_LATEST
 end