changeset 189:21a69c63fee8 v92

Added BfA auto-logging back for now.
author yellowfive
date Mon, 19 Oct 2020 11:19:56 -0700
parents 29f11593d255
children 4232d073a90b
files AskMrRobot-Serializer/AskMrRobot-Serializer.lua AskMrRobot.toc CombatLog.lua Constants.lua Options.lua localization/enUS.lua localization/frFR.lua localization/itIT.lua localization/ptBR.lua localization/ruRU.lua ui/AmrUiCheckBox.lua
diffstat 11 files changed, 68 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/AskMrRobot-Serializer/AskMrRobot-Serializer.lua	Tue Oct 13 17:09:06 2020 -0700
+++ b/AskMrRobot-Serializer/AskMrRobot-Serializer.lua	Mon Oct 19 11:19:56 2020 -0700
@@ -1,6 +1,6 @@
 -- AskMrRobot-Serializer will serialize and communicate character data between users.
 
-local MAJOR, MINOR = "AskMrRobot-Serializer", 91
+local MAJOR, MINOR = "AskMrRobot-Serializer", 92
 local Amr, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
 
 if not Amr then return end -- already loaded by something else
@@ -156,11 +156,21 @@
 }
 
 Amr.InstanceIds = {
+	Uldir = 1861,
+	Dazar = 2070,
+	Storms = 2096,
+	Palace = 2164,
+	Nyalotha = 2217,
 	Nathria = 2296
 }
 
 -- instances that AskMrRobot currently supports logging for
 Amr.SupportedInstanceIds = {
+	[1861] = true,
+	[2070] = true,
+	[2096] = true,
+	[2164] = true,
+	[2217] = true,
 	[2296] = true
 }
 
--- a/AskMrRobot.toc	Tue Oct 13 17:09:06 2020 -0700
+++ b/AskMrRobot.toc	Mon Oct 19 11:19:56 2020 -0700
@@ -1,7 +1,7 @@
 ## Interface: 90001
 ## Title: Ask Mr. Robot
 ## Author: Team Robot, Inc.
-## Version: 91
+## Version: 92
 ## Notes: Gear import/export, combat logging, and more.
 ## URL: www.askmrrobot.com
 ## SavedVariables: AskMrRobotDb4
--- a/CombatLog.lua	Tue Oct 13 17:09:06 2020 -0700
+++ b/CombatLog.lua	Mon Oct 19 11:19:56 2020 -0700
@@ -313,6 +313,14 @@
 	end
 end
 
+-- sometimes the game doesn't repaint checkboxes when it should... doing this forces it to do so
+local function setCheckboxChecked(chk, val)
+	chk:SetChecked(val)
+	chk:SetChecked(not val)
+	chk:SetChecked(val)
+	chk:SetText(chk:GetText())
+end
+
 -- refresh the state of the tab based on current settings
 function Amr:RefreshLogUi()
 	if not _btnToggle then return end
@@ -334,6 +342,7 @@
 	end
 	
 	local all = isAllAutoLoggingEnabled()
+	--setCheckboxChecked(_chkAutoAll, all)
 	_chkAutoAll:SetChecked(all)
 	
 	for i, instanceId in ipairs(Amr.InstanceIdsOrdered) do
@@ -341,7 +350,8 @@
 			Amr.db.profile.Logging.Auto[instanceId] = {}
 		end
 		for k, difficultyId in pairs(Amr.Difficulties) do
-			_autoChecks[instanceId][difficultyId]:SetChecked(Amr.db.profile.Logging.Auto[instanceId][difficultyId])
+			setCheckboxChecked(_autoChecks[instanceId][difficultyId], Amr.db.profile.Logging.Auto[instanceId][difficultyId])
+			--_autoChecks[instanceId][difficultyId]:SetChecked(Amr.db.profile.Logging.Auto[instanceId][difficultyId])
 		end
 	end
 end
--- a/Constants.lua	Tue Oct 13 17:09:06 2020 -0700
+++ b/Constants.lua	Mon Oct 19 11:19:56 2020 -0700
@@ -107,7 +107,7 @@
 }
 
 -- instance IDs ordered in preferred display order
-Amr.InstanceIdsOrdered = { 2296 }
+Amr.InstanceIdsOrdered = { 1861, 2070, 2096, 2164, 2217, 2296 }
 
 Amr.Difficulties = {
 	Lfr = 17,
--- a/Options.lua	Tue Oct 13 17:09:06 2020 -0700
+++ b/Options.lua	Mon Oct 19 11:19:56 2020 -0700
@@ -132,25 +132,37 @@
 	_txtScale = nil
 end
 
+-- sometimes the game doesn't repaint checkboxes when it should... doing this forces it to do so
+local function setCheckboxChecked(chk, val)
+	chk:SetChecked(val)
+	chk:SetChecked(not val)
+	chk:SetChecked(val)
+end
+
 function Amr:RefreshOptionsUi()
 
 	if _chkMinimap then
+		--setCheckboxChecked(_chkMinimap, self.db.profile.minimap.hide)
 		_chkMinimap:SetChecked(self.db.profile.minimap.hide)
 	end
 	
 	if _chkAutoGear then
+		--setCheckboxChecked(_chkAutoGear, self.db.profile.options.autoGear)
 		_chkAutoGear:SetChecked(self.db.profile.options.autoGear)
 	end
 
 	if _chkJunk then
+		--setCheckboxChecked(_chkJunk, self.db.profile.options.junkVendor)
 		_chkJunk:SetChecked(self.db.profile.options.junkVendor)
 	end
 
 	if _chkAh then
+		--setCheckboxChecked(_chkAh, self.db.profile.options.shopAh)
 		_chkAh:SetChecked(self.db.profile.options.shopAh)
 	end
 	
 	if _chkEm then
+		--setCheckboxChecked(_chkEm, self.db.profile.options.disableEm)
 		_chkEm:SetChecked(self.db.profile.options.disableEm)
 	end
 	
--- a/localization/enUS.lua	Tue Oct 13 17:09:06 2020 -0700
+++ b/localization/enUS.lua	Mon Oct 19 11:19:56 2020 -0700
@@ -85,6 +85,11 @@
 }
 
 L.InstanceNames = {
+    [1861] = "Uldir",
+    [2070] = "Dazar'alor",
+    [2096] = "Crucible of Storms",
+    [2164] = "The Eternal Palace",
+    [2217] = "Ny'alotha",    
     [2296] = "Castle Nathria"
 }
 
--- a/localization/frFR.lua	Tue Oct 13 17:09:06 2020 -0700
+++ b/localization/frFR.lua	Mon Oct 19 11:19:56 2020 -0700
@@ -71,6 +71,11 @@
 }
 
 L.InstanceNames = {
+    [1861] = "Uldir",
+    [2070] = "Dazar'alor",
+    [2096] = "Crucible of Storms",
+    [2164] = "The Eternal Palace",
+    [2217] = "Ny'alotha",    
     [2296] = "Castle Nathria"
 }
 
--- a/localization/itIT.lua	Tue Oct 13 17:09:06 2020 -0700
+++ b/localization/itIT.lua	Mon Oct 19 11:19:56 2020 -0700
@@ -71,6 +71,11 @@
 }
 
 L.InstanceNames = {
+    [1861] = "Uldir",
+    [2070] = "Dazar'alor",
+    [2096] = "Crucible of Storms",
+    [2164] = "The Eternal Palace",
+    [2217] = "Ny'alotha",    
     [2296] = "Castle Nathria"
 }
 
--- a/localization/ptBR.lua	Tue Oct 13 17:09:06 2020 -0700
+++ b/localization/ptBR.lua	Mon Oct 19 11:19:56 2020 -0700
@@ -71,6 +71,11 @@
 }
 
 L.InstanceNames = {
+    [1861] = "Uldir",
+    [2070] = "Dazar'alor",
+    [2096] = "Crucible of Storms",
+    [2164] = "The Eternal Palace",
+    [2217] = "Ny'alotha",    
     [2296] = "Castle Nathria"
 }
 
--- a/localization/ruRU.lua	Tue Oct 13 17:09:06 2020 -0700
+++ b/localization/ruRU.lua	Mon Oct 19 11:19:56 2020 -0700
@@ -71,6 +71,11 @@
 }
 
 L.InstanceNames = {
+    [1861] = "Uldir",
+    [2070] = "Dazar'alor",
+    [2096] = "Crucible of Storms",
+    [2164] = "The Eternal Palace",
+    [2217] = "Ny'alotha",    
     [2296] = "Castle Nathria"
 }
 
--- a/ui/AmrUiCheckBox.lua	Tue Oct 13 17:09:06 2020 -0700
+++ b/ui/AmrUiCheckBox.lua	Mon Oct 19 11:19:56 2020 -0700
@@ -34,7 +34,7 @@
 		-- restore default values
 		self:SetDisabled(false)
 		self:SetFont(Amr.CreateFont("Regular", 14, Amr.Colors.Text))
-		self:SetText()
+		self:SetText("")
 		self:SetChecked(false)
 		self.frame:ClearAllPoints()
 	end,
@@ -43,8 +43,12 @@
 	--	print(self.name .. " released")
 	--end,
 
+	["GetText"] = function(self)
+		return self.label:GetText()
+	end,
+
 	["SetText"] = function(self, text)
-		self.label:SetText(text)
+		self.label:SetText(text or "")
 		self.frame:SetWidth(16 + 6 + self.label:GetStringWidth())
 	end,
 	
@@ -54,7 +58,7 @@
 	
 	["SetChecked"] = function(self, checked)
 		self.isChecked = not not checked
-		if checked then
+		if self.isChecked then
 			self.texNormal:Hide()
 			self.texCheck:Show()
 		else