changeset 110:5021d5125484 v51

Added Tomb of Sargeras to auto-logging.
author yellowfive
date Wed, 14 Jun 2017 21:00:53 -0700
parents 21580b222a57
children 2f78f6c96183
files AskMrRobot-Serializer/AskMrRobot-Serializer.lua AskMrRobot.toc Constants.lua Core.lua localization/enUS.lua localization/frFR.lua localization/itIT.lua localization/ruRU.lua
diffstat 8 files changed, 35 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/AskMrRobot-Serializer/AskMrRobot-Serializer.lua	Thu Mar 30 23:41:46 2017 -0700
+++ b/AskMrRobot-Serializer/AskMrRobot-Serializer.lua	Wed Jun 14 21:00:53 2017 -0700
@@ -1,7 +1,7 @@
 -- AskMrRobot-Serializer will serialize and communicate character data between users.
 -- This is used primarily to associate character information to logs uploaded to askmrrobot.com.
 
-local MAJOR, MINOR = "AskMrRobot-Serializer", 50
+local MAJOR, MINOR = "AskMrRobot-Serializer", 51
 local Amr, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
 if not Amr then return end -- already loaded by something else
@@ -149,14 +149,16 @@
 Amr.InstanceIds = {
 	EmeraldNightmare = 1520,
 	Nighthold = 1530,
-	TrialOfValor = 1648
+	TrialOfValor = 1648,
+	TombOfSargeras = 1676
 }
 
 -- instances that AskMrRobot currently supports logging for
 Amr.SupportedInstanceIds = {
 	[1520] = true,
 	[1530] = true,
-	[1648] = true
+	[1648] = true,
+	[1676] = true
 }
 
 -- just to make life easier, maps ID of each artifact weapon to the spec number (1-4)
--- a/AskMrRobot.toc	Thu Mar 30 23:41:46 2017 -0700
+++ b/AskMrRobot.toc	Wed Jun 14 21:00:53 2017 -0700
@@ -1,7 +1,7 @@
 ## Interface: 70200
 ## Title: Ask Mr. Robot
 ## Author: Team Robot, Inc.
-## Version: 50
+## Version: 51
 ## Notes: Gear import/export, combat logging, and more.
 ## URL: www.askmrrobot.com
 ## SavedVariables: AskMrRobotDb3
--- a/Constants.lua	Thu Mar 30 23:41:46 2017 -0700
+++ b/Constants.lua	Wed Jun 14 21:00:53 2017 -0700
@@ -107,7 +107,7 @@
 }
 
 -- instance IDs ordered in preferred display order
-Amr.InstanceIdsOrdered = { 1520, 1530, 1648 }
+Amr.InstanceIdsOrdered = { 1520, 1530, 1676, 1648 }
 
 Amr.Difficulties = {
 	Lfr = 17,
--- a/Core.lua	Thu Mar 30 23:41:46 2017 -0700
+++ b/Core.lua	Wed Jun 14 21:00:53 2017 -0700
@@ -112,22 +112,36 @@
 		}
 	}
 	
-	-- set defaults for auto-logging
+	Amr.db = LibStub("AceDB-3.0"):New("AskMrRobotDb3", defaults)
+	
+	-- set defaults for auto logging; if a new zone is added and some other stuff was turned on, turn on the new zone too
+	local hasSomeLogging = false
+	local addedLogging = {}
 	for i, instanceId in ipairs(Amr.InstanceIdsOrdered) do
-		local byDiff = defaults.profile.Logging.Auto[instanceId]
+		local byDiff = Amr.db.profile.Logging.Auto[instanceId]
 		if not byDiff then
 			byDiff = {}
-			defaults.profile.Logging.Auto[instanceId] = byDiff
+			Amr.db.profile.Logging.Auto[instanceId] = byDiff
+			addedLogging[instanceId] = byDiff
 		end
 		
 		for k, difficultyId in pairs(Amr.Difficulties) do
-			if byDiff[difficultyId] == nil then
+			if not byDiff[difficultyId] then
 				byDiff[difficultyId] = false
+			else
+				hasSomeLogging = true
 			end
 		end
 	end
 	
-	Amr.db = LibStub("AceDB-3.0"):New("AskMrRobotDb3", defaults)
+	if hasSomeLogging then		
+		for instanceId, byDiff in pairs(addedLogging) do
+			for k, difficultyId in pairs(Amr.Difficulties) do
+				byDiff[difficultyId] = true
+			end
+		end
+	end
+	
 	
 	Amr.db.RegisterCallback(Amr, "OnProfileChanged", "RefreshConfig")
 	Amr.db.RegisterCallback(Amr, "OnProfileCopied", "RefreshConfig")
--- a/localization/enUS.lua	Thu Mar 30 23:41:46 2017 -0700
+++ b/localization/enUS.lua	Wed Jun 14 21:00:53 2017 -0700
@@ -87,7 +87,8 @@
 L.InstanceNames = {
 	[1520] = "Emerald Nightmare",
 	[1530] = "Nighthold",
-	[1648] = "Trial of Valor"
+	[1648] = "Trial of Valor",
+	[1676] = "Tomb of Sargeras"
 }
 
 L.DifficultyNames = {
--- a/localization/frFR.lua	Thu Mar 30 23:41:46 2017 -0700
+++ b/localization/frFR.lua	Wed Jun 14 21:00:53 2017 -0700
@@ -87,7 +87,8 @@
 L.InstanceNames = {
 	[1520] = "Emerald Nightmare",
 	[1530] = "Nighthold",
-	[1648] = "Trial of Valor"
+	[1648] = "Trial of Valor",
+	[1676] = "Tomb of Sargeras"
 }
 
 L.DifficultyNames = {
--- a/localization/itIT.lua	Thu Mar 30 23:41:46 2017 -0700
+++ b/localization/itIT.lua	Wed Jun 14 21:00:53 2017 -0700
@@ -87,7 +87,8 @@
 L.InstanceNames = {
 	[1520] = "Emerald Nightmare",
 	[1530] = "Nighthold",
-	[1648] = "Trial of Valor"
+	[1648] = "Trial of Valor",
+	[1676] = "Tomb of Sargeras"
 }
 
 L.DifficultyNames = {
--- a/localization/ruRU.lua	Thu Mar 30 23:41:46 2017 -0700
+++ b/localization/ruRU.lua	Wed Jun 14 21:00:53 2017 -0700
@@ -42,7 +42,7 @@
     [18] = "Танцующий с ветром", -- MonkWindwalker
     [19] = "Свет", -- PaladinHoly
     [20] = "Защита", -- PaladinProtection
-    [21] = "Воздояние", -- PaladinRetribution
+    [21] = "Воздаяние", -- PaladinRetribution
     [22] = "Послушание", -- PriestDiscipline
     [23] = "Свет", -- PriestHoly
     [24] = "Тьма", -- PriestShadow
@@ -87,7 +87,8 @@
 L.InstanceNames = {
 	[1520] = "Emerald Nightmare",
 	[1530] = "Nighthold",
-	[1648] = "Trial of Valor"
+	[1648] = "Trial of Valor",
+	[1676] = "Tomb of Sargeras"
 }
 
 L.DifficultyNames = {