Mercurial > wow > reaction
comparison Profile.lua @ 215:258ca67bde4a
Fix upgrade script to not throw errors on profile swap
| author | Flick <flickerstreak@gmail.com> |
|---|---|
| date | Fri, 19 Nov 2010 14:33:11 -0800 |
| parents | 8ba8ab8bf6dd |
| children | a4e7475633b3 |
comparison
equal
deleted
inserted
replaced
| 214:8bf038a5edea | 215:258ca67bde4a |
|---|---|
| 25 | 25 |
| 26 -- (1) remove unused defaultBars table (cleanup) | 26 -- (1) remove unused defaultBars table (cleanup) |
| 27 db.profile.defaultBars = nil | 27 db.profile.defaultBars = nil |
| 28 | 28 |
| 29 -- (2) HideBlizzard is no longer a module | 29 -- (2) HideBlizzard is no longer a module |
| 30 local hb = db:RegisterNamespace("HideBlizzard") | 30 local hb = db:GetNamespace("HideBlizzard",true) or db:RegisterNamespace("HideBlizzard") |
| 31 if hb then | 31 if hb then |
| 32 db.profile.options.hideBlizzardBars = hb.profile.hide | 32 db.profile.options.hideBlizzardBars = hb.profile.hide |
| 33 db.profile.options.hideBlizzardVehicleBar = hb.profile.hideVehicle | 33 db.profile.options.hideBlizzardVehicleBar = hb.profile.hideVehicle |
| 34 hb:ResetProfile() | 34 hb:ResetProfile() |
| 35 end | 35 end |
| 36 | 36 |
| 37 -- (3) LBF is no longer a module | 37 -- (3) LBF is no longer a module |
| 38 local bf = db:RegisterNamespace("ButtonFacade") | 38 local bf = db:GetNamespace("ButtonFacade",true) or db:RegisterNamespace("ButtonFacade") |
| 39 if bf then | 39 if bf then |
| 40 for name, bar in pairs(db.profile.bars) do | 40 for name, bar in pairs(db.profile.bars) do |
| 41 bar.ButtonFacade = bf.profile[name] or bar.ButtonFacade | 41 bar.ButtonFacade = bf.profile[name] or bar.ButtonFacade |
| 42 end | 42 end |
| 43 bf:ResetProfile() | 43 bf:ResetProfile() |
