Mercurial > wow > itemauditor
comparison Modules/QuickAuctions.lua @ 71:aaf9a155995b
Added a config option to control how many extra copies of an item are created if its being managed with QA. The previous behaveior was to add 25% to whatever QA would normally post. Now it defaults to 0% and is user configurable.
author | Asa Ayers <Asa.Ayers@Gmail.com> |
---|---|
date | Wed, 28 Jul 2010 22:46:13 -0700 |
parents | 3930518cb8d9 |
children | a8fc802b42ba |
comparison
equal
deleted
inserted
replaced
70:3930518cb8d9 | 71:aaf9a155995b |
---|---|
99 local stackSize = postCap * perAuction | 99 local stackSize = postCap * perAuction |
100 | 100 |
101 stackSize = stackSize / GetTradeSkillNumMade(data.tradeSkillIndex) | 101 stackSize = stackSize / GetTradeSkillNumMade(data.tradeSkillIndex) |
102 | 102 |
103 -- bonus | 103 -- bonus |
104 stackSize = ceil(stackSize *1.25) | 104 stackSize = ceil(stackSize * (1+ItemAuditor.db.char.qa_extra)) |
105 | 105 |
106 local newThreshold = ((data.cost*stackSize) + currentInvested) / (currentCount + stackSize) | 106 local newThreshold = ((data.cost*stackSize) + currentInvested) / (currentCount + stackSize) |
107 newThreshold = calculateQAThreshold(newThreshold) | 107 newThreshold = calculateQAThreshold(newThreshold) |
108 | 108 |
109 if newThreshold < data.price then | 109 if newThreshold < data.price then |
208 max = 1.0, | 208 max = 1.0, |
209 isPercent = true, | 209 isPercent = true, |
210 get = function() return ItemAuditor.db.char.auction_threshold end, | 210 get = function() return ItemAuditor.db.char.auction_threshold end, |
211 set = function(info, value) | 211 set = function(info, value) |
212 ItemAuditor.db.char.auction_threshold = value | 212 ItemAuditor.db.char.auction_threshold = value |
213 ItemAuditor:RefreshQAGroups() | 213 -- ItemAuditor:RefreshQAGroups() |
214 end, | |
215 disabled = 'IsQADisabled', | |
216 order = 1, | |
217 }, | |
218 extra = { | |
219 type = "range", | |
220 name = "Create Extra", | |
221 desc = "This is the amount of an item that should be created above what you sell in one post in QuickAuctions.".. | |
222 "If you sell 4 stacks of 5 of an item and your extra is 25%, it will queue enough for you to have 25 of that item.", | |
223 min = 0.0, | |
224 max = 1.0, | |
225 isPercent = true, | |
226 get = function() return ItemAuditor.db.char.qa_extra end, | |
227 set = function(info, value) | |
228 ItemAuditor.db.char.qa_extra = value | |
214 end, | 229 end, |
215 disabled = 'IsQADisabled', | 230 disabled = 'IsQADisabled', |
216 order = 1, | 231 order = 1, |
217 }, | 232 }, |
218 refresh_qa = { | 233 refresh_qa = { |