comparison Core.lua @ 101:53147a647e28

Converted the crafting threshold option to allow input instead of a drop down.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Thu, 19 Aug 2010 23:26:54 -0700
parents e6292f1a0cf3
children 1f410255ebd8
comparison
equal deleted inserted replaced
100:e6292f1a0cf3 101:53147a647e28
44 44
45 ItemAuditor.DB_defaults = { 45 ItemAuditor.DB_defaults = {
46 char = { 46 char = {
47 ah = 1, 47 ah = 1,
48 use_quick_auctions = false, 48 use_quick_auctions = false,
49 crafting_threshold = 1, 49 profitable_threshold = 10000,
50 auction_threshold = 0.15, 50 auction_threshold = 0.15,
51 qa_extra = 0, 51 qa_extra = 0,
52 output_chat_frame = nil, 52 output_chat_frame = nil,
53 }, 53 },
54 profile = { 54 profile = {
82 82
83 LibStub("AceConfig-3.0"):RegisterOptionsTable("ItemAuditor", ItemAuditor.Options, {"ia"}) 83 LibStub("AceConfig-3.0"):RegisterOptionsTable("ItemAuditor", ItemAuditor.Options, {"ia"})
84 ItemAuditor:RegisterFrame(ItemAuditor_DebugFrame) 84 ItemAuditor:RegisterFrame(ItemAuditor_DebugFrame)
85 85
86 LibStub("AceConsole-3.0"):RegisterChatCommand('rl', ReloadUI) 86 LibStub("AceConsole-3.0"):RegisterChatCommand('rl', ReloadUI)
87
88 if self.db.char.crafting_threshold then
89 local threshold = self.db.char.crafting_threshold
90 if threshold == 1 then
91 self.db.char.profitable_threshold = 5000
92 elseif threshold == 2 then
93 self.db.char.profitable_threshold = 10000
94 elseif threshold == 3 then
95 self.db.char.profitable_threshold = 50000
96 end
97
98 self.db.char.crafting_threshold = nil
99 end
87 100
88 --@debug@ 101 --@debug@
89 -- ItemAuditor_DebugFrame:Show() 102 -- ItemAuditor_DebugFrame:Show()
90 -- self:CreateFrame('tab_crafting') 103 -- self:CreateFrame('tab_crafting')
91 self:RegisterEvent("TRADE_SKILL_SHOW", function() 104 self:RegisterEvent("TRADE_SKILL_SHOW", function()