From 48abbd8aba29b56bc934cbd3ada9f024ad110b82 Mon Sep 17 00:00:00 2001 From: parnic Date: Mon, 1 Dec 2008 01:49:17 +0000 Subject: [PATCH] - changed stack-merging code to compare item id's instead of item links since links don't work due to unique identifiers (durrr) --- Breakables.lua | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Breakables.lua b/Breakables.lua index c4f9dfd..7fd30bc 100644 --- a/Breakables.lua +++ b/Breakables.lua @@ -213,8 +213,6 @@ function Breakables:FindBreakablesInSlot(bagId, slotId) local texture, itemCount, locked, quality, readable = GetContainerItemInfo(bagId, slotId) if texture then local itemLink = GetContainerItemLink(bagId, slotId) - - local _, _, _, _, _, itemType, itemSubType, _, _, itemTexture = GetItemInfo(itemLink) if (CanMill and itemSubType == MillingItemSubType) @@ -227,11 +225,10 @@ function Breakables:FindBreakablesInSlot(bagId, slotId) end function Breakables:MergeBreakables(foundBreakable, breakableList) + local _, foundItemId = strsplit(":", foundBreakable[IDX_LINK]) for n=1,#breakableList do - local existingLink, existingCount, existingType = breakableList[n] - local itemLink, itemCount, itemType = foundBreakable - - if foundBreakable[IDX_LINK] == breakableList[n][IDX_LINK] then + local _, listItemId = strsplit(":", breakableList[n][IDX_LINK]) + if foundItemId == listItemId then breakableList[n][IDX_COUNT] = breakableList[n][IDX_COUNT] + foundBreakable[IDX_COUNT] return true end