Skip to content

Commit

Permalink
Update Bags.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
noname08662 authored Jan 16, 2025
1 parent 8aa040d commit 41a6511
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions Modules/General/Bags.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,14 @@ local LSM = E.Libs.LSM
local LibProcessable = LibStub("LibProcessable")

local modName = mod:GetName()
local buttonMap, itemCounts, tooltipInfo = {}, {}, {}
local buttonMap, tooltipInfo = {}, {}
local equipmentSets = {}
local removingBag = false

mod.initialized = {}
mod.localhooks = {}

mod.buttonMap = buttonMap
mod.itemCounts = itemCounts

local prospectingSpellID = 31252
local disenchantingSpellID = 13262
Expand Down Expand Up @@ -1618,7 +1617,6 @@ function mod:ConfigureContainer(f, isBank, db, numColumns, buttonSize, buttonSpa
local button = bag[slotID]
if button.hasItem then
local itemID = B_GetItemID(nil, bagID, slotID)
itemCounts[itemID] = GetItemCount(itemID)
button.itemID = itemID
tinsert(buttons, button)
else
Expand Down Expand Up @@ -1888,7 +1886,6 @@ function mod:ConfigureContainer(f, isBank, db, numColumns, buttonSize, buttonSpa
for _, button in ipairs(buttonsSpecial) do
if button.hasItem then
local itemID = B_GetItemID(nil, bagID, button.slotID)
itemCounts[itemID] = GetItemCount(itemID)
button.itemID = itemID
tinsert(processedSection.buttons, button)
section.storedPositions[bagID..'-'..button.slotID] = #processedSection.buttons
Expand Down Expand Up @@ -2620,7 +2617,6 @@ function mod:UpdateSlot(self, f, bagID, slotID)
button:Hide()
local itemID = button.itemID
if itemID then
itemCounts[itemID] = GetItemCount(itemID)
button.itemID = nil
local currentSection = bagMap[slotID]
if currentSection then
Expand Down Expand Up @@ -2659,7 +2655,7 @@ function mod:UpdateSlot(self, f, bagID, slotID)
elseif not oldID then
local targetSection
buttonMap[f][button] = nil
if itemCounts[itemID] ~= itemCount and not button:IsVisible() then
if not button:IsVisible() then
button.highlight:Show()
end

Expand Down Expand Up @@ -2715,10 +2711,6 @@ function mod:UpdateSlot(self, f, bagID, slotID)
end
button.atHeader = nil
end
if oldID and oldID ~= itemID then
itemCounts[oldID] = GetItemCount(oldID)
end
itemCounts[itemID] = itemCount
button.itemID = itemID
end
end
Expand Down

0 comments on commit 41a6511

Please sign in to comment.