Describe the bug
When using a player shop(store item) and 2 players join the shop if the first player leaves the shop it will close the second player’s shop as well
To Reproduce
Steps to reproduce the behavior:
- Open a player store with 1 client
- Open another 2 client and join the shop
- Leave the shop if the first player in the shop
Expected behavior
Only the first player should be removed fron the shop
This happens due to wrong value in packet creator.
In packet creator at getPlayerShop you will see
p.writeByte(owner ? 0 : 1);
which is actually the player slot on the client side, it needs to be the visitor position, also the positions on client are actually 0,1,2,3, 0 being the shop owner, the bug happens cause all of the players gets the same slot (1) so if slot 1 leaves all the client thinks it is they who should close the shop
Describe the bug
When using a player shop(store item) and 2 players join the shop if the first player leaves the shop it will close the second player’s shop as well
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Only the first player should be removed fron the shop
This happens due to wrong value in packet creator.
In packet creator at getPlayerShop you will see
which is actually the player slot on the client side, it needs to be the visitor position, also the positions on client are actually 0,1,2,3, 0 being the shop owner, the bug happens cause all of the players gets the same slot (1) so if slot 1 leaves all the client thinks it is they who should close the shop