Stack-sold items changed with 4.0

This commit is contained in:
tekkub 2010-10-14 23:09:52 -06:00
parent 40b8f84fc1
commit 284bbef470
1 changed files with 3 additions and 3 deletions

View File

@ -50,7 +50,6 @@ end
local function Purchase(id, quantity) local function Purchase(id, quantity)
local _, _, _, vendorStackSize, numAvailable = GetMerchantItemInfo(id) local _, _, _, vendorStackSize, numAvailable = GetMerchantItemInfo(id)
local maxPurchase = GetMerchantItemMaxStack(id) local maxPurchase = GetMerchantItemMaxStack(id)
quantity = quantity/vendorStackSize
if numAvailable > 0 and numAvailable < quantity then quantity = numAvailable end if numAvailable > 0 and numAvailable < quantity then quantity = numAvailable end
local purchased = 0 local purchased = 0
@ -67,8 +66,9 @@ local function BuyItem(self, fullstack)
local link = GetMerchantItemLink(id) local link = GetMerchantItemLink(id)
if not link then return end if not link then return end
local _, _, _, _, _, _, _, stack = GetItemInfo(link) local _, _, _, vendorStackSize = GetMerchantItemInfo(id)
Purchase(id, fullstack and stack or 1) local _, _, _, _, _, _, _, itemStackSize = GetItemInfo(link)
Purchase(id, fullstack and itemStackSize or vendorStackSize or 1)
end end