From d30d5baafea7ffb56d831384e85d4b7009c39917 Mon Sep 17 00:00:00 2001 From: atomaka Date: Thu, 30 Jun 2011 17:19:50 -0400 Subject: [PATCH] Don't attempt to stack if the item cannot be stacked. --- GemStacker.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GemStacker.lua b/GemStacker.lua index 67b3783..d18a4d6 100644 --- a/GemStacker.lua +++ b/GemStacker.lua @@ -16,10 +16,10 @@ function core:StackGems(_,message) local sourceContainer,sourceSlot,destContainer,destSlot = -1,-1,-1,-1; for bag = 0,4 do for slot = 1,GetContainerNumSlots(bag) do - itemId = GetContainerItemID(bag,slot) + local itemId = GetContainerItemID(bag,slot) if(itemId) then - itemName = GetItemInfo(itemId); - if(gem == itemName) then + local itemName,_,_,_,_,_,_,maxStack = GetItemInfo(itemId); + if(gem == itemName and maxStack ~= 1) then local _,count = GetContainerItemInfo(bag,slot); if(count == 1 and sourceContainer < 0) then sourceContainer = bag;