nuclearsilo583 / zephyrus-store-preview-new-syntax

My rewritten zephyrus store
61 stars 40 forks source link

Fixed items being removed in a certain scenario #33 #131

Closed azalty closed 1 year ago

azalty commented 1 year ago

Fixes #33 (original issue with items disappearing): a rather critical bug

Items would get removed from a player's inventory if they removed it then got it again in the same map. This bug affected every store item.

Items are deleted through the save inventory function, but they aren't marked as "already deleted": each call of the save inventory will do a query to delete the store item until it is cleared from memory (map change/player disconnect)

Thus, this data loss bug will only happen if no rowid is assigned, which only happens if the item was purchased on the same map:

✅ Compiles fine ✅ Tested in game and works

nuclearsilo583 commented 1 year ago

thanks