Skip to content

Conversation

@CommitToday
Copy link

Overview

This PR implements a cooldown mechanism for the Enchanted Armoire purchases to prevent users from making rapid consecutive purchases. A 2-second cooldown has been added, and a new user flag tracks the last purchase time.

Checklist

  • Code changes implemented
  • New user schema field added
  • UI messages added for cooldown notification
  • Tests updated (pending)
  • Documentation updated

Proof

The fix adds a check in buyArmoire.js to verify the time elapsed since the last purchase before allowing a new one. If the cooldown period hasn't passed, an error message is thrown. The user's last purchase time is updated after a successful purchase. The new message armoirePurchaseTooFast is included in the English and British English locales.

Closes #15546

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.

1 participant