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

fix(commerce): allow the server to refresh sku's after initial load #3056

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

AvarianKnight
Copy link
Contributor

@AvarianKnight AvarianKnight commented Jan 6, 2025

Was talking with @The-Neco about the usage of some of the commerce natives but found that their usage was extremely limited because they could not be updated after the first request.

Goal of this PR

Allow LoadPlayerCommerceDataExt to reload player SKUs while in game, this currently only fetched once and cannot be updated until the player rejoins, this adds unnecessary friction.

This allows LoadPlayerCommerceDataExt to fetch the players packages again once every 10 seconds.

How is this PR achieving the goal

Calls to LoadPlayerCommerceDataExt after 10 seconds will refresh the clients SKUs

This PR applies to the following area(s)

Server

Successfully tested on

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

- If users were to buy a new package while already in game this would still return that they didn't own the specified sku and it would stay like this until they rejoined, this isn't good user experience so instead we allow the server to refresh the skus once every 10 seconds
@github-actions github-actions bot added triage Needs a preliminary assessment to determine the urgency and required action invalid Requires changes before it's considered valid and can be (re)triaged and removed triage Needs a preliminary assessment to determine the urgency and required action labels Jan 6, 2025
Copy link
Contributor

@FabianTerhorst FabianTerhorst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks 👍

@FabianTerhorst FabianTerhorst added ready-to-merge This PR is enqueued for merging and removed invalid Requires changes before it's considered valid and can be (re)triaged labels Jan 7, 2025
@prikolium-cfx prikolium-cfx merged commit c95b323 into citizenfx:master Jan 9, 2025
4 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge This PR is enqueued for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants