changeset 137:6dc0e8e9f960 v64

uldir for auto-logging
author yellowfive
date Mon, 03 Sep 2018 19:19:38 -0700
parents 5f3dde81a118
children 45e467335a1b
files AskMrRobot-Serializer/AskMrRobot-Serializer.lua AskMrRobot.toc CombatLog.lua Constants.lua Core.lua Gear.lua localization/enUS.lua localization/frFR.lua localization/itIT.lua localization/ptBR.lua localization/ruRU.lua
diffstat 11 files changed, 37 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/AskMrRobot-Serializer/AskMrRobot-Serializer.lua	Sun Aug 12 23:36:32 2018 -0700
+++ b/AskMrRobot-Serializer/AskMrRobot-Serializer.lua	Mon Sep 03 19:19:38 2018 -0700
@@ -1,6 +1,6 @@
 -- AskMrRobot-Serializer will serialize and communicate character data between users.
 
-local MAJOR, MINOR = "AskMrRobot-Serializer", 63
+local MAJOR, MINOR = "AskMrRobot-Serializer", 64
 local Amr, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
 if not Amr then return end -- already loaded by something else
@@ -152,20 +152,12 @@
 }
 
 Amr.InstanceIds = {
-	EmeraldNightmare = 1520,
-	Nighthold = 1530,
-	TrialOfValor = 1648,
-	TombOfSargeras = 1676,
-	Antorus = 1712
+	Uldir = 1861
 }
 
 -- instances that AskMrRobot currently supports logging for
 Amr.SupportedInstanceIds = {
-	[1520] = true,
-	[1530] = true,
-	[1648] = true,
-	[1676] = true,
-	[1712] = true
+	[1861] = true
 }
 
 
--- a/AskMrRobot.toc	Sun Aug 12 23:36:32 2018 -0700
+++ b/AskMrRobot.toc	Mon Sep 03 19:19:38 2018 -0700
@@ -1,7 +1,7 @@
 ## Interface: 80000
 ## Title: Ask Mr. Robot
 ## Author: Team Robot, Inc.
-## Version: 63
+## Version: 64
 ## Notes: Gear import/export, combat logging, and more.
 ## URL: www.askmrrobot.com
 ## SavedVariables: AskMrRobotDb4
--- a/CombatLog.lua	Sun Aug 12 23:36:32 2018 -0700
+++ b/CombatLog.lua	Mon Sep 03 19:19:38 2018 -0700
@@ -20,7 +20,7 @@
 end
 
 -- render a group of controls for auto-logging of a raid zone
-local function renderAutoLogSection(instanceId, container)
+local function renderAutoLogSection(instanceId, container, i, autoLbls, autoChks)
 	_autoChecks[instanceId] = {}
 	
 	local lbl = AceGUI:Create("AmrUiLabel")
@@ -29,10 +29,18 @@
 	lbl:SetText(L.InstanceNames[instanceId])
 	lbl:SetFont(Amr.CreateFont("Regular", 20, Amr.Colors.White))
 	
+	if i == 1 then
+		lbl:SetPoint("TOPLEFT", _chkAutoAll.frame, "BOTTOMLEFT", -1, -15)
+	elseif i % 2 == 0 then
+		lbl:SetPoint("TOPLEFT", autoLbls[i - 1].frame, "TOPRIGHT", 40, 0)
+	else
+		lbl:SetPoint("TOPLEFT", autoChks[i - 2].frame, "BOTTOMLEFT", 0, -30)
+	end
+
 	local line = AceGUI:Create("AmrUiPanel")
+	container:AddChild(line)
 	line:SetHeight(1)
 	line:SetBackgroundColor(Amr.Colors.White)
-	container:AddChild(line)
 	line:SetPoint("TOPLEFT", lbl.frame, "BOTTOMLEFT", 1, -7)
 	line:SetPoint("TOPRIGHT", lbl.frame, "BOTTOMRIGHT", 0, -7)
 	
@@ -43,7 +51,7 @@
 	local chkNormal = createDifficultyCheckBox(instanceId, Amr.Difficulties.Normal)
 	container:AddChild(chkNormal)
 	chkNormal:SetPoint("TOPLEFT", line.frame, "BOTTOMLEFT", 0, -30)
-	
+
 	-- find the widest of mythic/normal
 	local w = math.max(chkMythic:GetWidth(), chkNormal:GetWidth())
 	
@@ -54,7 +62,7 @@
 	local chkLfr = createDifficultyCheckBox(instanceId, Amr.Difficulties.Lfr)
 	container:AddChild(chkLfr)
 	chkLfr:SetPoint("TOPLEFT", line.frame, "BOTTOMLEFT", w + 20, -30)
-	
+		
 	return lbl, chkNormal
 end
 
@@ -179,14 +187,7 @@
 	local autoLbls = {}
 	local autoChks = {}
 	for i, instanceId in ipairs(Amr.InstanceIdsOrdered) do
-		local autoLbl, autoChk = renderAutoLogSection(instanceId, container)
-		if i == 1 then
-			autoLbl:SetPoint("TOPLEFT", _chkAutoAll.frame, "BOTTOMLEFT", -1, -15)
-		elseif i % 2 == 0 then
-			autoLbl:SetPoint("TOPLEFT", autoLbls[i - 1].frame, "TOPRIGHT", 40, 0)
-		else
-			autoLbl:SetPoint("TOPLEFT", autoChks[i - 2].frame, "BOTTOMLEFT", 0, -30)
-		end
+		local autoLbl, autoChk = renderAutoLogSection(instanceId, container, i, autoLbls, autoChks)		
 		
 		table.insert(autoLbls, autoLbl)
 		table.insert(autoChks, autoChk)
@@ -294,8 +295,10 @@
 	Amr.db.char.Logging.LastZone = zone
 	Amr.db.char.Logging.LastDiff = difficultyId
 
-	if not Amr.db.profile.Logging.Auto[tonumber(instanceId)] then
-		Amr.db.profile.Logging.Auto[tonumber(instanceId)] = {}
+	if Amr.IsSupportedInstanceId(instanceId) then
+		if not Amr.db.profile.Logging.Auto[tonumber(instanceId)] then
+			Amr.db.profile.Logging.Auto[tonumber(instanceId)] = {}
+		end
 	end
 	
 	if Amr.IsSupportedInstanceId(instanceId) and Amr.db.profile.Logging.Auto[tonumber(instanceId)][tonumber(difficultyId)] then
@@ -626,7 +629,7 @@
 end
 
 function Amr:InitializeCombatLog()
-	--updateAutoLogging()
+	updateAutoLogging()
 end
 
 Amr:AddEventHandler("UPDATE_INSTANCE_INFO", updateAutoLogging)
--- a/Constants.lua	Sun Aug 12 23:36:32 2018 -0700
+++ b/Constants.lua	Mon Sep 03 19:19:38 2018 -0700
@@ -105,7 +105,7 @@
 }
 
 -- instance IDs ordered in preferred display order
-Amr.InstanceIdsOrdered = { 1520, 1530, 1648, 1676, 1712 }
+Amr.InstanceIdsOrdered = { 1861 }
 
 Amr.Difficulties = {
 	Lfr = 17,
--- a/Core.lua	Sun Aug 12 23:36:32 2018 -0700
+++ b/Core.lua	Mon Sep 03 19:19:38 2018 -0700
@@ -106,6 +106,12 @@
 				hasSomeLogging = true
 			end
 		end
+	end	
+
+	for k,v in pairs(Amr.db.profile.Logging.Auto) do
+		if not Amr.IsSupportedInstanceId(k) then
+			Amr.db.profile.Logging.Auto[k] = nil
+		end		
 	end
 	
 	if hasSomeLogging then		
--- a/Gear.lua	Sun Aug 12 23:36:32 2018 -0700
+++ b/Gear.lua	Mon Sep 03 19:19:38 2018 -0700
@@ -311,7 +311,7 @@
 						lblEquipped:SetText(isEquipped and "E" or "")
 					end
 
-					lblItem:SetFont(Amr.CreateFont(isEquipped and "Regular" or "Bold", isEquipped and 14 or 15, Amr.Colors.Qualities[q]))				
+					lblItem:SetFont(Amr.CreateFont(isEquipped and "Regular" or "Bold", isEquipped and 14 or 15, Amr.Colors.Qualities[q] or Amr.Colors.White))
 					lblItem:SetText(gameItem:GetItemName())
 					lblIlvl:SetText(gameItem:GetCurrentItemLevel())
 					Amr:SetItemTooltip(lblItem, gameItem:GetItemLink(), "ANCHOR_TOPRIGHT")
@@ -614,8 +614,8 @@
     -- for some reason, the slot is treated as blank if you try to ignore once on the first load of the equipment manager
  
     -- clear any currently ignored slots
-    C_EquipmentSet.ClearIgnoredSlotsForSave()
-    C_EquipmentSet.ClearIgnoredSlotsForSave()
+    --C_EquipmentSet.ClearIgnoredSlotsForSave()
+    --C_EquipmentSet.ClearIgnoredSlotsForSave()
  
     -- ignore shirt and tabard
     C_EquipmentSet.IgnoreSlotForSave(INVSLOT_BODY) -- shirt
--- a/localization/enUS.lua	Sun Aug 12 23:36:32 2018 -0700
+++ b/localization/enUS.lua	Mon Sep 03 19:19:38 2018 -0700
@@ -85,11 +85,7 @@
 }
 
 L.InstanceNames = {
-	[1520] = "Emerald Nightmare",
-	[1530] = "Nighthold",
-	[1648] = "Trial of Valor",
-	[1676] = "Tomb of Sargeras",
-	[1712] = "Antorus"
+    [1861] = "Uldir"
 }
 
 L.DifficultyNames = {
--- a/localization/frFR.lua	Sun Aug 12 23:36:32 2018 -0700
+++ b/localization/frFR.lua	Mon Sep 03 19:19:38 2018 -0700
@@ -71,11 +71,7 @@
 }
 
 L.InstanceNames = {
-	[1520] = "Emerald Nightmare",
-	[1530] = "Nighthold",
-	[1648] = "Trial of Valor",
-	[1676] = "Tomb of Sargeras",
-	[1712] = "Antorus"
+	[1861] = "Uldir"
 }
 
 L.DifficultyNames = {
--- a/localization/itIT.lua	Sun Aug 12 23:36:32 2018 -0700
+++ b/localization/itIT.lua	Mon Sep 03 19:19:38 2018 -0700
@@ -71,11 +71,7 @@
 }
 
 L.InstanceNames = {
-	[1520] = "Emerald Nightmare",
-	[1530] = "Nighthold",
-	[1648] = "Trial of Valor",
-	[1676] = "Tomb of Sargeras",
-	[1712] = "Antorus"
+	[1861] = "Uldir"
 }
 
 L.DifficultyNames = {
--- a/localization/ptBR.lua	Sun Aug 12 23:36:32 2018 -0700
+++ b/localization/ptBR.lua	Mon Sep 03 19:19:38 2018 -0700
@@ -71,11 +71,7 @@
 }
 
 L.InstanceNames = {
-	[1520] = "Pesadelo Esmeralda",
-	[1530] = "Baluarte da Noite",
-	[1648] = "Provação da Bravura",
-	[1676] = "Tumba de Sargeras",
-	[1712] = "Antorus"
+	[1861] = "Uldir"
 }
 
 L.DifficultyNames = {
--- a/localization/ruRU.lua	Sun Aug 12 23:36:32 2018 -0700
+++ b/localization/ruRU.lua	Mon Sep 03 19:19:38 2018 -0700
@@ -71,11 +71,7 @@
 }
 
 L.InstanceNames = {
-	[1520] = "Emerald Nightmare",
-	[1530] = "Nighthold",
-	[1648] = "Trial of Valor",
-	[1676] = "Tomb of Sargeras",
-	[1712] = "Antorus"
+	[1861] = "Uldir"
 }
 
 L.DifficultyNames = {