diff Core.lua @ 28:34daa46b644a

Added an interface to view how much you have invested in each item.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Fri, 16 Jul 2010 01:32:08 -0700
parents 75d917ccd942
children f99b9602bdab
line wrap: on
line diff
--- a/Core.lua	Wed Jul 14 00:29:16 2010 -0700
+++ b/Core.lua	Fri Jul 16 01:32:08 2010 -0700
@@ -46,6 +46,7 @@
 	-- /run ItemAuditor.db.profile.show_debug_frame_on_startup = true
 	if self.db.profile.show_debug_frame_on_startup then
 		ItemAuditor_DebugFrame:Show()
+		self:CreateFrames()
 	end
 end
 
@@ -231,15 +232,21 @@
 		
 	end
 	
-	
+	if self.items[link] ~= nil then
+		if self.items[link].invested  == nil or self.items[link].invested <= 0 then
+			self.items[link] = nil
+		end
+	end
 	
 	if viewOnly == true and self.items[link] == nil then
 		return {count = 0, invested = 0}
 	elseif viewOnly == true then
+		
 		return {count = self.items[link].count, invested = self.items[link].invested}
 	end
 	self.items[link].count =  Altoholic:GetItemCount(self:GetIDFromLink(link))
-	self.items[link].invested = tonumber(self.items[link].invested)
+	
+	
 	return self.items[link]
 end