WoWInterface SVN BuyDropper

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 8 to Rev 9
    Reverse comparison

Rev 8 → Rev 9

BuyDropper/BuyDropper.toc
1,7 → 1,7
## Interface: 32000
## Author: Cogwheel
## Author: Cogwheel, maintained by Ellira
## Title: BuyDropper
## Version: 0.9B4
## Version: 0.9B5
## Notes: Keeps you stocked with items from merchants or your bank.
## X-Website: http://cogwheel.info
## X-Category: Inventory
BuyDropper/BuyDropperEngine.lua
185,13 → 185,24
 
 
 
-- Adding patch from sag_ich_nicht from WoWInterface comments to fix version 0.9B4
function BuyDropper:NumToBuy(item)
if item.available ~= -1 then
--Item count is not -1, which means it's limited quantity. Determine available quantity and how much we want to buy.
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
return toBuy
else
--Item count is -1, which means infinite quantity. Get amount we want and get out of here.
local toBuy = item.amount - CogsBagSpace:GetBagItemCount(item.id)
if item.preset > 1 then
toBuy = (self.db.profile.overstock and ceil or floor)(toBuy/item.preset)
end
 
function BuyDropper:NumToBuy(item)
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
return toBuy
return toBuy
end
end