7th Bank Bag not appearing in bag frame popout #28


  • Defect
Open
  • ppopek created this issue Dec 23, 2021

    While running Onebag (3.11.1) in TBC I only get a popout of 2x6 bags when reviewing equipped bags. I have to disable Onebag to see that I have a 7th bag slot and to equip a bag to that sot. Once Equipped Onebank functions and shows the contents of that bag without issue, but I'm unable to increase the bag size because the bag isn't present within the bag frame with the other bags.

     

    In the screenshot you can see the bags organized using bag break. You can see the main Bank and 7 groups of bags, however  in the Upper left you only see 6 bags presented as options to the player to swap bags in or out. There is no visible option that extends or adds that last bag to this frame.

     

    https://imgur.com/a/ypuHBaX

     

    Edit.

    There are no Lua Errors when interacting with this last bag or storing items, stacks, or anything in it.

  • ppopek added a tag Defect Dec 23, 2021
  • ppopek edited description Dec 23, 2021
  • ppopek posted a comment Dec 23, 2021

    Looking through the code it seems to be in this loop here where it's maximum is hard coded into the loop of the function self.sidebar:SetScript("OnShow", function()

     

    self.sidebar:SetScript("OnShow", function()
    		if not self.sidebar.buttons then
    			self.sidebar.buttons = {}
    
    			for row=1, 3 do
    				local b1ID, b2ID = row * 2 - 1, row * 2
    				local yOffset = 0 - 10 - ((row - 1) * self.rowHeight)

     

    This will only ever generate a 3 rows of 2 buttons each which means we are missing a button, additionally you are registering/creating 2 buttons per row so simply modifying the loop to create that last row will work but throw an exception for button2 in that 4th row as it's not actually valid.

     

  • ppopek posted a comment Dec 23, 2021

    This can be mitigated by adjusting the OnShow Function for TBC, however this will need to be revisted to be workable with existing classic code.

     

    Example of manual fix listed below. https://imgur.com/a/tmPs6Sl

     

     

    local sidebarRows = self.IsRetail and 4 or 3
    
    	self.sidebar:CustomizeFrame(self.db.profile)
    	self.sidebar:SetHeight(sidebarRows * self.rowHeight + self.bottomBorder + self.topBorder + 24)
    	self.sidebar:SetWidth(2 * self.colWidth + self.leftBorder + self.rightBorder)
    
    	self.sidebar:SetScript("OnShow", function()
    		if not self.sidebar.buttons then
    			self.sidebar.buttons = {}
    
    			for row=1, 4 do
    				local b1ID, b2ID = row * 2 - 1, row * 2
    				local yOffset = 0 - 10 - ((row - 1) * self.rowHeight)
    
    				local button = self:CreateBagButton(b1ID, self.sidebar)
    				button:ClearAllPoints()
    				button:SetPoint("TOPLEFT", self.sidebar, "TOPLEFT", self.leftBorder, yOffset)
    				self.sidebar.buttons[b1ID] = button
    
    				if (row < 4) then
    					local button2 = self:CreateBagButton(b2ID, self.sidebar)
    					button2:ClearAllPoints()
    					button2:SetPoint("TOPLEFT", self.sidebar, "TOPLEFT", self.leftBorder + self.colWidth , yOffset)
    					self.sidebar.buttons[b2ID] = button2
    				end
    
    			end
    
                if self.IsRetail then
                    local button = self:CreateBagButton(7, self.sidebar)
                    button:ClearAllPoints()
                    button:SetPoint("TOP", self.sidebar, "TOP", 0, 0 - 10 - (3 * self.rowHeight))
                    self.sidebar.buttons[7] = button
    			end
    
    			for _, button in pairs(self.sidebar.buttons) do
    				BankFrameItemButton_Update(button)
    			end
    		end

     


    Edited Dec 23, 2021

To post a comment, please login or register a new account.