diff Modules/Collected.lua @ 1:6f17035de058

MO will now request a server refresh when mail opening has finished, ignoring the timer. (Collected Module) Fixed the time spent to only be displayed if it is being tracked. The inventory full sound will properly be played again when your bags change.
author Zerotorescue
date Sun, 05 Sep 2010 17:02:19 +0200
parents 823e33465b6e
children c6f0976069c7
line wrap: on
line diff
--- a/Modules/Collected.lua	Fri Sep 03 12:43:36 2010 +0200
+++ b/Modules/Collected.lua	Sun Sep 05 17:02:19 2010 +0200
@@ -226,12 +226,12 @@
 	-- Did we record any mail being opened?
 	if mailOpened and mailOpened > 0 then
 		-- Time Spent
-		if timeSpent then
+		if timeSpent and timeSpent > 0 then
 			printMessage = printMessage .. format("Collected a total of %d mails within %d minutes and %d seconds. ", mailOpened, floor( timeSpent / 60 ), ( timeSpent % 60 ));
 		else
 			printMessage = printMessage .. format("Collected a total of %d mails. ", mailOpened);
 		end
-	elseif timeSpent then
+	elseif timeSpent and timeSpent > 0 then
 		printMessage = printMessage .. format("Spent %d minutes and %d seconds collecting mail. ", floor( timeSpent / 60 ), ( timeSpent % 60 ));
 	end
 	
@@ -256,7 +256,7 @@
 		-- Did we record any mail being opened?
 		if sessionMailOpened and sessionMailOpened > 0 then
 			-- Time Spent
-			if sessionTimeSpent then
+			if sessionTimeSpent and sessionTimeSpent > 0 then
 				printMessage = printMessage .. format("Collected a total of %d mails within %d minutes and %d seconds this session. ", sessionMailOpened, floor( sessionTimeSpent / 60 ), ( sessionTimeSpent % 60 ));
 			else
 				printMessage = printMessage .. format("Collected a total of %d mails this session. ", sessionMailOpened);