diff --git a/core/Hooks.lua b/core/Hooks.lua index 49957a11..b9957f8d 100644 --- a/core/Hooks.lua +++ b/core/Hooks.lua @@ -77,7 +77,7 @@ function addon:GetContainerFrame(id, spawn) if spawn then local size = GetContainerNumSlots(id) if size > 0 then - local frame = ContainerFrame_GetOpenFrame() + local frame = ContainerFrame_GetOpenFrame(id) ContainerFrame_GenerateFrame(frame, size, id) end end diff --git a/widgets/ItemButton.lua b/widgets/ItemButton.lua index 73f22745..d8f19daa 100644 --- a/widgets/ItemButton.lua +++ b/widgets/ItemButton.lua @@ -254,7 +254,7 @@ end -------------------------------------------------------------------------------- function buttonProto:OnShow() - self:RegisterEvent('BAG_UPDATE_COOLDOWN', 'UpdateCooldown') + self:RegisterEvent('BAG_UPDATE_COOLDOWN', 'UpdateCooldownCallback') self:RegisterEvent('ITEM_LOCK_CHANGED', 'UpdateLock') self:RegisterEvent('QUEST_ACCEPTED', 'UpdateBorder') self:RegisterEvent('BAG_NEW_ITEMS_UPDATED', 'UpdateNew') @@ -322,7 +322,7 @@ function buttonProto:Update() end self:UpdateCount() self:UpdateBorder() - self:UpdateCooldown() + self:UpdateCooldown(self.texture) self:UpdateLock() self:UpdateNew() if addon.isRetail then @@ -367,9 +367,16 @@ function buttonProto:UpdateSearch() end end -function buttonProto:UpdateCooldown() - -- TODO(lobato): Figure out where this function disappeared to? - --return ContainerFrame_UpdateCooldown(self.bag, self) +do + if not addon.isRetail then + function buttonProto:UpdateCooldown(texture) + return ContainerFrame_UpdateCooldown(self.bag, self) + end + end +end + +function buttonProto:UpdateCooldownCallback() + self:UpdateCooldown(self.texture) end function buttonProto:UpdateNew()