From 284bbef470fcd9954f61f6e0b99af65797a91ba9 Mon Sep 17 00:00:00 2001 From: tekkub Date: Thu, 14 Oct 2010 23:09:52 -0600 Subject: [PATCH] Stack-sold items changed with 4.0 --- GnomishVendorShrinker.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GnomishVendorShrinker.lua b/GnomishVendorShrinker.lua index 90e8448..3bdcf60 100644 --- a/GnomishVendorShrinker.lua +++ b/GnomishVendorShrinker.lua @@ -50,7 +50,6 @@ end local function Purchase(id, quantity) local _, _, _, vendorStackSize, numAvailable = GetMerchantItemInfo(id) local maxPurchase = GetMerchantItemMaxStack(id) - quantity = quantity/vendorStackSize if numAvailable > 0 and numAvailable < quantity then quantity = numAvailable end local purchased = 0 @@ -67,8 +66,9 @@ local function BuyItem(self, fullstack) local link = GetMerchantItemLink(id) if not link then return end - local _, _, _, _, _, _, _, stack = GetItemInfo(link) - Purchase(id, fullstack and stack or 1) + local _, _, _, vendorStackSize = GetMerchantItemInfo(id) + local _, _, _, _, _, _, _, itemStackSize = GetItemInfo(link) + Purchase(id, fullstack and itemStackSize or vendorStackSize or 1) end