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

Fix item duplication on containers with more items than cap #1126

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Kamenuvol
Copy link
Contributor

Description

If there is a container without pagination and more items than its capacity, the last item is duplicated when removing items. This commit fixes it and also make Container::addItem more symmetric with Container::removeItem.

Behavior

Actual

Add more items to a container than its capacity. Different items to see better the difference.
Remove any of them until when you would had an empty space, but there will be no empty space, just a duplicated last item.
image

Expected

Only one last item (skull staff)

Type of change

  • Bug fix (non-breaking change which fixes an issue)

If there is a container without pagination and more items than its capacity, the last item is duplicated when removing items.

This commit fixes it and also make Container::addItem more symmetric with Container::removeItem.
@mehah mehah requested a review from kokekanon March 24, 2025 21:43
@kokekanon
Copy link
Collaborator

I can't reproduce the error that this PR is trying to fix. Also, I see that you're using release 3.5.

i test in main repo
canary 11.00

player knight cap 1065, level 69
bag client id : 2854 "backpack" 20 slot
image

Can you be more clear, the steps to reproduce the error?

@Kamenuvol
Copy link
Contributor Author

I can't reproduce the error that this PR is trying to fix. Also, I see that you're using release 3.5.

i test in main repo canary 11.00

player knight cap 1065, level 69 bag client id : 2854 "backpack" 20 slot image

Can you be more clear, the steps to reproduce the error?

A backpack, for example, has 20 spaces, fill it with 21 items forcing using flag, then remove the items.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants