diff Core.lua @ 116:cff956d6e9d0

Now compatible with my version of QuickAuctions.
author Zerotorescue
date Tue, 12 Oct 2010 11:38:36 +0200
parents 97205db58bad
children 13243f627bf4
line wrap: on
line diff
--- a/Core.lua	Thu Oct 07 23:34:34 2010 +0200
+++ b/Core.lua	Tue Oct 12 11:38:36 2010 +0200
@@ -296,6 +296,13 @@
 		if AddonLoader and AddonLoader.LoadAddOn then
 			AddonLoader:LoadAddOn("QuickAuctions");
 		end
+	elseif select(6, GetAddOnInfo("ZeroAuctions")) == nil then
+		self.QuickAuctionsEnabled = true; -- Set this as an object variable so we can use it in our modules
+		
+		-- Ensure this addon is loaded if AddonLoader is installed
+		if AddonLoader and AddonLoader.LoadAddOn then
+			AddonLoader:LoadAddOn("ZeroAuctions");
+		end
 	end
 	
 	
@@ -438,6 +445,15 @@
 			QAMail.massOpening:Hide();
 			-- Hide the x mail remaining text
 			QAMail.totalMail:Hide();
+		else
+			local ZAMail = LibStub("AceAddon-3.0"):GetAddon("ZeroAuctions", true):GetModule("Mail", true);
+			
+			if ZAMail then
+				-- Hide the open all button
+				ZAMail.massOpening:Hide();
+				-- Hide the x mail remaining text
+				ZAMail.totalMail:Hide();
+			end
 		end
 	end
 	
@@ -610,7 +626,7 @@
 		-- Quick Auctions enabled?
 		-- Toggle automailing as per settings
 		
-		if self.db.profile.general.autoReenableQAAutoMail and  QuickAuctionsAutoMail and not QuickAuctionsAutoMail:GetChecked() then
+		if self.db.profile.general.autoReenableQAAutoMail and QuickAuctionsAutoMail and not QuickAuctionsAutoMail:GetChecked() then
 			-- If auto re-enable "QA Auto mail" is enabled and QA's auto mail is currently toggled OFF, turn it on
 			-- We need to do this with a :click to trigger the right events