Dungeon Tools

Dungeon Tools

32.8k Downloads

Global namespace polluting

Dairyman opened this issue ยท 2 comments

commented

mdtDB, oldPresetLen, newPresetLen, and currentIdx should be local.

mdtDb = LibStub("AceDB-3.0"):New("MythicDungeonToolsDB", defaultSavedVars).global
for dungeonIdx,presets in pairs(mdtDb.presets) do
if not db.presets[dungeonIdx] then
db.presets[dungeonIdx] = {}
end
oldPresetLen = #db.presets[dungeonIdx]
newPresetLen = #presets
-- Quick hack
db.presets[dungeonIdx][newPresetLen] = MDT:DeepCopy(db.presets[dungeonIdx][oldPresetLen])
currentIdx = oldPresetLen

commented

Will fix tomorrow. Sorry about that

commented

Released in 1.1.11!