-
Notifications
You must be signed in to change notification settings - Fork 173
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: buyback inventory live accuracy #1607
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic is fine overall, but where stuff is living has some interesting decisions based on how you decided to implement the logic for the buyback inventory. We will convene over discord at some point and discuss how to design the API in a more robust way.
All logs in this PR should be removed when finished unless they are reporting an error, alongside the comment about if there is a bug if thats ok, in this case no it is not because it is an easily fixed bug and this feature is not critical enough to replace a bug with another one
Any updates on this? Is it ready for review? |
Changes made: Modified inventorycomponent.cpp and inventorycomponent.h to include a queue to keep track of item ids when items are being sold to a vendor. This also comes with two new methods, which accomplish this.
What was fixed: Buyback inventory size of27 will be maintained and there will always be an empty slot, at the end reopening the oldest item slot which is the first slot in the inventory, which was not live accurate and prevented players from being able to buy back any further items past the 27 item limit.
Way things were tested: Selling 27+ items, of multiple different types, some with stack sizes. It functions as intended, emptying the oldest slot in the vendor inventory when items are being sold. These changes should not affect other portions of inventories as this will only be applied when the inventory a vendor buyback type.
Thanks for the patience on this one