Skip to content

Commit

Permalink
'Update'
Browse files Browse the repository at this point in the history
  • Loading branch information
BloodDragon2580 committed Aug 27, 2024
1 parent 85206b4 commit 2f8fdb0
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 8 deletions.
39 changes: 38 additions & 1 deletion MythicPlusDrop/Libs/AceDB-3.0/AceDB-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
-- @class file
-- @name AceDB-3.0.lua
-- @release $Id$
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 29
local ACEDB_MAJOR, ACEDB_MINOR = "AceDB-3.0", 30
local AceDB = LibStub:NewLibrary(ACEDB_MAJOR, ACEDB_MINOR)

if not AceDB then return end -- No upgrade needed
Expand Down Expand Up @@ -525,6 +525,17 @@ function DBObjectLib:DeleteProfile(name, silent)
end
end

-- remove from unloaded namespaces
if self.sv.namespaces then
for nsname, data in pairs(self.sv.namespaces) do
if self.children and self.children[nsname] then
-- already a mapped namespace
elseif data.profiles then
data.profiles[name] = nil
end
end
end

-- switch all characters that use this profile back to the default
if self.sv.profileKeys then
for key, profile in pairs(self.sv.profileKeys) do
Expand Down Expand Up @@ -570,6 +581,20 @@ function DBObjectLib:CopyProfile(name, silent)
end
end

-- copy unloaded namespaces
if self.sv.namespaces then
for nsname, data in pairs(self.sv.namespaces) do
if self.children and self.children[nsname] then
-- already a mapped namespace
elseif data.profiles then
-- reset the current profile
data.profiles[self.keys.profile] = {}
-- copy data
copyTable(data.profiles[name], data.profiles[self.keys.profile])
end
end
end

-- Callback: OnProfileCopied, database, sourceProfileKey
self.callbacks:Fire("OnProfileCopied", self, name)
end
Expand All @@ -596,6 +621,18 @@ function DBObjectLib:ResetProfile(noChildren, noCallbacks)
end
end

-- reset unloaded namespaces
if self.sv.namespaces and not noChildren then
for nsname, data in pairs(self.sv.namespaces) do
if self.children and self.children[nsname] then
-- already a mapped namespace
elseif data.profiles then
-- reset the current profile
data.profiles[self.keys.profile] = nil
end
end
end

-- Callback: OnProfileReset, database
if not noCallbacks then
self.callbacks:Fire("OnProfileReset", self)
Expand Down
14 changes: 7 additions & 7 deletions MythicPlusDrop/MythicPlusDrop.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 110002
## Title: |cffd6266cMythicPlusDrop|r
## Version: 8.8
## Version: 8.9
## Notes: Info for Mythic Dungeons
## Author: BloodDragon2580
## SavedVariables: MythicPlusDrop_Config, MythicPlusDrop_Data
Expand All @@ -14,9 +14,9 @@ Core.lua
Locale.lua
Config.lua

ObjectiveTracker.lua
ProgressTracker.lua
Keystone.lua
Gossip.lua
Splits.lua
Schedule.lua
module\ObjectiveTracker.lua
module\ProgressTracker.lua
module\Keystone.lua
module\Gossip.lua
module\Splits.lua
module\Schedule.lua
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 2f8fdb0

Please sign in to comment.