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] Trunk/Apartment Stash Lost Items #308

Closed
nzkfc opened this issue Jul 27, 2022 · 20 comments · Fixed by #376
Closed

[BUG] Trunk/Apartment Stash Lost Items #308

nzkfc opened this issue Jul 27, 2022 · 20 comments · Fixed by #376
Assignees
Labels
bug Something isn't working

Comments

@nzkfc
Copy link
Contributor

nzkfc commented Jul 27, 2022

Describe the bug
When we had lj-inventory we had issues where inventory items would just go into a void, it would either be:
Apartment stash: they would move items and it would just drop on the floor, but they could not see the drop due to the way apartments work, someone else in their apartment would get a random item on the floor.

Vehicle trunk: players would move a stack of items into their trunk or similar and it would just POOF and dissapear.

SO we moved over to qb-inventory and found the issue still exists, it's intermittent but does happen everyday for a lot of players, our ticket system is full of refund requests.

To Reproduce
Intermittent but:

  1. Transfer say a stack of 10 items
  2. It drops into a void OR it goes into the stash/trunk
  3. Close stash/trunk and go back in and it's not there.

Expected behavior
Trunk/stash movements work

Screenshots
An example of a trunk move getting lost:
https://medal.tv/clips/u3YKv6t3-UDHc/vpK2EQh22?invite=cr-MSxueUgsNjIyMDMxMDQs

Questions (please complete the following information):

  • When you last updated: 1 week ago
  • Are you using custom resource? which ones? Yeah a few, but nothing that interacts with inventory.
  • Have you renamed qb- to something custom? No

Additional context
N/A

@nzkfc nzkfc added the bug Something isn't working label Jul 27, 2022
@nzkfc
Copy link
Contributor Author

nzkfc commented Jul 31, 2022

Just to add to this, it seems to happen a lot when people drag say a pistol onto another thinking it will stack, says it can't but eats the gun (right away or after closing inventory)

Or if you say drop a pistol onto handcuffs

@Z3MO
Copy link

Z3MO commented Aug 3, 2022

Your Inv was full that's why it disappeared , my inv performs perfectly. If the inv is full its shouldn't take items in your inv.

@nzkfc
Copy link
Contributor Author

nzkfc commented Aug 3, 2022

Your Inv was full that's why it disappeared , my inv performs perfectly. If the inv is full its shouldn't take items in your inv.

Nope, clearly you can see the pock weight: https://i.imgur.com/iWOBTT8.png

He dragged more weight then he could hold into pocket from the trink, the notification confirms that, however the wheels still dissapeared....

The ISSSUE is that if you drag something into a stash/pocket/trunk or whichever and the destination is full, it should state that but not make the item go away from either.....

@nzkfc
Copy link
Contributor Author

nzkfc commented Aug 22, 2022

Some more examples, we average about 10 tickets a day for missing items, mostly apartment stash dropping instead of going into stash.

https://i.imgur.com/8ihQ0uB.png

https://medal.tv/games/gta-v/clips/xCoDWFMo7odqH/sbETIolxQGGw?invite=cr-MSwwUkEsODUyNjMyNjIs

Can see he drags the pump over to the pistol, they swap, then on exit he gets the pistol back and opens boot and the pump, AK and a MK2 pistol is gone burgers.

@Aero-Codes
Copy link

Aero-Codes commented Sep 4, 2022

Try this fix

3fb2a13

@nzkfc
Copy link
Contributor Author

nzkfc commented Sep 5, 2022

Try this fix

3fb2a13

Thanks, I gave it a go and it seems to be working, however I noticed items that are stackable can no longer stack?

Video:
https://youtu.be/YqH7FQGqyY0

Example stone:

		["stone"] 						 = {["name"] = "stone", 			  	  	  	["label"] = "Stone", 					["weight"] = 100, 		["type"] = "item", 		["image"] = "stone.png", 				["unique"] = false, 	["useable"] = false, 	["shouldClose"] = false,   ["combinable"] = nil,   ["description"] = "Just a Stone"},```

@Aero-Codes
Copy link

It shouldn't be a problem maybe you did it wrong. the one, I did is it check if the item is unique item

@nzkfc
Copy link
Contributor Author

nzkfc commented Sep 24, 2022

I just did a full update of all qb- scripts, hoping the changes I saw between qb-core and qb-inventory was to resolve this issue but it seems it's not. Moving an item from inventory to stash and dropping it ontop of another item seems to make the item go away after you re-open inventory.

Example video: https://www.youtube.com/watch?v=ZkdSaa8Gic4

@nzkfc
Copy link
Contributor Author

nzkfc commented Sep 24, 2022

Seems it's related to slot 1 and the items in it,

For example if I put a pistol in slot 3 and 4 of the stash/trunk, then I go out and back in, drag a 3rd pistol from inventory and drop it onto slot 3, it will put the dragged pistol into slot 2 on re-opening of stash/trunk.

If you then do the above but drag a 4th to slot 2, it goes into slot 1. Everything is fine.

But if you have anything in slot 1 and try to drag onto slot 2/3/4 etc that is the SAME item as whats being dragged and is unique, then the first slot of trunk/stash gets nuked.

Here is another example which clearly shows the issue:
https://youtu.be/cqRPjYNtzcg

Ideally what needs to happen is if you drag a unique onto another, it should notify the player "You cannot stack this item" or similar, then either not transfer it, or maybe pop it into a spare slot (if not room then "You have no space to move this" or similar.

@nzkfc
Copy link
Contributor Author

nzkfc commented Sep 26, 2022

It shouldn't be a problem maybe you did it wrong. the one, I did is it check if the item is unique item

Did you managed to re-work that PR?

@nzkfc
Copy link
Contributor Author

nzkfc commented Oct 4, 2022

It shouldn't be a problem maybe you did it wrong. the one, I did is it check if the item is unique item

Did you managed to sort that original PR? the one that fixed it but stopped the ability to stack non-unique items?

@tom-osborne
Copy link
Contributor

I am struggling to replicate this. I am guessing it is intermittent?

@nzkfc
Copy link
Contributor Author

nzkfc commented Nov 6, 2022 via email

@nzkfc
Copy link
Contributor Author

nzkfc commented Nov 7, 2022

I am struggling to replicate this. I am guessing it is intermittent?

It seems if you drag items into slot 2/3/4/5/6 etc in the trunk/stash/glovebox and the item is unique, it gets confused and zaps slot 1 item and then so on.

I wipe my qb-core local that only has default recipie, booted up and made new character and then did the inventory bug:

Trunk Example: https://youtu.be/vYKFu2CJtEo
Stash Example: https://youtu.be/5UacTKonBEs

@tom-osborne
Copy link
Contributor

Interesting, thats a good demonstration thanks for that. I will look into it this week.

@tom-osborne tom-osborne self-assigned this Nov 7, 2022
@tom-osborne
Copy link
Contributor

I am struggling to replicate this. I am guessing it is intermittent?

It seems if you drag items into slot 2/3/4/5/6 etc in the trunk/stash/glovebox and the item is unique, it gets confused and zaps slot 1 item and then so on.

I wipe my qb-core local that only has default recipie, booted up and made new character and then did the inventory bug:

Trunk Example: https://youtu.be/vYKFu2CJtEo Stash Example: https://youtu.be/5UacTKonBEs

Replicated this after following the steps in your video. Thank you for that demonstration.

I belive the above linked PR fixes this issue properly, but I will leave it open for testing to make sure. It seemed to work 100% for that specific test case during my testing, but I think this would benefit from a few other testers.

@nzkfc
Copy link
Contributor Author

nzkfc commented Nov 7, 2022

I am struggling to replicate this. I am guessing it is intermittent?

It seems if you drag items into slot 2/3/4/5/6 etc in the trunk/stash/glovebox and the item is unique, it gets confused and zaps slot 1 item and then so on.
I wipe my qb-core local that only has default recipie, booted up and made new character and then did the inventory bug:
Trunk Example: https://youtu.be/vYKFu2CJtEo Stash Example: https://youtu.be/5UacTKonBEs

Replicated this after following the steps in your video. Thank you for that demonstration.

I belive the above linked PR fixes this issue properly, but I will leave it open for testing to make sure. It seemed to work 100% for that specific test case during my testing, but I think this would benefit from a few other testers.

Try it with a stackable item like washed_stone or something, with the above fix, as far as I remember, when I implemented this it worked but it also broke non-unique items being stacked, they just won't stack after. I mentioned this but the guy just kept saying I implemented it incorrectly lol (not saying it could be something we customised though)

I will re-test with this fix on fresh in 5 hours and have a look.

@tom-osborne
Copy link
Contributor

Yeah you could be right, I was afraid of something like that. I'll test stacked items

@tom-osborne
Copy link
Contributor

Stacked items seem to work fine for me.

@nzkfc
Copy link
Contributor Author

nzkfc commented Nov 8, 2022

Stacked items seem to work fine for me.

IIIIITTTTTTT WOOOOOOOOOOOOOOOOOOKRS! WOOOOOOOOOOOOOOOOOOOOO!

BOX IT!

SHIP IT!

<3

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.

4 participants