Mercurial > wow > itemauditor
comparison Core.lua @ 22:66b7c3f5937e
I have removed the ability to show debug messages in the chat window and have replaced it with a new debug frame. /ia debug will show all of the debug messages and everything that IA has printed. This commit also has a small fix so that if you sell something for your exact cost you don't get a message that you made a profit of 0c.
| author | Asa Ayers <Asa.Ayers@Gmail.com> |
|---|---|
| date | Thu, 08 Jul 2010 19:30:30 -0700 |
| parents | d7f02c84994c |
| children | 819bfdc5d73c |
comparison
equal
deleted
inserted
replaced
| 21:d7f02c84994c | 22:66b7c3f5937e |
|---|---|
| 22 crafting_threshold = 1, | 22 crafting_threshold = 1, |
| 23 auction_threshold = 0.15, | 23 auction_threshold = 0.15, |
| 24 }, | 24 }, |
| 25 profile = { | 25 profile = { |
| 26 messages = { | 26 messages = { |
| 27 debug = false, | |
| 28 cost_updates = true, | 27 cost_updates = true, |
| 29 queue_skip = false, | 28 queue_skip = false, |
| 30 } | 29 } |
| 31 }, | 30 }, |
| 32 factionrealm = { | 31 factionrealm = { |
| 64 end | 63 end |
| 65 | 64 |
| 66 function addon:Print(message) | 65 function addon:Print(message) |
| 67 local prefix = "|cFFA3CEFF"..tostring( self ).."|r: " | 66 local prefix = "|cFFA3CEFF"..tostring( self ).."|r: " |
| 68 DEFAULT_CHAT_FRAME:AddMessage( prefix .. tostring(message)) | 67 DEFAULT_CHAT_FRAME:AddMessage( prefix .. tostring(message)) |
| 68 self:Log(message) | |
| 69 end | 69 end |
| 70 | 70 |
| 71 function addon:GetCurrentInventory() | 71 function addon:GetCurrentInventory() |
| 72 local i = {} | 72 local i = {} |
| 73 local bagID | 73 local bagID |
| 241 item.invested = item.invested + value | 241 item.invested = item.invested + value |
| 242 itemName = GetItemInfo(realLink) | 242 itemName = GetItemInfo(realLink) |
| 243 end | 243 end |
| 244 | 244 |
| 245 if abs(value) > 0 then | 245 if abs(value) > 0 then |
| 246 if item.invested <= 0 then | 246 if item.invested < 0 then |
| 247 if self.db.profile.messages.cost_updates then | 247 if self.db.profile.messages.cost_updates then |
| 248 self:Print(format("Updated price of %s from %s to %s. %sYou just made a profit of %s.", itemName, self:FormatMoney(item.invested - value), self:FormatMoney(0), GREEN, self:FormatMoney(abs(item.invested)))) | 248 self:Print(format("Updated price of %s from %s to %s. %sYou just made a profit of %s.", itemName, self:FormatMoney(item.invested - value), self:FormatMoney(0), GREEN, self:FormatMoney(abs(item.invested)))) |
| 249 end | 249 end |
| 250 self:RemoveItem(link) | 250 self:RemoveItem(link) |
| 251 -- This doesn't work when you mail the only copy of an item you have to another character. | 251 -- This doesn't work when you mail the only copy of an item you have to another character. |
