Mercurial > wow > askmrrobot
comparison Core.lua @ 110:5021d5125484 v51
Added Tomb of Sargeras to auto-logging.
author | yellowfive |
---|---|
date | Wed, 14 Jun 2017 21:00:53 -0700 |
parents | b8e9664d3229 |
children | f1da233629be |
comparison
equal
deleted
inserted
replaced
109:21580b222a57 | 110:5021d5125484 |
---|---|
110 RankingString = nil -- last ranking string imported, kept around for efficient serialization | 110 RankingString = nil -- last ranking string imported, kept around for efficient serialization |
111 } | 111 } |
112 } | 112 } |
113 } | 113 } |
114 | 114 |
115 -- set defaults for auto-logging | 115 Amr.db = LibStub("AceDB-3.0"):New("AskMrRobotDb3", defaults) |
116 | |
117 -- set defaults for auto logging; if a new zone is added and some other stuff was turned on, turn on the new zone too | |
118 local hasSomeLogging = false | |
119 local addedLogging = {} | |
116 for i, instanceId in ipairs(Amr.InstanceIdsOrdered) do | 120 for i, instanceId in ipairs(Amr.InstanceIdsOrdered) do |
117 local byDiff = defaults.profile.Logging.Auto[instanceId] | 121 local byDiff = Amr.db.profile.Logging.Auto[instanceId] |
118 if not byDiff then | 122 if not byDiff then |
119 byDiff = {} | 123 byDiff = {} |
120 defaults.profile.Logging.Auto[instanceId] = byDiff | 124 Amr.db.profile.Logging.Auto[instanceId] = byDiff |
125 addedLogging[instanceId] = byDiff | |
121 end | 126 end |
122 | 127 |
123 for k, difficultyId in pairs(Amr.Difficulties) do | 128 for k, difficultyId in pairs(Amr.Difficulties) do |
124 if byDiff[difficultyId] == nil then | 129 if not byDiff[difficultyId] then |
125 byDiff[difficultyId] = false | 130 byDiff[difficultyId] = false |
126 end | 131 else |
127 end | 132 hasSomeLogging = true |
128 end | 133 end |
129 | 134 end |
130 Amr.db = LibStub("AceDB-3.0"):New("AskMrRobotDb3", defaults) | 135 end |
136 | |
137 if hasSomeLogging then | |
138 for instanceId, byDiff in pairs(addedLogging) do | |
139 for k, difficultyId in pairs(Amr.Difficulties) do | |
140 byDiff[difficultyId] = true | |
141 end | |
142 end | |
143 end | |
144 | |
131 | 145 |
132 Amr.db.RegisterCallback(Amr, "OnProfileChanged", "RefreshConfig") | 146 Amr.db.RegisterCallback(Amr, "OnProfileChanged", "RefreshConfig") |
133 Amr.db.RegisterCallback(Amr, "OnProfileCopied", "RefreshConfig") | 147 Amr.db.RegisterCallback(Amr, "OnProfileCopied", "RefreshConfig") |
134 Amr.db.RegisterCallback(Amr, "OnProfileReset", "RefreshConfig") | 148 Amr.db.RegisterCallback(Amr, "OnProfileReset", "RefreshConfig") |
135 end | 149 end |