Skip to content
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

[BUG] Coins are not removed from inventory when 0 #331

Closed
hallowatcher opened this issue Jun 23, 2021 · 10 comments · Fixed by #340
Closed

[BUG] Coins are not removed from inventory when 0 #331

hallowatcher opened this issue Jun 23, 2021 · 10 comments · Fixed by #340
Labels
bug Something isn't working

Comments

@hallowatcher
Copy link
Contributor

Describe the bug
When spending all coins in your inventory, it should be checked if you have 0. If so, remove the item.

To Reproduce

  1. Grab the coins next to the Lumbridge general store
  2. Buy some stuff
  3. 0 coins are shown in the inventory

Expected behavior
Coins are removed from the inventory

Screenshots
image

@hallowatcher hallowatcher added the bug Something isn't working label Jun 23, 2021
@SchauweM
Copy link
Collaborator

SchauweM commented Jun 23, 2021

@hallowatcher is this item specific or does this count for every stackable item?

@hallowatcher
Copy link
Contributor Author

Good question, I don't know what else deducts from a stackable item other than arrows when using ranged maybe? I know this works when banking notes

@SchauweM
Copy link
Collaborator

Runes, arrows, noted items, purple sweets, seeds, feathers, arrow shafts, nails, bolt tips

@src52
Copy link
Contributor

src52 commented Jul 30, 2021

We can add a check in the inventory/bank's add method that ensures the item being added isn't 0. I experienced this same bug today.

@SchauweM
Copy link
Collaborator

We can add a check in the inventory/bank's add method that ensures the item being added isn't 0. I experienced this same bug today.

Does it actually add 0 of an item? Just wondering since I havn't looked at it yet. But yes this should be added either way. Feel free to create a PR if you think you've got time!

@src52
Copy link
Contributor

src52 commented Jul 30, 2021

We can add a check in the inventory/bank's add method that ensures the item being added isn't 0. I experienced this same bug today.

Does it actually add 0 of an item? Just wondering since I havn't looked at it yet. But yes this should be added either way. Feel free to create a PR if you think you've got time!

image
Yep! The player's save lists it as being a zero amount as well.

@SchauweM
Copy link
Collaborator

We can add a check in the inventory/bank's add method that ensures the item being added isn't 0. I experienced this same bug today.

Does it actually add 0 of an item? Just wondering since I havn't looked at it yet. But yes this should be added either way. Feel free to create a PR if you think you've got time!

image
Yep! The player's save lists it as being a zero amount as well.

Thank you for debugging!

Do you think You'll be able to make a PR with a fix? If not, I'll commit to it next week when I get back.

@src52
Copy link
Contributor

src52 commented Jul 30, 2021

We can add a check in the inventory/bank's add method that ensures the item being added isn't 0. I experienced this same bug today.

Does it actually add 0 of an item? Just wondering since I havn't looked at it yet. But yes this should be added either way. Feel free to create a PR if you think you've got time!

https://user-images.githubusercontent.com/17970489/127699463-7605666b-ec2b-4873-afaf-6908de31e2ee.png
Yep! The player's save lists it as being a zero amount as well.

Thank you for debugging!

Do you think You'll be able to make a PR with a fix? If not, I'll commit to it next week when I get back.

No worries at all, and yes. It's already fixed on my end. I can definitely make a PR. 👍

@SchauweM
Copy link
Collaborator

SchauweM commented Aug 8, 2021

@src52 any news on the PR? If not you can supply the code on the discord or here and I'll add it myself. No need to do double the work 😅

@src52
Copy link
Contributor

src52 commented Aug 10, 2021

@src52 any news on the PR? If not you can supply the code on the discord or here and I'll add it myself. No need to do double the work 😅

This should solve the issue, I believe. #340 checks that the item being added doesn't have a quantity of zero.

@SchauweM SchauweM linked a pull request Aug 11, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants