diff Core.lua @ 100:e6292f1a0cf3

Added a new Crafting Rules module to allow the user to set up custom rules based on item names.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Thu, 19 Aug 2010 23:22:53 -0700
parents b29441cd130d
children 53147a647e28
line wrap: on
line diff
--- a/Core.lua	Thu Aug 19 23:14:30 2010 -0700
+++ b/Core.lua	Thu Aug 19 23:22:53 2010 -0700
@@ -42,34 +42,35 @@
 	},
 }
 
+ItemAuditor.DB_defaults = {
+	char = {
+		ah = 1,
+		use_quick_auctions = false,
+		crafting_threshold = 1,
+		auction_threshold = 0.15,
+		qa_extra = 0,
+		output_chat_frame = nil,
+	},
+	profile = {
+		messages = {
+			cost_updates = true,
+			queue_skip = false,
+		},
+		ItemAuditor_enabled = true,
+		queue_destination = nil,
+		disabled_deciders = {},
+		pricing_method = 'low',
+	},
+	factionrealm = {
+		item_account = {},
+		items = {},
+		outbound_cod = {},
+		mailbox = {},
+	},
+}
+
 function ItemAuditor:OnInitialize()
-	local DB_defaults = {
-		char = {
-			ah = 1,
-			use_quick_auctions = false,
-			crafting_threshold = 1,
-			auction_threshold = 0.15,
-			qa_extra = 0,
-			output_chat_frame = nil,
-		},
-		profile = {
-			messages = {
-				cost_updates = true,
-				queue_skip = false,
-			},
-			ItemAuditor_enabled = true,
-			queue_destination = nil,
-			disabled_deciders = {},
-			pricing_method = 'low',
-		},
-		factionrealm = {
-			item_account = {},
-			items = {},
-			outbound_cod = {},
-			mailbox = {}
-		},
-	}
-	self.db = LibStub("AceDB-3.0"):New("ItemAuditorDB", DB_defaults, true)
+	self.db = LibStub("AceDB-3.0"):New("ItemAuditorDB", ItemAuditor.DB_defaults, true)
 
 	allMailboxes = self.db.factionrealm.mailbox
 	if not allMailboxes[UnitName("player")] then
@@ -83,7 +84,7 @@
 	ItemAuditor:RegisterFrame(ItemAuditor_DebugFrame)
 	
 	LibStub("AceConsole-3.0"):RegisterChatCommand('rl', ReloadUI)
-	
+
 	--@debug@
 		-- ItemAuditor_DebugFrame:Show()
 		-- self:CreateFrame('tab_crafting')