Skip to content

Commit

Permalink
Removed free slot section constraints from gridview
Browse files Browse the repository at this point in the history
Small possible fix to free slots in classic.
  • Loading branch information
Cidan committed Mar 18, 2024
1 parent dda7bc1 commit c58ff17
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion data/items.lua
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ function items:BackpackLoadFunction()
local invid = C_Container.ContainerIDToInventoryID(bagid)
local baglink = GetInventoryItemLink("player", invid)
if baglink ~= nil then
local class, subclass = select(6, GetItemInfoInstant(baglink)) --[[@as number]]
local class, subclass = select(12, GetItemInfo(baglink)) --[[@as number]]
name = GetItemSubClassInfo(class, subclass)
extraSlotInfo.emptySlots[name] = extraSlotInfo.emptySlots[name] or 0
extraSlotInfo.emptySlots[name] = extraSlotInfo.emptySlots[name] + freeSlots
Expand Down
2 changes: 1 addition & 1 deletion views/gridview.lua
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ local function GridView(view, bag, slotInfo)
end

-- Draw the free slots section.
freeSlotsSection:SetMaxCellWidth(2)
freeSlotsSection:SetMaxCellWidth(sizeInfo.itemsPerRow)
freeSlotsSection:Draw(bag.kind, database:GetBagView(bag.kind), false)

view.content.maxCellWidth = sizeInfo.columnCount
Expand Down

0 comments on commit c58ff17

Please sign in to comment.