Skip to content

Commit

Permalink
Fix Bags Not Updating New Items When Bags Open
Browse files Browse the repository at this point in the history
  • Loading branch information
doadin committed Jul 11, 2024
1 parent 2d54c07 commit 062b38e
Showing 1 changed file with 2 additions and 24 deletions.
26 changes: 2 additions & 24 deletions Baggins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4081,16 +4081,6 @@ function Baggins:OpenBag(bagid,_) --bagid,noupdate
self:UpdateLayout()
self:UpdateTooltip()

-- reuse self.doInitialUpdate to only run once
-- this fixes the duplicate stacks bug upon login
--if self.doInitialUpdate then
--self:RunBagUpdates("BAG_UPDATE",1)
--self:RunBagUpdates("BAG_UPDATE",2)
--self:RunBagUpdates("BAG_UPDATE",3)
--self:RunBagUpdates("BAG_UPDATE",4)
-- this time we set to nil so this only runs the first time
--self.doInitialUpdate = false
--end
PlaySound(862)
end

Expand All @@ -4105,21 +4095,9 @@ function Baggins:OpenAllBags()
Baggins:OpenBag(bagid,true)
end
end
if self.bankIsOpen and self.doInitialBankUpdate then
self:RunBagUpdates("BAG_UPDATE",1)
--self:RunBagUpdates("BAG_UPDATE",2)
--self:RunBagUpdates("BAG_UPDATE",3)
--self:RunBagUpdates("BAG_UPDATE",4)
self.doInitialBankUpdate = false
end

if not self.bankIsOpen and self.doInitialUpdate then
self:RunBagUpdates("BAG_UPDATE",1)
--self:RunBagUpdates("BAG_UPDATE",2)
--self:RunBagUpdates("BAG_UPDATE",3)
--self:RunBagUpdates("BAG_UPDATE",4)
self.doInitialUpdate = false
end
self:RunBagUpdates("BAG_UPDATE",1)

self:UpdateLayout()
self:FireSignal("Baggins_RefreshBags")
PlaySound(862)
Expand Down

0 comments on commit 062b38e

Please sign in to comment.