|
|
|
-- 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 |
|
|