WoWInterface SVN NightWatch

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 8 to Rev 9
    Reverse comparison

Rev 8 → Rev 9

NightWatch.lua
604,13 → 604,27
end
 
function addon:upgrade()
-- Upgrade database from previous version
-- Remove obsolete sink data from previous versions (=<0.7)
if db.sinkStorage1 then
db.sinkStorage1 = nil
end
if db.sinkStorage2 then
db.sinkStorage2 = nil
end
if db.sinkStorage3 then
db.sinkStorage3 = nil
end
if db.sinkStorage4 then
db.sinkStorage4 = nil
end
 
-- Upgrade data format from previous versions (=<0.6)
if not db.spell then return end
Print("Upgrading database")
local keys = { chat = true, chatTarget = true, whisper = true, whisperTarget = true }
db.spells = addon:deepcopy(db.spell)
for k,_ in pairs(db.spell) do
Print(" Checking: " .. k)
Print(" Importing: " .. k)
for key,_ in pairs(keys) do
if not db.spell[k].msgFormat[key] then
db.spells[k].msgFormat[key] = addon:deepcopy(db.customMsgFormat[key])
NightWatch.toc
2,7 → 2,7
## Title: NightWatch
## Notes: Sends chat alerts for selected spells. "/nw" for config.
## Author: Nightyniight @ Frostmourne - US
## Version: 0.8
## Version: 0.9
## DefaultState: Enabled
## LoadOnDemand: 0
## SavedVariables: NightWatchDB