Mercurial > wow > itemauditor
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 99:e9b903cf9b33 | 100:e6292f1a0cf3 |
|---|---|
| 40 guiHidden = true, | 40 guiHidden = true, |
| 41 }, | 41 }, |
| 42 }, | 42 }, |
| 43 } | 43 } |
| 44 | 44 |
| 45 ItemAuditor.DB_defaults = { | |
| 46 char = { | |
| 47 ah = 1, | |
| 48 use_quick_auctions = false, | |
| 49 crafting_threshold = 1, | |
| 50 auction_threshold = 0.15, | |
| 51 qa_extra = 0, | |
| 52 output_chat_frame = nil, | |
| 53 }, | |
| 54 profile = { | |
| 55 messages = { | |
| 56 cost_updates = true, | |
| 57 queue_skip = false, | |
| 58 }, | |
| 59 ItemAuditor_enabled = true, | |
| 60 queue_destination = nil, | |
| 61 disabled_deciders = {}, | |
| 62 pricing_method = 'low', | |
| 63 }, | |
| 64 factionrealm = { | |
| 65 item_account = {}, | |
| 66 items = {}, | |
| 67 outbound_cod = {}, | |
| 68 mailbox = {}, | |
| 69 }, | |
| 70 } | |
| 71 | |
| 45 function ItemAuditor:OnInitialize() | 72 function ItemAuditor:OnInitialize() |
| 46 local DB_defaults = { | 73 self.db = LibStub("AceDB-3.0"):New("ItemAuditorDB", ItemAuditor.DB_defaults, true) |
| 47 char = { | |
| 48 ah = 1, | |
| 49 use_quick_auctions = false, | |
| 50 crafting_threshold = 1, | |
| 51 auction_threshold = 0.15, | |
| 52 qa_extra = 0, | |
| 53 output_chat_frame = nil, | |
| 54 }, | |
| 55 profile = { | |
| 56 messages = { | |
| 57 cost_updates = true, | |
| 58 queue_skip = false, | |
| 59 }, | |
| 60 ItemAuditor_enabled = true, | |
| 61 queue_destination = nil, | |
| 62 disabled_deciders = {}, | |
| 63 pricing_method = 'low', | |
| 64 }, | |
| 65 factionrealm = { | |
| 66 item_account = {}, | |
| 67 items = {}, | |
| 68 outbound_cod = {}, | |
| 69 mailbox = {} | |
| 70 }, | |
| 71 } | |
| 72 self.db = LibStub("AceDB-3.0"):New("ItemAuditorDB", DB_defaults, true) | |
| 73 | 74 |
| 74 allMailboxes = self.db.factionrealm.mailbox | 75 allMailboxes = self.db.factionrealm.mailbox |
| 75 if not allMailboxes[UnitName("player")] then | 76 if not allMailboxes[UnitName("player")] then |
| 76 allMailboxes[UnitName("player")] = {} | 77 allMailboxes[UnitName("player")] = {} |
| 77 end | 78 end |
| 81 | 82 |
| 82 LibStub("AceConfig-3.0"):RegisterOptionsTable("ItemAuditor", ItemAuditor.Options, {"ia"}) | 83 LibStub("AceConfig-3.0"):RegisterOptionsTable("ItemAuditor", ItemAuditor.Options, {"ia"}) |
| 83 ItemAuditor:RegisterFrame(ItemAuditor_DebugFrame) | 84 ItemAuditor:RegisterFrame(ItemAuditor_DebugFrame) |
| 84 | 85 |
| 85 LibStub("AceConsole-3.0"):RegisterChatCommand('rl', ReloadUI) | 86 LibStub("AceConsole-3.0"):RegisterChatCommand('rl', ReloadUI) |
| 86 | 87 |
| 87 --@debug@ | 88 --@debug@ |
| 88 -- ItemAuditor_DebugFrame:Show() | 89 -- ItemAuditor_DebugFrame:Show() |
| 89 -- self:CreateFrame('tab_crafting') | 90 -- self:CreateFrame('tab_crafting') |
| 90 self:RegisterEvent("TRADE_SKILL_SHOW", function() | 91 self:RegisterEvent("TRADE_SKILL_SHOW", function() |
| 91 ItemAuditor:DisplayCrafting() | 92 ItemAuditor:DisplayCrafting() |
