diff Profile.lua @ 295:0cb6a9944497 1.1 alpha 11 (5.04 bandaid)

Quick hacks for 5.04 - disable hiding VehicleMenuBar frame, whose name changed - GetMultiCastBarOffset() -> GetMultiCastBarIndex()... cleanup before totem bar support is purged - Remove totem bar - fix demon form, vehicle buttons, overridebar buttons (cross fingers) - change possess/vehicle order priority
author Flick
date Tue, 11 Sep 2012 16:50:37 -0700
parents 36a29870bf34
children
line wrap: on
line diff
--- a/Profile.lua	Fri Aug 05 16:27:45 2011 -0700
+++ b/Profile.lua	Tue Sep 11 16:50:37 2012 -0700
@@ -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