-
Notifications
You must be signed in to change notification settings - Fork 9
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
Discounts not calculating properly (100% discount, "You do not have enough tokens") #840
Comments
Hi, thanks for the report. I checked the code, and it does check the discounted price. I would suggest creating a simpler test case where it checks for a 50% discount, or something like that, on a 10 token item. You can then begin with a balance of 0 and slowly add tokens until it's purchased. This should give an indication whether it's an actual bug with the discount price, or something else. |
Hello @mvaessen - I can confirm that a 50% discount role works as intended. My test case was a shop item for 150,000 tokens and a discounted rate of 50% and a player with a balance around 100,000. This did in fact work, resulting in the player with a remaining balance around 25,000 as intended. That said it appears that the issue is not with the before/after balance comparison (as the player had enough tokens to buy the discounted price but not the full price, yet the discount worked) but possibly with a zero-cost shop pack. I have a use case where a player might be offered a 100% discount, and this is something that should be working as a 100% discount role is something that the website allows us to do. I'm able to perform more testing if you need, let me know. Thanks! |
hi, thanks for the extra info, that is very helpful. I'm currently not able to fix this, but I will check it out later when the current work-in-progress is released later this month. |
Please make sure to leave out any sensitive information!
Describe the bug
Discounts are not currently checking if the player's balance is above the discounted price, but instead the pre-discount price. For instance if I have a balance of 100,000 tokens and a store item costs 200,000 pre-discount, a 100% discount should allow me to purchase the item. However, the store says that I do not have enough tokens.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Allowed to purchase the item
Screenshots
Additional context
N/A
The text was updated successfully, but these errors were encountered: