diff Modules/Events.lua @ 113:52e8cad9ccc4 Release 2010-09-01

Ticket 35 - I found a better solution to prevent bag scanning from interfering with mailing, so both can be done at the same time now.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Wed, 01 Sep 2010 23:36:23 -0700
parents c59d22fac6d1
children 526036e4358f
line wrap: on
line diff
--- a/Modules/Events.lua	Wed Sep 01 23:21:44 2010 -0700
+++ b/Modules/Events.lua	Wed Sep 01 23:36:23 2010 -0700
@@ -24,7 +24,7 @@
  
  function ItemAuditor:MAIL_SHOW()
 	self:Debug("MAIL_SHOW")
-	self:UnwatchBags()
+	self.mailOpen = true
 	ItemAuditor:UpdateCurrentInventory()
 	self.lastMailScan = self:ScanMail()
 	
@@ -187,7 +187,7 @@
 	self:MAIL_INBOX_UPDATE()
 	self:UnregisterEvent("MAIL_INBOX_UPDATE")
 	self:RegisterEvent("MAIL_SHOW")
-	self:WatchBags()
+	self.mailOpen = nil
 end
 
 local storedCountDiff
@@ -310,7 +310,7 @@
 		]]
 	elseif diff.money > 0 and self:tcount(positive) > 0 and self:tcount(negative) == 0 then
 		self:Debug("loot")
-	elseif abs(diff.money) > 0 and self:tcount(diff.items) == 1 then
+	elseif abs(diff.money) > 0 and self:tcount(diff.items) == 1 and not self.mailOpen then
 		self:Debug("purchase or sale")
 		
 		for link, count in pairs(diff.items) do