Closed Fiskmans closed 2 months ago
I cant make this happen from my end. Maybe you can try to provide screenrecording how u get it to happen? Start from no items on you for example.
https://youtu.be/2xxVf9tAFxc The video was too big to attach directly to the comment
The code paths seem to diverge in Store.getInventoryItemQuantity(itemId)
currentItems
contains the item (Guthans platebody 100) so the function returns 1
currentItems
is empty and the function returns 0
https://github.com/TicTac7x/runelite-plugins/assets/8762029/06661666-1e20-4cb1-9c1b-705e034ea963
This bug seems to be related
If you have two items with fixed charges and the same id the charges get merged in the infobox text. As soon as the id of one of the trigger items changes (degrades to guthans 100) the charges no longer add up
Thanks for all the details. It didn't happen for me, because i had faulty config value left from some previous version. Anyways, tracked it down, the same thing was causing waterskins not showing proper total value as well.
I will also add a extra check, basically if you have fixed item equipped, the infobox shows 100, but if you unequip it and you have 4 items in inventory now, it would show 400. Basically to make sure that equipment items are prioritized, otherwise you are wearing barrows item that is broken, but infobox still shows as if it was not broken. Hope this makes sense and sounds good to you as well?
If you want to do a test run with the changes, then https://github.com/TicTac7x/runelite-plugins/commit/b8efad2a562ebafd76f46cf30eb39555ebbde259 (latest commit on plugin-charges branch).
Thats sounds like a good solution. The slight change in behaviour from equipped and unequipped items could be confusing to some, but I suspect it wont come up very often enough to be an issue.
May I suggest updating the tooltip in the case where the equipped item is hiding the charges of your unequipped items Something like:
Equipped: 75 </br>
Inventory: 400
Describe how the bug happened Worn barrows items infoboxes show a text of 0 for charge when worn The tooltip appears to be correct
Expected behavior The infobox text should match the charges of the barrows item
Screenrecording/Screenshots
While worn
While in inventory
Note: Infoboxes with yellow text is from Partial sets and is unrelated