WoWInterface SVN BuyDropper

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 6 to Rev 7
    Reverse comparison

Rev 6 → Rev 7

trunk/BuyDropper/BuyDropperConsole.lua
101,7 → 101,7
" <index> is obtained from /buydropper list",
validate = function(index)
index = tonumber(index)
return index and index > 0 and index < #self.list
return index and index > 0 and index <= #self.list
end,
get = false,
set = function(index)
trunk/BuyDropper/BuyDropper.toc
1,7 → 1,7
## Interface: 30000
## Author: Cogwheel
## Title: BuyDropper
## Version: 0.9B3
## Version: 0.9B4
## Notes: Keeps you stocked with items from merchants or your bank.
## X-Website: http://cogwheel.info
## X-Category: Inventory
trunk/BuyDropper/readme.html
111,7 → 111,7
 
<body>
<h1>BuyDropper</h1>
<p>By Cogwheel — v0.9B3<br />
<p>By Cogwheel — v0.9B4<br />
Inspired by FreeRefills by Kyahx </p>
<p>BuyDropper keeps a list of items to purchase automatically from vendors.</p>
<p>Please visit <a href="http://cogwheel.wowinterface.com">Cogwheel’s Workshop</a> for updates, bug reports, feature requests, etc. </p>
167,7 → 167,8
<h3><a name="managing" id="managing"></a>Managing your list</h3>
<h4><a name="adding" id="adding"></a>Adding items </h4>
<div class="captionedImage"><img src="images/dropper.jpg" alt="Picture of Dropper" width="156" height="138" />
<div>Dropper</div></div><p>The first thing you’ll want to do is add an item to BuyDropper’s tracking list. This can be done in two easy ways. By default, every vendor window has a dropper in the upper right and there is also a dropper on BuyDropper’s options window. Simply drag and drop an item onto one of these droppers and a window will appear where you can enter the amount you want to track. When you click Accept or press Enter, BuyDropper will print a message showing the item and quantity added to the list.</p>
<div>Dropper</div></div>
<p>The first thing you’ll want to do is add an item to BuyDropper’s tracking list. This can be done in two easy ways. By default, every vendor window has a dropper in the upper right and there is also a dropper on BuyDropper’s options window. Simply drag and drop an item onto one of these droppers and a window will appear where you can enter the amount you want to track. When you click Accept or press Enter, BuyDropper will print a message showing the item and quantity added to the list.</p>
<p>The other way to add items is the /buydropper add command. This duality of GUI/slash commands is seen throughout BuyDropper’s operations. For the rest of the guide, I will focus on the GUI aspects. You can use the Reference below to discover how to use the various commands.</p>
<p style="color: #F00">[TODO: Rest of the documentation. For now, take a look at /buydropper options and the Reference below] </p>
<h2><a name="reference" id="reference"></a>Reference</h2>
268,13 → 269,18
</ul>
</li>
<li>BuyDropper does not yet withdraw items from the bank</li>
<li>Vendor items with limited quantity are not handled properly </li>
</ul>
<p>Please visit <a href="http://cogwheel.wowinterface.com">Cogwheel’s Workshop</a> if you have any suggestions or bug reports, and to see what is in store for the future.</p>
<h2><a name="changes" id="changes"></a>Changes</h2>
<h4>v0.9B4</h4>
<ul>
<li>When you add an item to the tracking list while at a vendor, it will be immediately purchased (or confirmed to be purchased). </li>
<li>You can now remove the last item in the tracking list. </li>
<li>Limited quantity items are now handled appropriately.</li>
</ul>
<h4>v0.9B3</h4>
<ul>
<li>Updated for 3.0.2</li>
<li>Updated for 3.0.2.</li>
</ul>
<h4>v0.9B2-2.3</h4>
<ul>
trunk/BuyDropper/BuyDropperEngine.lua
13,12 → 13,12
end
 
item.amount = amount
 
self:UpdateDisplays()
if MerchantFrame:IsVisible() then
for index, item in self:IterateTrackedMerchantItems() do
self:UpdatePrice(index, item)
end
--for index, item in self:IterateTrackedMerchantItems() do
-- self:UpdatePrice(index, item)
--end
self:ScanMerchant()
end
self:Print("Added %s × %d", link, amount)
end
180,16 → 180,14
 
 
function BuyDropper:UpdatePrice(index, item)
local price, quantity = select(3, GetMerchantItemInfo(index))
item.price = price
item.preset = quantity
item.price, item.preset, item.available = select(3, GetMerchantItemInfo(index))
end
 
 
 
 
function BuyDropper:NumToBuy(item)
local toBuy = item.amount - CogsBagSpace:GetBagItemCount(item.id)
local toBuy = min(item.amount - CogsBagSpace:GetBagItemCount(item.id), item.available)
if item.preset > 1 then
toBuy = (self.db.profile.overstock and ceil or floor)(toBuy/item.preset)
end