Baggins

Baggins

1M Downloads

Currently equipped weapon/armor are showing in bags

Anemun opened this issue ยท 10 comments

commented

Good day to you! I'm playing Cataclysm Classic, russian language.
After updating to the new version of Baggins 5.2.0-cata, the inventory now displays items that are currently equipped on the character: weapons, armor, and some (but not all) bags.
baggins-issue

commented

I have the same issue as OP, also on Cataclysm Classic with the english language client.

I've also tried downgrading to v5.1.9 and v5.1.8 without success, so presumably the Small Indie Company silently changed some APIs?

commented

Apparently there was api for keyring in cata ,maybe left over from wrath? idk but apparently keyring is not a thing in cata? Thats part of the issue second part is for some reason Baggins thinks items equiped is in the keyring, im trying to look into it. Sorry for this.

commented

empty keyring slots are gone, thank you! equipped items are still showing in bags, looking forward for the fix

commented

Commenting out lines 446 and 447 in ForceFullUpdate() removes equipment slots from Baggins:

function Baggins:ForceFullUpdate()
--local start = GetTime()
for bagid = 0, 11 do
self:CheckSlotsChanged(bagid, true)
end
self:CheckSlotsChanged(-2,true)
self:CheckSlotsChanged(-1,true)
self:CategoriesChanged()
end

Seems related to the changes to how the bank is handled, since bank slots are no longer retrieved as slots in bag -1, but through the character inventory API?

commented

@Elberet @Anemun maybe you guys can confirm, but making those changes breaks the bank updating, puting items in or removing and bank bags never update, even if I close bank and go back.

commented

Commenting out lines 446 and 447 in ForceFullUpdate() removes equipment slots from Baggins:

function Baggins:ForceFullUpdate()
--local start = GetTime()
for bagid = 0, 11 do
self:CheckSlotsChanged(bagid, true)
end
self:CheckSlotsChanged(-2,true)
self:CheckSlotsChanged(-1,true)
self:CategoriesChanged()
end

Seems related to the changes to how the bank is handled, since bank slots are no longer retrieved as slots in bag -1, but through the character inventory API?

worked for me, thanks!
upd: not really, after any change in bags (new items or even item moved) equipped items shows up again

commented

Yeah, you also need to change the comparison in Baggins.lua:1155 from <= 4 to < 0.

commented

Yeah, you also need to change the comparison in Baggins.lua:1155 from <= 4 to < 0.

that worked, thank you

commented

Yeah, it's most likely the change in Baggins:OnBagUpdate that the bank. I believe the BAG_UPDATE event still sends -1 when the bank contents were updated, even tho items in that bank should really be queried through the inventory API instead of the container API. I really just hacked the thing so I could play the game. ๐Ÿ˜‰

That said, I've changed the conditional to if bagid < -1 then return end and that seem to allow bank updates as normal.

At least in Cataclysm right now. I haven't the foggiest how any of these changes would affect classic or retail.

commented

@Elberet @Anemun I have commited this change and pushed out a release with it, a68c391 . This seemed to work including bank updating and changes only apply to cata, Other wow versions don't appear to have this issue, either they are not using new api or there is a bug in the cata api, either way for now this change will only apply to cata. Let me know if you guys still have issues.